Skip to content

Conversation

@szokeasaurusrex
Copy link
Member

@szokeasaurusrex szokeasaurusrex commented Nov 12, 2025

Description

Don't serialize empty-string values for --vcs-provider, --head-repo-name, --head-ref, --base-ref, and --base-repo-name into HTTP requests to the assemble build artifact endpoint. This allows users to set these values to empty strings to override any default values.

Issues

Copy link
Member Author

szokeasaurusrex commented Nov 12, 2025

@szokeasaurusrex szokeasaurusrex changed the title Szokeasaurusrex/allow-empty fix(build): Allow clearing string arguments to build upload Nov 12, 2025
@linear
Copy link

linear bot commented Nov 12, 2025

@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/allow-empty branch from 33882a2 to ef2d2b3 Compare November 12, 2025 08:47
szokeasaurusrex added a commit that referenced this pull request Nov 12, 2025
### Description
Don't serialize empty-string values for `--vcs-provider`, `--head-repo-name`, `--head-ref`, `--base-ref`, and `--base-repo-name` into HTTP requests to the assemble build artifact endpoint. This allows users to set these values to empty strings to override any default values.

### Issues
- Resolves #2941
- Resolves [CLI-224](https://linear.app/getsentry/issue/CLI-224/skip-serializing-certain-fields-for-build-upload)
@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/allow-empty branch from ef2d2b3 to 3a116c1 Compare November 12, 2025 08:47
@szokeasaurusrex szokeasaurusrex marked this pull request as ready for review November 12, 2025 08:47
@szokeasaurusrex szokeasaurusrex requested review from a team as code owners November 12, 2025 08:47
@szokeasaurusrex
Copy link
Member Author

@runningcode, I did not make it possible to clear --pr-number in this PR. Currently, attempting to clear it results in a validation error, as the argument is not configured in a way to allow empty values:

% cargo run -- build upload --pr-number ""
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.69s
     Running `target/debug/sentry-cli build upload --pr-number ''`
error: invalid value '' for '--pr-number <pr_number>': cannot parse integer from empty string

For more information, try '--help'.

@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/validate-shas branch from d26e21d to 9760a73 Compare November 12, 2025 14:21
### Description
Don't serialize empty-string values for `--vcs-provider`, `--head-repo-name`, `--head-ref`, `--base-ref`, and `--base-repo-name` into HTTP requests to the assemble build artifact endpoint. This allows users to set these values to empty strings to override any default values.

### Issues
- Resolves #2941
- Resolves [CLI-224](https://linear.app/getsentry/issue/CLI-224/skip-serializing-certain-fields-for-build-upload)
@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/validate-shas branch from 9760a73 to a2cef20 Compare November 12, 2025 14:22
@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/allow-empty branch from 3a116c1 to f99509f Compare November 12, 2025 14:22
Base automatically changed from szokeasaurusrex/validate-shas to master November 12, 2025 14:30
@szokeasaurusrex szokeasaurusrex merged commit f99509f into master Nov 12, 2025
28 of 49 checks passed
@szokeasaurusrex szokeasaurusrex deleted the szokeasaurusrex/allow-empty branch November 12, 2025 14:30
@runningcode
Copy link
Contributor

Thanks! I'm sure we'll get a bug report one day about clearing the PR number but we can fix it then. It's currently only automatically inferred in Github actions.

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.

Skip serializing certain fields for build upload

4 participants