Update claude gazelle skill to add required tags for per platform tests - #49274
Update claude gazelle skill to add required tags for per platform tests#49274aiuto wants to merge 18 commits into
Conversation
|
/merge -@ 11am UTC |
|
View all feedbacks in Devflow UI.
Pull Request scheduled to be added to the queue on Tue, 14 Apr 2026 11:00:00 UTC
This merge request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
tony.aiuto@datadoghq.com unqueued this merge request |
Files inventory check summaryFile checks results against ancestor 6dfc3af2: Results for datadog-agent_7.79.0~devel.git.856.e01a561.pipeline.108155849-1_amd64.deb:No change detected |
| - When **`bazel test` / `bazel build` fails** in a way that points to wrong or missing symbols from tag-gated sources — add the needed tags on that package’s `go_test` (and/or `go_library`) so the compiler enables the same constraints. | ||
| - When you follow the **`//go:build test`** pattern below (library sources with `test` in the build line) — use `gotags = ["test"] # keep` on the embedding `go_test`. | ||
| - For **k8s-style tags** (`kubeapiserver`, `kubelet`, etc.) — add `gotags` **per package** only when that package’s **sources or tests** are actually behind those `//go:build` lines (including tag-gated `*_test.go`). Do not add them speculatively to every test under a tree. | ||
| - For **OS-specific test files** (e.g. `poller_darwin_test.go`, `poller_linux_test.go`) that rely on the platform being set as a build tag — use a `select()` to pass the right OS tag at test time: |
There was a problem hiding this comment.
We don't need it, GOOS and GOARCH do it for us on the toolchain level. I ran the tests to confirm that this select is a no-op
There was a problem hiding this comment.
So the weird thing is that I see different behaviors.
Next time I get a pure windows library in a migration PR, I'll reduce it down to that as a demonstration
I'll move to draft for now.
|
/merge -c |
|
View all feedbacks in Devflow UI.
|
|
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! |
|
This pull request was automatically closed because it has been stale for 15 days with no activity. If this pull request is still relevant, please reopen it or create a new pull request with updated information. Thanks! |
What does this PR do?
Updates an AI agent skill to create a new BUILD.bazel file so that go_test use a gotag that matches the platform we are running the test on.
Motivation
We have a lot of code that is os specific, and our tests are written to expect that they always run with the correct tag.
Describe how you validated your changes
Learned this from experience. Many of our early attempts at letting claude do bazel conversions ended up with PRs that would fail tests on specific platforms.