chore: upgrade go version to v1.26.1#4686
Conversation
74270b2 to
ce26666
Compare
|
We can now bump to 1.26.1 |
Signed-off-by: Dejan Zele Pejchev <pejcev.dejan@gmail.com>
6748cda to
fe6884b
Compare
Greptile SummaryThis PR upgrades the project's Go toolchain from Key changes:
Confidence Score: 4/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Developer / CI] -->|runs build| B{goCheck in magefiles/go.go}
B -->|version >= 1.26.1?| C[Build proceeds]
B -->|version < 1.26.1| D[Error: constraint not met]
A -->|runs lint| E[golangci-lint v2.9.0]
E -->|only-new-issues: true| F[Reports new issues only]
E -.->|pre-existing issues| G[Silently ignored]
C --> H{Target}
H -->|local / CI| I[golang:1.26-bookworm Docker image]
H -->|release| J[goreleaser: GOVERSION=go1.26]
subgraph go.mod
K[go 1.26.1 toolchain directive]
end
C --> K
Last reviewed commit: fe6884b |
| } | ||
| for _, container := range armadaslices.Concatenate(spec.Containers, spec.InitContainers) { | ||
| if len(container.Resources.Requests) == 0 && len(container.Resources.Requests) == 0 { | ||
| if len(container.Resources.Requests) == 0 && len(container.Resources.Limits) == 0 { |
There was a problem hiding this comment.
Bundled bug fix changes validation semantics
The original code had a duplicate check — both sides of the && evaluated len(container.Resources.Requests) == 0, making the condition equivalent to just checking if Requests was empty. The fix correctly changes the second operand to check Limits.
However, this does change observable behavior. With the old (buggy) code, a container with no Requests but some Limits would fail with "container X has no resources specified". With the fix, the same input now passes this check and instead fails a few lines later (line 260) with "container X defines different resources for requests and limits". The end result is still validation failure, but the error message is different. This is almost certainly the correct behavior, but it's worth verifying that callers or tests don't assert on the specific error message from this path.
Additionally, this is a semantically meaningful bug fix bundled into a chore: upgrade go version PR. Consider whether this should be a separate commit or PR for cleaner history.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
<!-- Thanks for sending a pull request! Here are some tips for you: --> #### What type of PR is this? Chore #### What this PR does / why we need it Update Go version to v1.26.1 to benefit from latest performance optimizations and bug fixes. #### Which issue(s) this PR fixes <!-- *Automatically closes linked issue when PR is merged. Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`. _If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_* --> Fixes # #### Special notes for your reviewer Signed-off-by: Dejan Zele Pejchev <pejcev.dejan@gmail.com> Signed-off-by: Nikola Jokic <jokicnikola07@gmail.com>
What type of PR is this?
Chore
What this PR does / why we need it
Update Go version to v1.26.1 to benefit from latest performance optimizations and bug fixes.
Which issue(s) this PR fixes
Fixes #
Special notes for your reviewer