Skip to content

go: preserve Orchestrion wiring in Bzlmod runtime patches - #273

Open
tonyredondo wants to merge 3 commits into
mainfrom
fix/bzlmod-runtime-patch-profile
Open

tonyredondo wants to merge 3 commits into
mainfrom
fix/bzlmod-runtime-patch-profile

Conversation

@tonyredondo

@tonyredondo tonyredondo commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

What changed

Add a bzlmod_runtime consumer patch profile for repositories that maintain
their own rules_go patch stack. It keeps the Orchestrion registration in
rules_go's MODULE.bazel and the public go:extensions.bzl alias.

The existing WORKSPACE profile deliberately excludes both files. Using it
after a Bzlmod migration requires a hand-added module hunk, which disappears
on regeneration. A root-only use_repo also cannot make the tool repository
visible inside rules_go. The new profile preserves that wiring and uses the
same public orchestrion extension in both modules.

Profile Runtime integration Module registration and public alias Lockfiles and tests
workspace_runtime Included Excluded Excluded
bzlmod_runtime Included Included Excluded

No instrumentation or vendored fork code changes. Existing WORKSPACE consumers
keep the same profile and behavior.

Regression coverage

The profile verifier now exercises Bzlmod with WORKSPACE disabled. It applies
only the generated patch to clean upstream rules_go, runs instrumented CGO
tests in two independent output roots, checks standard/read-only cache
ownership, and compares action outputs using the existing Reprise-equivalent
checks. CI runs both profiles for rules_go v0.60.0, v0.61.1, v0.62.0 and v0.63.0
on its existing Linux amd64 and ARM64 lanes.

Unit tests cover profile boundaries, patch application, retained module
registration, excluded lockfiles/tests, public extension identity, profile-path
dispatch, and release archive coverage. README, contributor commands and the
Go onboarding reference describe the new profile and the extension identity
requirement.

Validation

  • All four Bzlmod patches generated, applied and passed private-safety checks.
  • Bzlmod v0.60.0 functional/CGO/reproducibility smoke passed on macOS ARM64.
  • Python tooling: 533 tests completed, with one expected skip; the final focused
    profile and variant suites passed all 56 tests.
  • Release worktree coverage, module version alignment, generated fork maps,
    Buildifier and git diff --check passed.
  • Local-archive Bzlmod monorepo E2E passed, including ordinary and optimized
    targets, static services, doctor, failed-test payloads and mock uploads.
  • GitHub Actions
    passed all 62 checks at e0c6b61, including both functional profiles for all
    four maintained rules_go versions on Linux amd64 and ARM64. One WORKSPACE
    shard needed a retry after a proxy.golang.org HTTP/2 download failure.

dd-source #121352 regenerates
its consumer patch with this profile, uses the public extension, generates
service imports, and updates its validator triggers.

@tonyredondo
tonyredondo requested a review from a team as a code owner October 6, 2026 19:56

@datadog-datadog-us1-prod datadog-datadog-us1-prod Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bits Code Review: PASS

More details

Profile classification across all four maintained rules_go versions preserves the module registration and public Orchestrion extension alias required for Bzlmod repository visibility. The full Bzlmod functional matrix remains unverified in this review.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 8898452 · @DataDog review to ask questions

@datadog-datadog-us1-prod

datadog-datadog-us1-prod Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Pipelines

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: e0c6b61 | Docs | View more details | Give us feedback!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant