Skip to content

Pin the Stackdriver profiler to its versioned artifact instead of the floating latest URL - #1547

Open
stokpop wants to merge 1 commit into
cloudfoundry:mainfrom
stokpop:1521-stackdriver-versioned-uri
Open

stokpop wants to merge 1 commit into
cloudfoundry:mainfrom
stokpop:1521-stackdriver-versioned-uri

Conversation

@stokpop

@stokpop stokpop commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Part of #1521 (option 2). Does not close it: making the dependency bot handle this entry is a separate change.

The google-stackdriver-profiler entry pointed at https://storage.googleapis.com/cloud-profiler/java/latest/profiler_java_agent.tar.gz with a pinned sha256. Google replaces the latest copy without changing the URL, so the sha broke CI when latest moved on 2026-10-27 (fixed by #1520, but it would break again at the next release). The packager also caches downloads by URI, so a stale latest download keeps being reused on a developer machine and gives a false sha mismatch.

Changes:

  • manifest.yml: the entry now uses the versioned artifact .../java/cloud-profiler-java-agent_20261026_RC00.tar.gz. It has the same bytes as latest today (same sha256 bd443833...f835), so nothing changes at runtime. The version label 0.4.0 was made up; Google's version is a date (20261026_RC00), which the version resolver cannot handle (Invalid Semantic Version). The entry now uses 0.20261026.0, which is YYYYMMDD_RCnn written as 0.YYYYMMDD.nn. The default pin 0.x is unchanged and still resolves to it.
  • docs/framework-google_stackdriver_profiler.md: a short "Version" section with the mapping.
  • New test TestManifestDependencyURIsAreNotFloating in src/java/frameworks: fails when a dependency uri in manifest.yml contains /latest/. It failed before the manifest change on exactly this entry.

Verified: the new test, and the src/java/frameworks unit tests, pass; a cached zip built from this branch contains cloud-profiler-java-agent_20261026_RC00.tar.gz; the existing Stackdriver integration test (Docker, cflinuxfs4) passes with that zip. I also ran a stricter version of that test, which is not part of this PR, against the same zip: it passes and the running JVM has -agentpath:...profiler_java_agent.so=-cprof_project_id=....

The dependency pipeline still publishes the date version as is, so the next update of this entry is manual until the buildpacks-ci watcher produces the 0.YYYYMMDD.nn form (follow-up).

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.

🟢 Approval recommended

No active review issues are recorded for the change pinning the Stackdriver Profiler artifact to a versioned URL.

No open issues 🎉

What changed in this PR

Pins the Java buildpack’s Stackdriver Profiler to a versioned artifact to prevent checksum failures and stale-cache reuse caused by the floating latest URL. Dependency-bot support remains a separate follow-up to #1521.

Changes:

  • Replaces the floating URL while preserving the existing checksum and artifact contents.
  • Uses the resolver-compatible version 0.20261026.0 and documents the date-to-semantic-version mapping.
  • Adds a regression test rejecting dependency URIs containing /latest/.
File Description
src/​java/​frameworks/​manifest_uris_test.go Adds the manifest check for floating /latest/ dependency URIs.
manifest.yml Pins the profiler artifact URL and updates its version label.
docs/​framework-google_stackdriver_profiler.md Explains the version mapping and versioned-URL policy.

Review effort: Balanced

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.

2 participants