Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 29, 2025

Azure/azure-rest-api-specs#38236 removed EventGrid sample files from main branch, breaking the extension's ability to fetch sample events for EventGrid function triggers.

Changes

  • Pin GitHub API URL to commit 752dade436619ed28bd03ca2e77cfa5acf6222dd where sample files still exist
  • Add documentation referencing upstream issues
// Before
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/';

// After
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?ref=752dade436619ed28bd03ca2e77cfa5acf6222dd';

Restores functionality for all supported EventGrid sources (Microsoft.Storage, Microsoft.EventHub, Microsoft.ServiceBus, etc.).

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • 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
    • Triggering command: curl -s -I REDACTED (http block)
    • Triggering command: curl -s REDACTED (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Update EventGrid sample file URL to use specific commit SHA after Azure/azure-rest-api-specs#38235</issue_title>
<issue_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:

References

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
</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Add ?ref=752dade436619ed28bd03ca2e77cfa5acf6222dd query parameter to EventGrid sample files URL to ensure the extension continues to work after upstream files were removed from main branch.

Fixes issue caused by Azure/azure-rest-api-specs#38235 and Azure/azure-rest-api-specs#38236

Co-authored-by: alexweininger <[email protected]>
Copilot AI changed the title [WIP] Update EventGrid sample file URL to specific commit SHA Pin EventGrid sample files URL to specific commit SHA Oct 29, 2025
Copilot AI requested a review from alexweininger October 29, 2025 18:25
Copilot finished work on behalf of alexweininger October 29, 2025 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update EventGrid sample file URL to use specific commit SHA after Azure/azure-rest-api-specs#38235

2 participants