Skip to content

fix: prevent ValueError when slug is missing with --handle-no-reports-found - #747

Open
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/cli-ft-invalid-slug
Open

fix: prevent ValueError when slug is missing with --handle-no-reports-found#747
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/cli-ft-invalid-slug

Conversation

@sentry

@sentry sentry Bot commented Aug 2, 2026

Copy link
Copy Markdown

This PR addresses an issue where the CLI would crash with a ValueError: The provided slug is invalid when do-upload was called with --handle-no-reports-found enabled, but no --slug argument was provided.

The root cause was that when no coverage reports were found, the do_upload_logic function would attempt to call upload_completion_logic to trigger notifications, passing slug=None. The encode_slug function, called by upload_completion_logic, does not handle None gracefully and raises a ValueError.

The fix introduces a check in do_upload_logic to ensure that slug is not None before attempting to call upload_completion_logic in the --handle-no-reports-found fallback path. If slug is None, a warning is logged, and the upload completion step is skipped, preventing the crash and providing a more informative output to the user.

Fixes CLI-FT

@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