Skip to content

fix: validate git service for create-report-results - #750

Open
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/report-results-git-service-validation
Open

fix: validate git service for create-report-results#750
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/report-results-git-service-validation

Conversation

@sentry

@sentry sentry Bot commented Aug 2, 2026

Copy link
Copy Markdown

This PR addresses an issue where the create-report-results command could send None as the git service to the Codecov API, resulting in a 400 Bad Request error due to API-side validation.

Root Cause:
In older CLI versions (e.g., v10.4.0), when the --git-service flag was not provided and the CI environment could not auto-detect the service, the Python None value for git_service was directly interpolated into the API request URL as the string "None". The API would then reject this invalid service value.

Solution:
An early validation guard has been added to the create_report_results_logic function. If the service parameter is None or empty, it now explicitly calls validate_upload_service(""). This leverages the existing client-side validation logic in upload_url_validation.py to immediately raise a click.ClickException with a clear, user-friendly message (e.g., "Upload service is missing...") before any network request is made. This prevents invalid API calls and provides better feedback to the user.

This change ensures that the CLI fails fast and informatively when the git service is missing for create-report-results.

Fixes CLI-FX

@codecov

codecov Bot commented Aug 2, 2026

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
723 1 722 1
View the full list of 1 ❄️ flaky test(s)
api.temp.calculator.test_calculator::test_divide

Flake rate in main: 100.00% (Passed 0 times, Failed 1625 times)

Stack Traces | 0.001s run time
def
                test_divide():
                > assert Calculator.divide(1, 2) == 0.5
                E assert 1.0 == 0.5
                E + where 1.0 = <function Calculator.divide at 0x104c9eb90>(1, 2)
                E + where <function Calculator.divide at 0x104c9eb90> = Calculator.divide
                .../temp/calculator/test_calculator.py:30: AssertionError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

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.

0 participants