fix: use GetActionPin dynamically in tests instead of hardcoded action SHAs#18725
Closed
fix: use GetActionPin dynamically in tests instead of hardcoded action SHAs#18725
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…n SHAs Fixes the failing 'Integration: Workflow Compiler' CI job (job 65170211310). The recent commit updating action versions in action_pins.json changed the SHAs for actions/setup-go, actions/setup-python, astral-sh/setup-uv, actions/setup-dotnet, and actions/setup-java. Tests that hardcoded these SHAs started failing. Replace all hardcoded SHA strings in runtime_integration_test.go and runtime_setup_test.go with dynamic calls to GetActionPin(), so tests remain valid when action versions are updated. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions workflow Integration: Workflow Compiler
fix: use GetActionPin dynamically in tests instead of hardcoded action SHAs
Feb 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tests hardcoded specific commit SHAs for GitHub Actions (e.g.
actions/setup-go@7a3fe6cf...) that broke whenaction_pins.jsonwas updated to bump action versions.Changes
runtime_integration_test.go: Replace hardcoded SHA check inTestCompileWorkflowWithGoRuntimeWithoutGoModwithGetActionPin("actions/setup-go")runtime_setup_test.go: Same treatment forTestGenerateRuntimeSetupStepsandTestGenerateRuntimeSetupStepsWithIfCondition— coversactions/setup-go,actions/setup-python,astral-sh/setup-uv,actions/setup-dotnet, andactions/setup-javaBefore:
After:
This pattern ensures tests stay valid when
action_pins.jsonis updated, without losing the assertion that SHA-pinning is actually applied.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/usr/bin/gh gh auth status(http block)/usr/bin/gh gh auth status 64/pkg/tool/linux_amd64/vet(http block)/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/usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha --noprofile -tests nfig/composer/vendor/bin/bash(http block)/usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha HEAD bash 1/x64/bin/node --noprofile 9483265/b001/_terev-parse ache/node/24.13.--show-toplevel git arne�� --show-toplevel /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/link 1/x64/bin/node(http block)/usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha --show-toplevel git 64/bin/bash --show-toplevel git ache/node/24.13.--show-toplevel git _har�� --show-toplevel git ache/node/24.13.1/x64/bin/node --show-toplevel bash /usr/bin/git git(http block)https://api.github.com/repos/actions/checkout/git/ref/tags/v3/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha a-4844-83eb-47657731186a(http block)/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha --show-toplevel o "��� Warning: .github/aw/actions-lock.json doe-tests /usr/bin/git -unreachable=falgit /tmp/go-build413rev-parse 64/bin/bash git rev-�� --show-toplevel(http block)/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha --show-toplevel git /usr/bin/git --show-current 64/pkg/tool/linurev-parse 1/x64/bin/node git rev-�� --show-toplevel git 1/x64/bin/node --show-toplevel bash 1/x64/bin/node git(http block)https://api.github.com/repos/actions/checkout/git/ref/tags/v5/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha se 3927346/b028/vet.cfg ache/go/1.25.0/x64/pkg/tool/linu-nilfunc pull.rebase(http block)/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha rd(http block)/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha /tmp/go-build662085684/b001/workflow.test -importcfg /usr/bin/git -s -w -buildmode=exe git rev-�� --show-toplevel -extld=gcc /snap/bin/bash actions = ['actgit(http block)https://api.github.com/repos/actions/checkout/git/ref/tags/v6/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha -unreachable=false /tmp/go-build4133927346/b267/vet.cfg 86_64/bash(http block)/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha -unreachable=false /tmp/go-build4133927346/b226/vet.cfg ache/uv/0.10.7/x86_64/bash(http block)Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> /opt/hostedtoolcache/go/1.25.0/x64/bin/bash INVALID,NEW -j DROP bash --no�� --noprofile 64/pkg/tool/linux_amd64/vet /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/link` (http block)
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> 6448925/b123/vet.cfg` (http block)
Original prompt
💡 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.