Skip to content

Conversation

@Turbo87
Copy link
Member

@Turbo87 Turbo87 commented Nov 13, 2025

This adds a new workspace crate to centralize access to Heroku-specific environment variables.

The crate supports HEROKU_SLUG_COMMIT and the newer HEROKU_BUILD_COMMIT. It provides a commit() fn that tries both environment variables and returns whichever it finds.

The new commit() function is now used in:

  • Sentry release tracking
  • Site metadata API endpoint
  • Database dump metadata

see https://devcenter.heroku.com/articles/dyno-metadata

This adds a new workspace crate to centralize access to Heroku-specific
environment variables, starting with `HEROKU_SLUG_COMMIT`.

The new `slug_commit()` function is now used in:
- Sentry release tracking
- Site metadata API endpoint
- Database dump metadata

Documentation notes that the environment variable is provided by
the `runtime-dyno-metadata` Heroku Labs feature.
Support `HEROKU_BUILD_COMMIT` environment variable, which is the
current standard for retrieving the deployed commit SHA from Heroku.
This variable is provided by the `runtime-dyno-build-metadata` Labs
feature.

`HEROKU_SLUG_COMMIT` remains supported via `slug_commit()` for
backward compatibility, though it is deprecated by Heroku.
Use `HEROKU_BUILD_COMMIT` first, falling back to `HEROKU_SLUG_COMMIT`
for backward compatibility with deployments using the older
`runtime-dyno-metadata` Labs feature.
@Turbo87 Turbo87 added C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear A-backend ⚙️ labels Nov 13, 2025
@Turbo87 Turbo87 requested a review from a team November 13, 2025 12:41
@Turbo87 Turbo87 merged commit b3958d6 into rust-lang:main Nov 14, 2025
10 checks passed
@Turbo87 Turbo87 deleted the heroku-crate branch November 14, 2025 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-backend ⚙️ C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant