Skip to content

fix: Validate SENTRY_RELEASE environment variable#2807

Merged
szokeasaurusrex merged 1 commit intomasterfrom
szokeasaurusrex/cli-7_validate_release_strings_locally
Sep 29, 2025
Merged

fix: Validate SENTRY_RELEASE environment variable#2807
szokeasaurusrex merged 1 commit intomasterfrom
szokeasaurusrex/cli-7_validate_release_strings_locally

Conversation

@szokeasaurusrex
Copy link
Copy Markdown
Member

@szokeasaurusrex szokeasaurusrex commented Sep 29, 2025

Apply the same validation to SENTRY_RELEASE that we also apply to the --release argument.

Fixes #2444
Fixes CLI-7


Note

Validate SENTRY_RELEASE with the same rules as --release and refactor release validation/parsing for clap.

  • Config (src/config.rs):
    • Validate SENTRY_RELEASE via args::validate_release; ignore with warning if invalid; require release if missing.
  • CLI Args (src/utils/args.rs):
    • Refactor release validation: expose validate_release returning anyhow::Result<()> and add parse_release for clap.
    • Use parse_release for --release and --version value parsers.

Written by Cursor Bugbot for commit 383ec69. This will update automatically on new commits. Configure here.

Apply the same validation to `SENTRY_RELEASE` that we also apply to the `--release` argument.

Fixes #2444
Fixes [CLI-7](https://linear.app/getsentry/issue/CLI-7/validate-release-strings-locally)
@szokeasaurusrex szokeasaurusrex requested a review from a team as a code owner September 29, 2025 08:56
@linear
Copy link
Copy Markdown

linear bot commented Sep 29, 2025

Copy link
Copy Markdown
Member

@lcian lcian left a comment

Choose a reason for hiding this comment

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

LGTM

@szokeasaurusrex szokeasaurusrex merged commit 4ff5286 into master Sep 29, 2025
25 checks passed
@szokeasaurusrex szokeasaurusrex deleted the szokeasaurusrex/cli-7_validate_release_strings_locally branch September 29, 2025 10:52
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.

Validate release strings locally

2 participants