Skip to content

chore(deps): runtime go runtime go1.21.0 → go1.26.2 [tasks/unit_tests/testdata/go_mod_formatter/invalid_package]#49790

Draft
gh-worker-campaigns-3e9aa4[bot] wants to merge 1 commit into
mainfrom
engraver-auto-version-upgrade/eol-runtime/go/invalid_package/4-1776955432
Draft

chore(deps): runtime go runtime go1.21.0 → go1.26.2 [tasks/unit_tests/testdata/go_mod_formatter/invalid_package]#49790
gh-worker-campaigns-3e9aa4[bot] wants to merge 1 commit into
mainfrom
engraver-auto-version-upgrade/eol-runtime/go/invalid_package/4-1776955432

Conversation

@gh-worker-campaigns-3e9aa4
Copy link
Copy Markdown
Contributor

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.mod

The toolchain directive 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 toolchain directive controls only the Go binary used for compilation. Language features remain governed by the go directive in go.mod, which the owning team should bump when ready to adopt a newer language version.

Updates

Package From To Type Dep Type
go runtime go1.21.0 go1.26.2 runtime Direct

Security Details

⚠️ Dependencies that have Reached EOL (1)
Dependency Unsafe Version EOL Date New Version Path
go runtime go1.21.0 Aug 13, 2024 go1.26.2 tasks/unit_tests/testdata/go_mod_formatter/invalid_package/go.mod

Review Checklist

Standard review:

  • Review changes for compatibility with your code
  • Check for breaking changes in release notes
  • Run tests locally or wait for CI
  • Approve and merge this PR

Update Mode: Runtime EOL Upgrade

🤖 Generated by DataDog Automated Dependency Management System

@dd-octo-sts
Copy link
Copy Markdown
Contributor

dd-octo-sts Bot commented May 8, 2026

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!

@dd-octo-sts dd-octo-sts Bot added the stale label May 8, 2026
@gh-worker-campaigns-3e9aa4
Copy link
Copy Markdown
Contributor Author

Auto-rebase complete

Branch is up to date with main — rebased onto 62b9209.


Auto-Rebase · Add no-auto-rebase to opt out

@dd-octo-sts-b8cf80 dd-octo-sts-b8cf80 Bot force-pushed the engraver-auto-version-upgrade/eol-runtime/go/invalid_package/4-1776955432 branch from 62cc68b to bc4738f Compare June 4, 2026 19:41
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2026

@codex review

@datadog-datadog-prod-us1
Copy link
Copy Markdown
Contributor

datadog-datadog-prod-us1 Bot commented Jun 4, 2026

Pipelines

Fix all issues with BitsAI

⚠️ Warnings

🚦 23 Pipeline jobs failed

DataDog/datadog-agent | agent_heroku_deb-x64-a7   View in Datadog   GitLab

See error Go version mismatch: requires go >= 1.26.4 but running go 1.26.2 in bazel_gazelle_go_repository_tools.bzl:86

DataDog/datadog-agent | bazel:mod-deps   View in Datadog   GitLab

See error Failure in dependency management due to version discrepancies in MODULE.bazel.lock. Please run 'bazel mod deps --repo_env=REPIN=1' to fix.

DataDog/datadog-agent | bazel:run-gazelle   View in Datadog   GitLab

See error Package '@@gazelle++non_module_deps+bazel_gazelle_go_repository_tools' failed due to Go version compatibility: requires Go 1.26.4 but found Go 1.26.2.

View all 23 failed jobs.

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 7074446 | Docs | Datadog PR Page | Give us feedback!

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 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
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@gh-worker-campaigns-3e9aa4
Copy link
Copy Markdown
Contributor Author

Auto-rebase complete

Branch is up to date with main — rebased onto ca554de.


Auto-Rebase · Add no-auto-rebase to opt out

@dd-octo-sts-6354d5 dd-octo-sts-6354d5 Bot force-pushed the engraver-auto-version-upgrade/eol-runtime/go/invalid_package/4-1776955432 branch from bc4738f to 4c5a260 Compare June 4, 2026 20:22
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment thread go.work
@@ -1,5 +1,7 @@
go 1.25.10

