Skip to content

Handle upstream CodeSandbox embed blocking in website deployment test - #9639

Merged
ardatan merged 3 commits into
masterfrom
copilot/fix-deployment-job
Aug 19, 2026
Merged

Handle upstream CodeSandbox embed blocking in website deployment test#9639
ardatan merged 3 commits into
masterfrom
copilot/fix-deployment-job

Conversation

Copilot AI commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

The deployment GitHub Actions job was failing in the website Playwright check because the embedded CodeSandbox GitHub sandbox no longer consistently loads on prod. In the failing case, CodeSandbox returns an upstream embed block (403 / X-Frame-Options) rather than either rendering the example or showing a known outage banner.

  • Root cause

    • The prod-only examples-sandbox E2E test assumed the selected StackExchange sandbox would either:
      • render expected CodeSandbox content, or
      • show a known CodeSandbox outage banner
    • A third upstream failure mode now occurs: the embed request is blocked before the sandbox can load.
  • Change

    • Extend the prod-only Playwright assertion to detect upstream embed blocking by watching for:
      • 403 responses from the selected codesandbox.io sandbox URL
      • browser console errors mentioning X-Frame-Options for CodeSandbox
    • Treat that condition the same way as transient external outage conditions: skip the test instead of failing the deployment job.
  • Scope

    • Only the website E2E test was updated.
    • No production runtime behavior was changed.
const upstreamBlockPromise = page
  .waitForResponse(
    response =>
      response.url().includes('codesandbox.io') &&
      response.status() === 403 &&
      response.url().includes(SELECTED_EXAMPLE),
    { timeout },
  )
  .then(() => 'blocked' as const);

if (result === 'blocked') {
  test.skip(true, 'CodeSandbox blocked this embedded GitHub sandbox upstream');
}

@github-actions

Copy link
Copy Markdown
Contributor

Apollo Federation Subgraph Compatibility Results

Federation 1 Support Federation 2 Support
_service🟢
@key (single)🟢
@key (multi)🟢
@key (composite)🟢
repeatable @key🟢
@requires🟢
@provides🟢
federated tracing🟢
@link🟢
@shareable🟢
@tag🟢
@override🟢
@inaccessible🟢
@composeDirective🟢
@interfaceObject🟢

Learn more:

@github-actions

Copy link
Copy Markdown
Contributor

💻 Website Preview

The latest changes are available as preview in: https://pr-9639.graphql-mesh-ai3.pages.dev

Co-authored-by: ardatan <20847995+ardatan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job deployment Handle upstream CodeSandbox embed blocking in website deployment test Aug 19, 2026
Copilot AI requested a review from ardatan August 19, 2026 14:03
Comment thread website/src/components/examples-sandbox.e2e.ts Fixed
Comment thread website/src/components/examples-sandbox.e2e.ts Fixed
Co-authored-by: ardatan <20847995+ardatan@users.noreply.github.com>
@ardatan
ardatan marked this pull request as ready for review August 19, 2026 14:18
Copilot AI lite review requested due to automatic review settings August 19, 2026 14:18
@ardatan
ardatan merged commit e81e256 into master Aug 19, 2026
22 checks passed
@ardatan
ardatan deleted the copilot/fix-deployment-job branch August 19, 2026 14:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the website’s prod-only Playwright E2E coverage for the ExamplesSandbox embed so the deployment GitHub Actions job doesn’t fail when CodeSandbox blocks the embed upstream (e.g., 403 / X-Frame-Options) rather than rendering content or showing known outage banners.

Changes:

  • Add a page.waitForResponse watcher to detect CodeSandbox 403 responses for the selected example.
  • Add a page.waitForEvent('console') watcher to detect browser errors mentioning X-Frame-Options for CodeSandbox.
  • Treat the detected “upstream blocked” condition like other transient external outage conditions by skipping the test.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +45 to +49
const upstreamBlockPromise = page
.waitForResponse(
response => {
try {
const hostname = new URL(response.url()).hostname;
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.

4 participants