rules_go: add registry-backed multi-version fork support#174
Open
tonyredondo wants to merge 3 commits into
Open
rules_go: add registry-backed multi-version fork support#174tonyredondo wants to merge 3 commits into
tonyredondo wants to merge 3 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
3041aaf to
20682d6
Compare
20682d6 to
f3dc118
Compare
There was a problem hiding this comment.
Users who previously set --rules-go-variant=complete had strip_prefix = "third_party/rules_go_orchestrion_complete" written to their MODULE.bazel. Re-running bootstrap without flags hits hydrateManagedRulesGoVariant → RulesGoSelectionForStripPrefix, which returns a generic "not in registry" error with no migration guidance. The fix adds the missing legacy-complete guard in RulesGoSelectionForStripPrefix so users get the same actionable "complete" is no longer supported. Use "base". message as the explicit-flag path.
📊 Validated against 6 scenarios · Open Bits AI session
🤖 Datadog Autotest · Commit 04770ab · What is Autotest? · Any feedback? Reach out in #autotest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
rules_gofork architecture withv0_60_0as the default upstream andv0_61_1as the first additional supported upstream. Materialized base trees live underthird_party/rgo/<upstream>/base.third_party/rgo/v0_60_0/base, addthird_party/rgo/v0_61_1/base, remove the publiccompletevariant, and makerules_go_variant = "complete"fail with a migration message.third_party/rules_go_orchestrion/patches/<upstream>/, plus generated fork-selection maps, materialization/drift checks, release archive checks, CI updates, Go onboarding pins, bootstrap tooling, docs, and integration harness updates.workspace_runtimeprofile, including generator/verifier tooling for consumers that already own arules_gopatch stack.auto,required,optional,disabled), default.topt/bazel-execution-log.jsondiscovery, and the explicit--allow-cached-payload-uploadsopt-out.completestrip-prefix migration errors, missing registry/profile contract fields, Darwin pure/internal link handling, direct-vs-transitive CGo toolchain propagation, and the multi-service aggregateexport.bzlshim.Validation
python3 tools/dev/generate_rules_go_fork_maps.py --checkRULES_GO_ORCHESTRION_CACHE=/private/tmp/rules_go_orchestrion_cache python3 tools/dev/materialize_rules_go_fork.py check --allpython3 tools/dev/verify_rules_go_profiles.py --public-denylist tools/dev/private_leak_public_denylist.txtpython3 tools/dev/check_release_archive_contents.py --source worktreegit diff --check origin/main...HEAD -- . ':(exclude)third_party/rules_go_orchestrion/patches/**' ':(exclude)third_party/rgo/**'./bazelw test //... --noexperimental_split_xml_generationcd modules/go && ../../bazelw test //tools/onboardingpins:onboardingpins_test //tools/dd_topt_go_bootstrap:bootstrap_test --override_module=datadog-rules-test-optimization=../..The raw patch files and materialized upstream
rules_gotrees intentionally preserve upstream/patch whitespace, so the whitespace check is scoped to repository-owned code, docs, and generated registry/profile metadata outside those raw data trees.Follow-up validation
7aa157b2ad0b9f3ed7d4e84f02d4ac03a58948e8, the current head of this PR, across the root module and fixtures.workspace_runtimeprofile applied after a repository-ownedrules_go v0.60.0patch stack. It now pins7aa157b2ad0b9f3ed7d4e84f02d4ac03a58948e8and includes enabled pilot tests, doctor validation, execution-log-required dry-run validation, cached-output filtering, and a real uploader run from its functional validation pass.Deferred / out of scope
../rules_test_optimization_tests ./runtestsis deferred because the current failure is in the Python fixture path: addtrace-4.8.0rc4wheel URL returned 404. This PR is focused on Go /rules_gosupport; the Go fixture matrix is covered by DataDog/rules_test_optimization_tests#86.