-
Notifications
You must be signed in to change notification settings - Fork 144
Open
Description
Background
Recent changes in the Azure/azure-rest-api-specs repository (see issue #38235 and PR #38236) removed almost all EventGrid sample directories and example files from main. As a result, the following URL used in EventGridTypeStep.ts now fails:
const sampleFilesUrl =
'https://api.github.com/repos/Azure/azure-rest-api-specs/contents/specification/eventgrid/data-plane/' +
'{eventSource}' +
'/stable/2018-01-01/examples/cloud-events-schema/';
Proposal
Use a specific SHA reference when fetching EventGrid sample files from the GitHub API. This will ensure the extension continues to provide sample events for all supported sources, even though the files are no longer present in the main branch.
Suggested approach:
- Modify the code in
EventGridTypeStep.tsto construct the sample files URL with a?ref=752dade436619ed28bd03ca2e77cfa5acf6222ddquery parameter. Example:https://api.github.com/repos/Azure/azure-rest-api-specs/contents/specification/eventgrid/data-plane/Microsoft.Storage/stable/2018-01-01/examples/cloud-events-schema?ref=752dade436619ed28bd03ca2e77cfa5acf6222ddconst sampleFilesUrl = 'https://api.github.com/repos/Azure/azure-rest-api-specs/contents/specification/eventgrid/data-plane/' + '{eventSource}' + '/stable/2018-01-01/examples/cloud-events-schema?ref=752dade436619ed28bd03ca2e77cfa5acf6222dd'; - Document this workaround in the code, referencing the upstream issue and PR.
References
- Upstream issue: Delete obsolete manual system event swaggers Azure/azure-rest-api-specs#38235
- Upstream PR: Delete obsolete manual system event swaggers from EventGrid data-plane Azure/azure-rest-api-specs#38236
- Commit that removed the files: Azure/azure-rest-api-specs@4c5f20e
Impact
- This workaround will allow the extension to continue functioning for EventGrid event sources despite the upstream file deletion.
- Future changes in azure-rest-api-specs may require further updates.
Labels: bug, eventgrid
Metadata
Metadata
Assignees
Labels
No labels