[WIP] Fix flaky test and update GitHub Actions to latest versions#11217
Closed
[WIP] Fix flaky test and update GitHub Actions to latest versions#11217
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
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.
Fix Flaky Test and Update GitHub Actions
Plan
pkg/cli/init_test.go(change defer to t.Cleanup).github/aw/actions-lock.jsonpkg/workflow/data/action_pins.jsonpkg/workflow/action_pins_test.gopkg/workflow/compiler_safe_outputs_config.gomake agent-finishto validate all changesChanges Made
Fixed Flaky Test (
pkg/cli/init_test.go)defertot.Cleanup()for directory restorationFixed Logger Name Conflict (
pkg/workflow/compiler_safe_outputs_config.go)compilerSafeOutputsLogtocompilerSafeOutputsConfigLogcompiler_safe_outputs.goUpdated GitHub Actions (27 actions updated)
actions/setup-node: v6.1.0 → v6.2.0actions/setup-go: v6.1.0 → v6.2.0anchore/sbom-action: v0.20.x → v0.22.0Updated Test Expectations (
pkg/workflow/action_pins_test.go)Recompiled Workflows (70
.lock.ymlfiles)Original prompt
This section details on the original issue you should resolve
<issue_title>[ca] Fix flaky test and update GitHub Actions to latest versions</issue_title>
<issue_description>## Summary
This PR addresses CI failures by fixing a flaky test and updating all GitHub Actions to their latest versions.
Changes Made
1. Fixed Flaky Test
File:
pkg/cli/init_test.goTestCreateCampaignLabelwas failing intermittently with "getwd: no such file or directory"deferto restore the working directory. However,t.Cleanup()(which removes the temp directory) was running before the deferred function, causingos.Getwd()to fail when called from a deleted directory.defertot.Cleanup()for directory restoration, ensuring it runs before the temp directory is removed.2. Updated GitHub Actions
Files:
.github/aw/actions-lock.json,pkg/workflow/data/action_pins.jsongh aw updateto update all action pins to latest versionsactions/setup-node: v6.1.0 → v6.2.0actions/setup-go: v6.1.0 → v6.2.0anchore/sbom-action: v0.20.x → v0.22.0actions/ai-inference: v2 → v2.0.5docker/build-push-action: v6 → v6.18.0haskell-actions/setup: v2.9.1 → v2.10.3ruby/setup-ruby: v1.275.0 → v1.286.03. Updated Test Expectations
File:
pkg/workflow/action_pins_test.go4. Recompiled Workflows
Files: 70
.lock.ymlfiles in.github/workflows/Validation
✅ Formatting:
make fmt- All code formatted✅ Linting:
make lint- All linters pass✅ Test Fix:
TestCreateCampaignLabelnow passes consistently✅ Action Pin Tests: All action pin tests pass with updated versions
✅ Workflow Compilation: All 133 workflows compile successfully
Notes
To apply the patch locally:
Show patch preview (500 of 1580 lines)