Skip to content

[WIP] Fix integration tests for updated pins#14791

Merged
pelikhan merged 3 commits intopinsupdatefrom
copilot/sub-pr-14790
Feb 10, 2026
Merged

[WIP] Fix integration tests for updated pins#14791
pelikhan merged 3 commits intopinsupdatefrom
copilot/sub-pr-14790

Conversation

Copy link
Contributor

Copilot AI commented Feb 10, 2026

Fix Integration Tests After Pin Updates

  • Update runtime_setup_test.go with new action pins
    • Update setup-bun pin from 735343b6 to 3d267786
    • Update setup-node pin from 395ad326 to 6044e13b
    • Update setup-go pin from 4dc6199c to 7a3fe6cf
    • Update haskell-actions/setup pin from 55073cbd to 9cd1b7bf
  • Update action_pins_test.go semver preference tests
    • Update setup-go expected version from v6.1.0 to v6.2.0
    • Update setup-node expected version from v6.1.0 to v6.2.0
    • Update checkout expected version from v6 to v6.0.2
    • Update expected pin count from 43 to 38
  • Run tests to verify fixes
  • Run make agent-finish for final validation

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

Copilot AI and others added 2 commits February 10, 2026 14:53
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan pelikhan marked this pull request as ready for review February 10, 2026 14:58
Copilot AI review requested due to automatic review settings February 10, 2026 14:58
@pelikhan pelikhan merged commit 19a9817 into pinsupdate Feb 10, 2026
92 of 94 checks passed
@pelikhan pelikhan deleted the copilot/sub-pr-14790 branch February 10, 2026 15:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates workflow/action pin fixtures and related tests to align with recently updated GitHub Action pins used by the workflow compiler/runtime setup generation.

Changes:

  • Updated expected pinned SHAs in runtime_setup_test.go for bun/node/go/haskell setup steps.
  • Added new action pin entries in action_pins.json (e.g., github/stale-repos, super-linter).
  • Adjusted action_pins_test.go expectations for pin selection and pin counts.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
pkg/workflow/runtime_setup_test.go Updates expected pinned SHAs for runtime setup step generation tests.
pkg/workflow/data/action_pins.json Adds additional pinned action entries to the embedded pin dataset.
pkg/workflow/action_pins_test.go Updates tests that validate pin selection and dataset expectations.
Comments suppressed due to low confidence (1)

pkg/workflow/action_pins_test.go:553

  • The semver-preference test names mention preferring v6.2.0 over v6, but action_pins.json currently has no version: "v6" entries for actions/setup-go or actions/setup-node (only v6.2.0). Either add the corresponding v6 pins to make this a real preference test, or rename the cases to avoid implying coverage that isn’t present.
			name:            "setup-go prefers v6.2.0 over v6",
			repo:            "actions/setup-go",
			expectedVersion: "v6.2.0",
		},
		{
			name:            "setup-node prefers v6.2.0 over v6",
			repo:            "actions/setup-node",
			expectedVersion: "v6.2.0",
		},

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +300 to +302
// Verify we got all the pins (38 as of February 2026)
if len(pins) != 38 {
t.Errorf("getActionPins() returned %d pins, expected 38", len(pins))
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

TestGetActionPinsSorting asserts len(pins) == 38, but getActionPins() returns one element per JSON entry in data/action_pins.json, which currently contains 23 entries. This will make the test fail; update the expected count to match the JSON (or compute it from the embedded data instead of hardcoding a number).

Suggested change
// Verify we got all the pins (38 as of February 2026)
if len(pins) != 38 {
t.Errorf("getActionPins() returned %d pins, expected 38", len(pins))
// Verify we got all the pins (23 as of February 2026)
if len(pins) != 23 {
t.Errorf("getActionPins() returned %d pins, expected 23", len(pins))

Copilot uses AI. Check for mistakes.
Comment on lines +612 to 618
name: "exact match for setup-go v6.2.0 from hardcoded pins",
repo: "actions/setup-go",
requestedVer: "v6",
expectedVer: "v6", // Should match exactly v6, not v6.1.0
requestedVer: "v6.2.0",
expectedVer: "v6.2.0", // Should match exactly v6.2.0
strictMode: false,
shouldFallback: false,
},
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

In TestGetActionPinWithData_SemverPreference, the second setup-go case duplicates the first (both request v6.2.0 and expect v6.2.0), so it no longer exercises the fallback behavior for major tags (e.g. requesting v6 when only v6.2.0 exists). Consider changing this case to request v6, expect the comment to remain # v6, and set shouldFallback accordingly so the semver-compatible fallback path stays covered.

This issue also appears on line 545 of the same file.

See below for a potential fix:

			name:           "fallback to highest semver-compatible version for setup-go when requesting v6 from hardcoded pins",
			repo:           "actions/setup-go",
			requestedVer:   "v6",
			expectedVer:    "v6", // Comment shows requested major version, not the pin's v6.2.0
			strictMode:     false,
			shouldFallback: true,

Copilot uses AI. Check for mistakes.
Copilot AI requested a review from pelikhan February 10, 2026 15:03
Copilot stopped work on behalf of pelikhan due to an error February 10, 2026 15:03
pelikhan added a commit that referenced this pull request Feb 10, 2026
* 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>
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