chore(deps): runtime go runtime go1.21.0 → go1.26.2 [tasks/unit_tests/testdata/go_mod_formatter/invalid_package]#49790
Conversation
|
This pull request has been automatically marked as stale because it has not had activity in the past 15 days. It will be closed in 30 days if no further activity occurs. If this pull request is still relevant, adding a comment or pushing new commits will keep it open. Also, you can always reopen the pull request if you missed the window. Thank you for your contributions! |
Auto-rebase completeBranch is up to date with Auto-Rebase · Add |
62cc68b to
bc4738f
Compare
|
@codex review |
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bc4738f25d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
|
||
| go 1.21.0 | ||
|
|
||
| toolchain go1.26.2 |
There was a problem hiding this comment.
Keep the invalid fixture invalid
This test fixture is used by test_invalid_go_mod_check and test_invalid_go_mod_format, which expect modformatter to print missing internal replace entries for required Datadog modules. With all require directives removed here, f.Require is empty, so the formatter emits no output and both tests now fail instead of exercising the invalid go.mod case. Restore the required Datadog dependencies while adding the toolchain directive.
Useful? React with 👍 / 👎.
Auto-rebase completeBranch is up to date with Auto-Rebase · Add |
bc4738f to
4c5a260
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4c5a26061f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| @@ -1,5 +1,7 @@ | |||
| go 1.25.10 | |||
|
|
|||
| toolchain go1.26.2 | |||
There was a problem hiding this comment.
Align go.work toolchain with .go-version
This makes every go command run from the workspace select/report Go 1.26.2 while the repository still pins .go-version to 1.25.10. Several CI build jobs explicitly run dda inv -- check-go-version before building (for example .gitlab/build/binary_build/linux.yml:13), and that task compares go version against .go-version in tasks/go.py:401-414, so those jobs will fail or try to download a different toolchain before the version check can pass.
Useful? React with 👍 / 👎.
| @@ -13,64 +15,3 @@ replace ( | |||
| github.com/DataDog/datadog-agent/pkg/util/log => ../util/log/ | |||
| github.com/DataDog/datadog-agent/pkg/util/scrubber => ../util/scrubber/ | |||
| ) | |||
There was a problem hiding this comment.
Restore invalid fixture requirements
Deleting the require blocks leaves this invalid_package fixture with no requirements for the formatter to validate. The formatter only reports missing replaces while iterating f.Require, and tasks/unit_tests/go_mod_formatter_tests.py:36-38 expects this fixture to emit output, so the invalid-check test now becomes empty/false-negative instead of exercising the missing internal replace case.
Useful? React with 👍 / 👎.
Auto-rebase completeBranch is up to date with Auto-Rebase · Add |
4c5a260 to
9127a47
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9127a47343
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| @@ -1,5 +1,7 @@ | |||
| go 1.25.10 | |||
|
|
|||
| toolchain go1.26.2 | |||
There was a problem hiding this comment.
Keep workspace toolchain aligned with repo Go pin
This adds a workspace-level toolchain go1.26.2 while the repo still pins Go 1.25.10 in .go-version, renovate.json, Bazel locks, and tasks/go.py::check_go_version. Because go help environment documents that GOTOOLCHAIN controls which Go toolchain is used, the default auto toolchain selection makes any go invocation from this workspace run or download Go 1.26.2; on hosts provisioned with the documented 1.25.10 toolchain this either triggers an unexpected network download or fails the repo's version check. Please update the repo-wide Go version sources together, or avoid changing the root workspace toolchain in this fixture-only dependency bump.
Useful? React with 👍 / 👎.
| @@ -13,64 +15,3 @@ replace ( | |||
| github.com/DataDog/datadog-agent/pkg/util/log => ../util/log/ | |||
| github.com/DataDog/datadog-agent/pkg/util/scrubber => ../util/scrubber/ | |||
| ) | |||
There was a problem hiding this comment.
Restore the invalid fixture's require blocks
This fixture is used by test_invalid_go_mod_check and test_invalid_go_mod_format to prove the formatter reports internal require entries that are missing corresponding replace directives. Removing all require blocks leaves f.Require empty in internal/tools/modformatter/modformatter.go, so the formatter emits no diagnostics and both invalid-fixture tests now exercise a valid empty dependency set instead of the intended failure case. Please keep the dependency blocks and only adjust the runtime directive needed for the fixture.
Useful? React with 👍 / 👎.
9127a47 to
18e546d
Compare
Auto-rebase completeBranch is up to date with Auto-Rebase · Add |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 18e546dc6e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| @@ -1,5 +1,7 @@ | |||
| go 1.26.4 | |||
|
|
|||
| toolchain go1.26.2 | |||
There was a problem hiding this comment.
Use a toolchain at least as new as the workspace go
When a developer runs any Go command from this checkout with an older bundled Go and GOTOOLCHAIN=auto, Go consults the toolchain line before the go line (per https://go.dev/doc/toolchain), so this selects go1.26.2; that selected toolchain is then too old for the workspace's go 1.26.4 minimum and refuses to load the repo. This blocks local dda inv/Go tooling in that common setup; the toolchain line should be go1.26.4 or omitted.
Useful? React with 👍 / 👎.
| @@ -13,64 +15,3 @@ replace ( | |||
| github.com/DataDog/datadog-agent/pkg/util/log => ../util/log/ | |||
| github.com/DataDog/datadog-agent/pkg/util/scrubber => ../util/scrubber/ | |||
| ) | |||
There was a problem hiding this comment.
Preserve requires in the invalid formatter fixture
This fixture now ends after the replace block, so modformatter sees an empty f.Require list and emits no “missing replace” output. tasks/unit_tests/go_mod_formatter_tests.py uses this exact file in test_invalid_go_mod_check/test_invalid_go_mod_format and asserts the formatter reports an invalid module, so removing all require directives makes those tests fail and stops the fixture from covering the intended case.
Useful? React with 👍 / 👎.
Auto-rebase completeBranch is up to date with Auto-Rebase · Add |
18e546d to
e90a807
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e90a8075fc
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
|
||
| go 1.21.0 | ||
|
|
||
| toolchain go1.26.2 |
There was a problem hiding this comment.
Restore the invalid fixture's require directives
This fixture is consumed by tasks/unit_tests/go_mod_formatter_tests.py as the negative case: the formatter only reports missing replacements by iterating f.Require, and the previous invalidity was the required github.com/DataDog/datadog-agent/pkg/util/sort entry without a matching replace. After this change the file has no require directives at all, so test_invalid_go_mod_check and test_invalid_go_mod_format get empty output and the negative fixture no longer exercises the formatter.
Useful? React with 👍 / 👎.
Auto-rebase completeBranch is up to date with Auto-Rebase · Add |
e90a807 to
a4d6aef
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a4d6aef63a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| @@ -1,5 +1,7 @@ | |||
| go 1.26.4 | |||
|
|
|||
| toolchain go1.26.2 | |||
There was a problem hiding this comment.
Keep the workspace toolchain at least the Go version
In this workspace context, the new toolchain go1.26.2 is lower than the existing go 1.26.4. The Go toolchain documentation says the suggested toolchain cannot be less than the required Go version, so commands run from the repo root will reject this go.work instead of selecting a usable toolchain. This should either be go1.26.4 or omitted.
Useful? React with 👍 / 👎.
| @@ -13,64 +15,3 @@ replace ( | |||
| github.com/DataDog/datadog-agent/pkg/util/log => ../util/log/ | |||
| github.com/DataDog/datadog-agent/pkg/util/scrubber => ../util/scrubber/ | |||
| ) | |||
There was a problem hiding this comment.
Restore the invalid fixture's required dependency block
This fixture is used by tasks/unit_tests/go_mod_formatter_tests.py to verify that the formatter reports a required Datadog module missing from replace; after this hunk the file has no require directives at all, so modformatter has nothing to inspect and test_invalid_go_mod_check/test_invalid_go_mod_format will see empty output instead of the expected failure. The intentionally invalid require block, especially the unreplaced pkg/util/sort dependency, needs to remain in this testdata file.
Useful? React with 👍 / 👎.
Auto-rebase completeBranch is up to date with Auto-Rebase · Add |
a4d6aef to
f29eae7
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f29eae76f5
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| @@ -1,5 +1,7 @@ | |||
| go 1.26.4 | |||
|
|
|||
| toolchain go1.26.2 | |||
There was a problem hiding this comment.
Do not pin the workspace below its required Go version
With a default toolchain older than 1.26.2 (for example a standard Go 1.21+ install using GOTOOLCHAIN=auto), startup selection consults toolchain first and runs go1.26.2; that selected toolchain then refuses this workspace because line 1 requires go 1.26.4. The Go toolchain docs describe this ordering and refusal behavior, so this makes workspace-level Go commands fail for developers/CI that relied on auto-switching to the go version. Use toolchain go1.26.4 or remove the directive instead.
Useful? React with 👍 / 👎.
| @@ -13,64 +15,3 @@ replace ( | |||
| github.com/DataDog/datadog-agent/pkg/util/log => ../util/log/ | |||
| github.com/DataDog/datadog-agent/pkg/util/scrubber => ../util/scrubber/ | |||
| ) | |||
There was a problem hiding this comment.
Keep this fixture invalid for the formatter tests
After the deleted require blocks, this fixture no longer requires any internal Datadog module that is missing from the replace block, so TestGoModFormatter.test_invalid_go_mod_check and test_invalid_go_mod_format no longer exercise the invalid path and will see empty formatter output. This file was invalid because pkg/util/sort was required but not replaced; keep at least that requirement (and its missing replace) so the invalid fixture still triggers the formatter diagnostic.
Useful? React with 👍 / 👎.
Co-authored-by: dd-octo-sts-150931[bot] <266798526+dd-octo-sts-150931[bot]@users.noreply.github.com>
f29eae7 to
7074446
Compare
Auto-rebase completeBranch is up to date with Auto-Rebase · Add |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7074446a22
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
|
||
| toolchain go1.26.2 | ||
|
|
||
| replace ( |
There was a problem hiding this comment.
Restore required deps in invalid go.mod fixture
With this fixture reduced to only replace directives, internal/tools/modformatter has no Require entries to inspect, so test_invalid_go_mod_check and the first half of test_invalid_go_mod_format no longer exercise the missing-replace path and will produce empty output. This makes the intentionally invalid fixture indistinguishable from a valid file; keep at least one internal require that is not covered by the replace block so these tests still fail before formatting.
Useful? React with 👍 / 👎.
Summary: Security update — 1 package upgraded (MAJOR changes included)
Manifests changed:
tasks/unit_tests/testdata/go_mod_formatter/invalid_package(go)✅ Action Required: Please review the changes below. If they look good, approve and merge this PR.
Runtime Upgrade
This update includes a go runtime upgrade.
What changed in
go.modThe
toolchaindirective specifies which Go version to use when building this module. Adding it is best practice — it keeps local development in sync with CI and makes the intended Go version explicit. Build systems that manage their own Go installation may ignore this directive.The
toolchaindirective controls only the Go binary used for compilation. Language features remain governed by thegodirective ingo.mod, which the owning team should bump when ready to adopt a newer language version.Updates
Security Details
go1.21.0go1.26.2tasks/unit_tests/testdata/go_mod_formatter/invalid_package/go.modReview Checklist
Standard review:
Update Mode: Runtime EOL Upgrade
🤖 Generated by DataDog Automated Dependency Management System