Skip to content

fix(gradle-plugin): withdraw unpublished Maven coordinates (#884)#917

Merged
jbachorik merged 4 commits into
developfrom
agent/issue-884-withdraw-maven-coordinates
Jul 25, 2026
Merged

fix(gradle-plugin): withdraw unpublished Maven coordinates (#884)#917
jbachorik merged 4 commits into
developfrom
agent/issue-884-withdraw-maven-coordinates

Conversation

@jbachorik

@jbachorik jbachorik commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Closes #884.

Problem

The published Maven surface ships only io.btrace:btrace (a masked, self-contained distribution), yet the plugins and docs resolved coordinates that a released build never publishes — btrace-core, btrace-client, io.btrace:btrace-kafka, etc. That is an inaccurate public contract, not a request to publish those modules.

Change

  • BTraceExtensionPlugin — the external @ExternalType annotation-processor fallback now resolves io.btrace:btrace:<btraceVersion> instead of the withdrawn btrace-core.
  • BTraceFatAgentPlugin — pins the io.btrace:btrace engine, seeds the fat-agent manifest from the masked engine JAR (no longer from the extension author's project.version), runs the masked loader for source-probe compilation, and validates the masked-engine contract. bootJarTask is now explicitly unsupported.
  • BTraceVersion helper — resolves the pinned BTrace version (explicit btraceVersion → published plugin Implementation-Version) and rejects dynamic/range versions.
  • Publishingio.btrace.extension and io.btrace.fat-agent are published and signed to the Gradle Plugin Portal; the release workflow gains a publish-gradle-plugins job with a Plugin Portal smoke check.
  • Docs/tutorials — embed extensions via file(...) ZIPs; all BTrace-owned unpublished coordinates removed.

Verification

  • :btrace-gradle-plugin:test (TestKit) — 28 tests, 0 failures, incl. pinned-version and fail-clear regressions
  • tests.Issue884PublishedFatAgentE2ETest (-Pintegration) — publishes the plugins locally, builds a fat agent from the published markers, and performs a real dynamic attach (asserts timer output)
  • spotlessApply clean

🤖 Generated with Claude Code


This change is Reviewable

The published Maven surface ships only io.btrace:btrace. Resolve every
supported external engine dependency and the fat-agent source-probe
compiler path against that single masked distribution at an explicitly
pinned BTrace version, and seed the fat-agent manifest from the masked
engine JAR instead of the extension author's project.version.

- BTraceExtensionPlugin: external annotation-processor fallback resolves
  io.btrace:btrace:<btraceVersion>, never the withdrawn btrace-core
- BTraceFatAgentPlugin: pin the io.btrace:btrace engine, run the masked
  loader for probe compilation, and validate the masked-engine contract
- Add BTraceVersion helper that rejects dynamic/range versions
- Publish and sign io.btrace.extension and io.btrace.fat-agent to the
  Gradle Plugin Portal
- Rewrite docs/tutorials to embed extensions via file(...) ZIPs
- Add TestKit coverage and a published-fat-agent end-to-end test

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 24, 2026 12:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Issue884PublishedFatAgentE2ETest staged the ASM dependencies for the
temporary local repository by copying them from a hard-coded
`.gradle-user/caches/...` path under the repo root. That path only
exists when Gradle runs with the workspace-local `GRADLE_USER_HOME`
convention; CI uses `GRADLE_USER_HOME=/home/runner/.gradle`, so the
lookup missed and the test failed at the "missing cached dependency"
assertion before ever reaching the dynamic-attach checks.

Resolve the cache location from the `GRADLE_USER_HOME` env var
(falling back to `~/.gradle`) and discover the per-artifact SHA-1
subdirectory instead of hard-coding it, so the staging works under
any Gradle user home.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 25, 2026 08:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

- BTraceVersion.validate: note it deliberately permits pre-release
  qualifiers at resolve time, and that the stricter X.Y.Z publish gate
  lives in build.gradle, so the two validators aren't mistaken for one.
- release.yml: the JBang-catalog job was mislabeled "Job 5c",
  duplicating the new plugin-publish job; renumber it "Job 5d".

Comment/label only; no behavior change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 25, 2026 08:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Docker-based integration tests (e.g. JBangAttachDockerTest) intermittently
fail when Testcontainers pulls testcontainers/ryuk from Docker Hub and the
registry request times out. GitHub-hosted runners are ephemeral, so the Ryuk
resource reaper is unnecessary; disabling it removes that pull from the hot
path. Applied to both the CI and release integration-test jobs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 25, 2026 09:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@jbachorik
jbachorik merged commit 36d5db7 into develop Jul 25, 2026
15 checks passed
@jbachorik
jbachorik deleted the agent/issue-884-withdraw-maven-coordinates branch July 25, 2026 09:18
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.

[3.0] Published Maven surface omits coordinates the README and plugins resolve

2 participants