[WIP] Fix failing GitHub Actions workflow Integration: Workflow Compiler#14792
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates workflow compiler integration tests to align with the current pinned SHAs in pkg/workflow/data/action_pins.json, fixing failures caused by outdated hardcoded hashes.
Changes:
- Update expected
actions/setup-nodepinned SHA inTestCompileWorkflowWithRuntimesAppliedToSteps. - Update expected
actions/setup-gopinned SHA inTestCompileWorkflowWithGoRuntimeWithoutGoMod.
Comments suppressed due to low confidence (1)
pkg/workflow/runtime_integration_test.go:360
- This test hardcodes the
actions/setup-gopinned SHA, which will require future manual updates wheneveraction_pins.jsonchanges. To keep the test stable while still validating pinning, compute the expected SHA/reference from the pins (e.g., resolveactions/setup-go@v6throughGetActionPinWithData) and assert against the computed value.
if !strings.Contains(lockStr, "actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5") {
t.Error("Expected actions/setup-go action in lock file")
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| // Verify that Node.js setup step is included with version 22 | ||
| if !strings.Contains(lockStr, "actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f") { | ||
| if !strings.Contains(lockStr, "actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238") { |
There was a problem hiding this comment.
These integration assertions hardcode the pinned commit SHA. This has already proven brittle when action_pins.json changes; consider deriving the expected SHA via the same pin-resolution code used by the compiler (e.g., resolve actions/setup-node@v6 through GetActionPinWithData / pins data) and asserting against that value instead of an inlined hash.
This issue also appears on line 358 of the same file.
| if !strings.Contains(lockStr, "actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238") { | |
| if !strings.Contains(lockStr, "actions/setup-node@") { |
* updated pins * [WIP] Fix integration tests for updated pins (#14791) * Initial plan * Initial plan for fixing integration tests Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> * Update integration tests with new action pins Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> * [WIP] Fix failing GitHub Actions workflow Integration: Workflow Compiler (#14792) * Initial plan * Update action pin SHAs in runtime integration tests Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> * [WIP] Fix failing GitHub Actions workflow runtime and setup (#14796) * Initial plan * Fix TestRuntimeSetupIntegration by updating setup-node SHA Update the test expectation to use the current SHA for actions/setup-node@v6.2.0 (6044e13b5dc448c55e2357c09f80417699197238) instead of the outdated SHA (395ad3262231945c25e8478fd5baf05154b1d79f). The action_pins.json file was recently updated with newer action SHAs, and this test needed to be synchronized. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> * Add retry logic for transient GitHub API errors in live integration test (#14799) * Initial plan * Add retry logic for transient GitHub API errors in frontmatter hash test Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> * Address code review feedback: extract retry config constants and scope core mock Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> Co-authored-by: Peli de Halleux <pelikhan@users.noreply.github.com> --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Fix Workflow Compiler Integration Tests
The tests
TestCompileWorkflowWithRuntimesAppliedToStepsandTestCompileWorkflowWithGoRuntimeWithoutGoModare failing because they check for outdated action SHA hashes that no longer match the current action pins.Root Cause
pkg/workflow/data/action_pins.jsonactions/setup-node: Old SHA395ad3262231945c25e8478fd5baf05154b1d79f→ Current SHA6044e13b5dc448c55e2357c09f80417699197238(v6.2.0)actions/setup-go: Old SHA4dc6199c7b1a012772edbd06daecab0f50c9053c→ Current SHA7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5(v6.2.0)Plan
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.