Skip to content

Conversation

@iamrajjoshi
Copy link
Collaborator

marking the GH validation error for create_external_issue as a halt.

i am following the established raise_error pattern used for other integrations

closes ECO-578

@iamrajjoshi iamrajjoshi self-assigned this Jun 2, 2025
@iamrajjoshi iamrajjoshi requested review from a team as code owners June 2, 2025 23:10
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 2, 2025
@codecov
Copy link

codecov bot commented Jun 2, 2025

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
26117 2 26115 207
View the top 2 failed test(s) by shortest run time
tests.sentry.integrations.github.test_repository.GitHubAppsProviderTest::test_compare_commits_failure
Stack Traces | 1.82s run time
#x1B[1m#x1B[.../shared_integrations/client/base.py#x1B[0m:270: in _request
    resp.raise_for_status()
#x1B[1m#x1B[31m.venv/lib/python3.13.../site-packages/requests/models.py#x1B[0m:1024: in raise_for_status
    raise HTTPError(http_error_msg, response=self)
#x1B[1m#x1B[31mE   requests.exceptions.HTTPError: 502 Server Error: Bad Gateway for url: https://api.github..../example-repo/compare/xyz123...abcdef#x1B[0m

#x1B[33mThe above exception was the direct cause of the following exception:#x1B[0m
#x1B[1m#x1B[.../integrations/github/repository.py#x1B[0m:91: in compare_commits
    return eval_commits(client)
#x1B[1m#x1B[.../integrations/github/repository.py#x1B[0m:73: in eval_commits
    res = client.compare_commits(name, start_sha, end_sha)
#x1B[1m#x1B[.../integrations/github/client.py#x1B[0m:264: in compare_commits
    return self.get_cached(f"/repos/{repo}/compare/{start_sha}...{end_sha}")
#x1B[1m#x1B[.../shared_integrations/client/base.py#x1B[0m:369: in get_cached
    return self._get_cached(path, "GET", *args, **kwargs)
#x1B[1m#x1B[.../shared_integrations/client/base.py#x1B[0m:364: in _get_cached
    result = self.request(method, path, *args, **kwargs)
#x1B[1m#x1B[.../shared_integrations/client/base.py#x1B[0m:333: in request
    return self._request(*args, **kwargs)
#x1B[1m#x1B[.../shared_integrations/client/base.py#x1B[0m:298: in _request
    raise ApiError.from_response(error_resp, url=full_url) from e
#x1B[1m#x1B[31mE   sentry.shared_integrations.exceptions.ApiError#x1B[0m

#x1B[33mDuring handling of the above exception, another exception occurred:#x1B[0m
#x1B[1m#x1B[.../integrations/github/test_repository.py#x1B[0m:178: in test_compare_commits_failure
    self.provider.compare_commits(self.repository, "xyz123", "abcdef")
#x1B[1m#x1B[.../integrations/github/repository.py#x1B[0m:93: in compare_commits
    installation.raise_error(e)
#x1B[1m#x1B[.../integrations/github/issues.py#x1B[0m:36: in raise_error
    if isinstance(exc, ApiError) and exc.json.get("message") in GITHUB_HALT_ERRORS:
#x1B[1m#x1B[31mE   AttributeError: 'NoneType' object has no attribute 'get'#x1B[0m
tests.sentry.integrations.github.test_repository.GitHubAppsProviderTest::test_compare_commits_no_start_failure
Stack Traces | 1.95s run time
#x1B[1m#x1B[.../shared_integrations/client/base.py#x1B[0m:270: in _request
    resp.raise_for_status()
#x1B[1m#x1B[31m.venv/lib/python3.13.../site-packages/requests/models.py#x1B[0m:1024: in raise_for_status
    raise HTTPError(http_error_msg, response=self)
#x1B[1m#x1B[31mE   requests.exceptions.HTTPError: 502 Server Error: Bad Gateway for url: https://api.github..../getsentry/example-repo/commits?sha=abcdef#x1B[0m

#x1B[33mThe above exception was the direct cause of the following exception:#x1B[0m
#x1B[1m#x1B[.../integrations/github/repository.py#x1B[0m:91: in compare_commits
    return eval_commits(client)
#x1B[1m#x1B[.../integrations/github/repository.py#x1B[0m:70: in eval_commits
    res = client.get_last_commits(name, end_sha)
#x1B[1m#x1B[.../integrations/github/client.py#x1B[0m:257: in get_last_commits
    return self.get_cached(f"/repos/{repo}/commits", params={"sha": end_sha})
#x1B[1m#x1B[.../shared_integrations/client/base.py#x1B[0m:369: in get_cached
    return self._get_cached(path, "GET", *args, **kwargs)
#x1B[1m#x1B[.../shared_integrations/client/base.py#x1B[0m:364: in _get_cached
    result = self.request(method, path, *args, **kwargs)
#x1B[1m#x1B[.../shared_integrations/client/base.py#x1B[0m:333: in request
    return self._request(*args, **kwargs)
#x1B[1m#x1B[.../shared_integrations/client/base.py#x1B[0m:298: in _request
    raise ApiError.from_response(error_resp, url=full_url) from e
#x1B[1m#x1B[31mE   sentry.shared_integrations.exceptions.ApiError#x1B[0m

#x1B[33mDuring handling of the above exception, another exception occurred:#x1B[0m
#x1B[1m#x1B[.../integrations/github/test_repository.py#x1B[0m:104: in test_compare_commits_no_start_failure
    self.provider.compare_commits(self.repository, None, "abcdef")
#x1B[1m#x1B[.../integrations/github/repository.py#x1B[0m:93: in compare_commits
    installation.raise_error(e)
#x1B[1m#x1B[.../integrations/github/issues.py#x1B[0m:36: in raise_error
    if isinstance(exc, ApiError) and exc.json.get("message") in GITHUB_HALT_ERRORS:
#x1B[1m#x1B[31mE   AttributeError: 'NoneType' object has no attribute 'get'#x1B[0m

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

@iamrajjoshi iamrajjoshi closed this Jun 3, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Jun 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants