-
-
Notifications
You must be signed in to change notification settings - Fork 239
fix: Ensure --url argument is globally available for all commands
#3108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: szokeasaurusrex/test-fix
Are you sure you want to change the base?
fix: Ensure --url argument is globally available for all commands
#3108
Conversation
7128127 to
839222f
Compare
The --url argument was not recognized by the dart-symbol-map command because it was missing from the derive parser schema. Added the url field to the SentryCLI struct to allow global --url usage. Also updated the legacy parser to mark --url as global for consistency with other global arguments. Fixes #3106 Co-Authored-By: Claude <[email protected]>
839222f to
028e3bb
Compare
--url argument is globally available for all commands
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| .subcommand_required(true) | ||
| .arg_required_else_help(true) | ||
| .arg(Arg::new("url").value_name("URL").long("url").help( | ||
| .arg(Arg::new("url").value_name("URL").long("url").global(true).help( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Global --url option conflicts with command-specific --url options
High Severity
Adding .global(true) to the app-level --url argument causes it to capture values that were previously intended for command-specific --url options. Commands like releases new, releases finalize, and deploys new have their own --url argument for setting release/deployment URLs (not the Sentry server URL). The test change shows that sentry-cli releases new --url https://oh.rly now attempts to connect to oh.rly as the Sentry server instead of using it as the release's informational URL. This breaks existing workflows where users specify a release URL.
Additional Locations (1)
| "data": {} | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused test fixture file added to repository
Low Severity
The file tests/integration/_responses/dart_symbol_map/assemble-success.json is added but never referenced anywhere in the test code. The new test command_upload_dart_symbol_map_with_custom_url uses inline serde_json::json! responses and with_response_fn, not with_response_file with this fixture. The checksum in this file (08978d44d46a9c3c0dab8f7aabc46c68) also differs from the checksum used in the test (6aa44eb08e4a72d1cf32fe7c2504216fb1a3e862), confirming it's unrelated dead code.
Description
The
--urlglobal argument was not recognized by thedart-symbol-mapcommand because it was missing from the derive parser schema. This fix adds theurlfield to theSentryCLIstruct in the derive parser, allowing global--urlusage with the command.Additionally, updated the legacy parser to mark
--urlas.global(true)for consistency with other global arguments like--auth-token,--headers, and--log-level. This change is the reason why many of the help text trycmd expected outputs are changing here.Issues