Skip to content

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

Closed
stokpop wants to merge 2 commits into
cloudfoundry:mainfrom
stokpop:1521-stackdriver-versioned-uri
Closed

stokpop wants to merge 2 commits 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 (cloudfoundry/buildpacks-ci#720).

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 release v0.5.0 of GoogleCloudPlatform/cloud-profiler-java, version 0.5.0 and the versioned asset URL .../releases/download/v0.5.0/profiler_java_agent.tar.gz. It is the same file as latest today (same sha256 bd443833...f835, also the same as the Cloud Storage release 20261026_RC00), so nothing changes at runtime. The old label 0.4.0 was the previous GitHub release; the file behind the floating URL had moved on to 0.5.0. The default pin 0.x is unchanged and still resolves to it.
  • docs/framework-google_stackdriver_profiler.md: the "Version" section says that the version is the one of the Google release.
  • 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/... unit tests pass. A cached zip with this entry (trimmed to this dependency) builds: the packager follows the GitHub redirect, the sha256 verifies, and the zip contains profiler_java_agent.tar.gz (8145170 bytes, as before). The earlier Docker integration run of the existing Stackdriver test used the same bytes from the Cloud Storage URL and was not repeated for the GitHub URL.

The bot update for this entry comes with cloudfoundry/buildpacks-ci#720, which watches the GitHub releases.

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

Google publishes the agent as release v0.5.0 of GoogleCloudPlatform/cloud-profiler-java, with the same file as the Cloud Storage release 20261026_RC00 (same sha256). Use the real version 0.5.0 and the versioned release URL instead of the date mapped label 0.20261026.0.
@stokpop

stokpop commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

Closing for now. The manifest entry of the Stackdriver profiler will be updated by the dependency bot once cloudfoundry/buildpacks-ci#720 switches the watcher to the GitHub releases of GoogleCloudPlatform/cloud-profiler-java (real versions, v0.5.0 has the same file as the floating latest), so we can check that path works end to end. The test that rejects floating /latest/ URIs and the docs sentence move to a new PR that merges after that bot update: #1574.

@stokpop stokpop closed this Nov 20, 2026
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