toolchain go1.26.2
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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/
)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@github-actions github-actions Bot added medium review PR review might take time and removed short review PR is simple enough to be reviewed quickly labels Jun 4, 2026
@gh-worker-campaigns-3e9aa4
Copy link
Copy Markdown
Contributor Author

Auto-rebase complete

Branch is up to date with main — rebased onto 8361a39.


Auto-Rebase · Add no-auto-rebase to opt out

@dd-octo-sts-dcc400 dd-octo-sts-dcc400 Bot force-pushed the engraver-auto-version-upgrade/eol-runtime/go/invalid_package/4-1776955432 branch from 4c5a260 to 9127a47 Compare June 4, 2026 20:47
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment thread go.work
@@ -1,5 +1,7 @@
go 1.25.10

toolchain go1.26.2
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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/
)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@dd-octo-sts-0c48d7 dd-octo-sts-0c48d7 Bot force-pushed the engraver-auto-version-upgrade/eol-runtime/go/invalid_package/4-1776955432 branch from 9127a47 to 18e546d Compare June 4, 2026 23:33
@gh-worker-campaigns-3e9aa4
Copy link
Copy Markdown
Contributor Author

Auto-rebase complete

Branch is up to date with main — rebased onto dba5955.


Auto-Rebase · Add no-auto-rebase to opt out

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment thread go.work
@@ -1,5 +1,7 @@
go 1.26.4

toolchain go1.26.2
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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/
)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@gh-worker-campaigns-3e9aa4
Copy link
Copy Markdown
Contributor Author

Auto-rebase complete

Branch is up to date with main — rebased onto cdba151.


Auto-Rebase · Add no-auto-rebase to opt out

@dd-octo-sts-03ec73 dd-octo-sts-03ec73 Bot force-pushed the engraver-auto-version-upgrade/eol-runtime/go/invalid_package/4-1776955432 branch from 18e546d to e90a807 Compare June 5, 2026 00:31
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 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
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@gh-worker-campaigns-3e9aa4
Copy link
Copy Markdown
Contributor Author

Auto-rebase complete

Branch is up to date with main — rebased onto 7305cd1.


Auto-Rebase · Add no-auto-rebase to opt out

@dd-octo-sts-6cbbf8 dd-octo-sts-6cbbf8 Bot force-pushed the engraver-auto-version-upgrade/eol-runtime/go/invalid_package/4-1776955432 branch from e90a807 to a4d6aef Compare June 5, 2026 03:10
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment thread go.work
@@ -1,5 +1,7 @@
go 1.26.4

toolchain go1.26.2
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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/
)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

@github-actions github-actions Bot added long review PR is complex, plan time to review it and removed medium review PR review might take time labels Jun 5, 2026
@dd-octo-sts dd-octo-sts Bot removed the stale label Jun 5, 2026
@gh-worker-campaigns-3e9aa4
Copy link
Copy Markdown
Contributor Author

Auto-rebase complete

Branch is up to date with main — rebased onto fd975ee.


Auto-Rebase · Add no-auto-rebase to opt out

@dd-octo-sts-150931 dd-octo-sts-150931 Bot force-pushed the engraver-auto-version-upgrade/eol-runtime/go/invalid_package/4-1776955432 branch from a4d6aef to f29eae7 Compare June 5, 2026 08:35
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment thread go.work
@@ -1,5 +1,7 @@
go 1.26.4

toolchain go1.26.2
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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/
)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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>
@dd-octo-sts dd-octo-sts Bot force-pushed the engraver-auto-version-upgrade/eol-runtime/go/invalid_package/4-1776955432 branch from f29eae7 to 7074446 Compare June 5, 2026 11:40
@gh-worker-campaigns-3e9aa4
Copy link
Copy Markdown
Contributor Author

Auto-rebase complete

Branch is up to date with main — rebased onto da0e234.


Auto-Rebase · Add no-auto-rebase to opt out

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 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 (
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants