fix(gradle-plugin): withdraw unpublished Maven coordinates (#884)#917
Merged
Conversation
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>
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>
- 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>
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>
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.
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@ExternalTypeannotation-processor fallback now resolvesio.btrace:btrace:<btraceVersion>instead of the withdrawnbtrace-core.BTraceFatAgentPlugin— pins theio.btrace:btraceengine, seeds the fat-agent manifest from the masked engine JAR (no longer from the extension author'sproject.version), runs the masked loader for source-probe compilation, and validates the masked-engine contract.bootJarTaskis now explicitly unsupported.BTraceVersionhelper — resolves the pinned BTrace version (explicitbtraceVersion→ published pluginImplementation-Version) and rejects dynamic/range versions.io.btrace.extensionandio.btrace.fat-agentare published and signed to the Gradle Plugin Portal; the release workflow gains apublish-gradle-pluginsjob with a Plugin Portal smoke check.file(...)ZIPs; all BTrace-owned unpublished coordinates removed.Verification
:btrace-gradle-plugin:test(TestKit) — 28 tests, 0 failures, incl. pinned-version and fail-clear regressionstests.Issue884PublishedFatAgentE2ETest(-Pintegration) — publishes the plugins locally, builds a fat agent from the published markers, and performs a real dynamic attach (assertstimeroutput)spotlessApplyclean🤖 Generated with Claude Code
This change is