Skip to content

fix: handle missing slug in send-notifications command - #752

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

fix: handle missing slug in send-notifications command#752
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/cli-fy-missing-slug

Conversation

@sentry

@sentry sentry Bot commented Aug 3, 2026

Copy link
Copy Markdown

This PR addresses an issue where the send-notifications command would raise a ValueError: The provided slug is invalid if the --slug option was not explicitly provided and the slug could not be auto-detected from CI environment variables.

Previously, a None or empty slug value was passed directly to encode_slug(), which would then raise a generic ValueError.

The fix introduces a check for a missing slug within the upload_completion_logic function (which send-notifications calls). If the slug is missing:

  • A clear, actionable error message is logged, guiding the user to either provide --slug owner/repo or ensure their CI environment variables are correctly set for auto-detection.
  • If fail_on_error is True, a ValueError with the same descriptive message is raised, causing a clean failure.
  • If fail_on_error is False, the error is logged, and the function returns None gracefully, preventing an unhandled exception.

Fixes CLI-FY

@codecov

codecov Bot commented Aug 3, 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