fix: add ModulePath() to TestDeps for Go 1.26 compatibility#2646
Conversation
Signed-off-by: Henry Sachs <[email protected]>
Signed-off-by: Henry Sachs <[email protected]>
PodLogs in Finally/Catch invokes kubectl as subprocess; without a real cluster it exits non-zero, causing fail() to be called. expectedFail was incorrectly set to false (zero value). Corrected to true to match actual semantics. Signed-off-by: Henry Sachs <[email protected]>
|
Question for reviewers regarding the test fix: The pre-existing test Happy to adjust the fix based on your guidance. |
|
@eddycharly if you would be able to take a look that would be highly appreciated |
|
sorry for pinging but @shubham-cmyk maybe you can help me get this through? |
Avoid the gosec temp file path warning, update Trivy to a working action release, and keep the runner unit test independent from kubectl side effects. Signed-off-by: Henry Sachs <[email protected]>
Keep the original catch and finally pod log coverage in place even though the unit test still fails locally without the previous expectation change. Signed-off-by: Henry Sachs <[email protected]>
|
Local repro is green now: kind-backed make tests and golangci-lint both pass on the branch. The only remaining blocker should be the missing milestone on the PR. Could you @eddycharly or @shubham-cmyk please approve the workflows and set a milestone to have the CI turn green? :) |
|
@henrysachs the code QL is failing please check |
Move CodeQL scanning to trivy-action v0.35.0 so the workflow uses the newer Trivy release instead of the broken v0.69.1 default. Signed-off-by: Henry Sachs <[email protected]>
|
@shubham-cmyk i hope that a action bump fixes it. I think this is related to the trivy issues: https://github.com/aquasecurity/trivy/discussions/10265 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2646 +/- ##
==========================================
+ Coverage 66.95% 67.00% +0.05%
==========================================
Files 149 149
Lines 5698 5707 +9
==========================================
+ Hits 3815 3824 +9
Misses 1623 1623
Partials 260 260 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Cover the new ModulePath shim and exercise LoadFromURI through a local HTTP server so patch coverage reflects the CI fix paths. Signed-off-by: Henry Sachs <[email protected]>
|
@shubham-cmyk i made fixes for codecov. Atleast i hope to fix the coverage 😅 |
Extract the downloaded file read path behind a tiny read-seeker helper so seek and read errors can be covered without weakening the gosec-safe handle-based flow. Signed-off-by: Henry Sachs <[email protected]>
|
@shubham-cmyk i had to do this via the interface to adress the gosec finding and make it testable for codecov, so could you approve again? |
Done |
|
@shubham-cmyk so all checks passed, did you have some time to have a look on the changes? |
|
@henrysachs just update this we are ready to go |
Co-authored-by: Shubham Gupta <[email protected]> Signed-off-by: Henry Sachs <[email protected]>
|
@shubham-cmyk there you go, thanks for the review! |
|
@shubham-cmyk I know I'm really a bit pushy here, but could you also please publish a release from this? |
|
@henrysachs i have pinged @eddycharly for the release |
|
@eddycharly could you please have a look into this? |
Description
chainsaw fails to compile with Go 1.26 because
testing.testDepsgained a new required methodModulePath() stringin Go 1.26.Error
Root cause
pkg/runner/internal/test_deps.goimplements thetesting.testDepsinterface but is missingModulePath() stringadded in Go 1.26.Fix
go.modtogo 1.26.0.Fixes #2645