-
Notifications
You must be signed in to change notification settings - Fork 136
Failed tasks no longer store traceback. #7065
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
Open
aKlimau
wants to merge
1
commit into
pulp:main
Choose a base branch
from
aKlimau:no-traceback-exception
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Stopped leaking sensitive information of failures in the task API. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,6 +44,18 @@ def exception_to_dict(exc, traceback=None): | |
| return {"description": str(exc), "traceback": traceback} | ||
|
|
||
|
|
||
| class InternalErrorException(PulpException): | ||
| """ | ||
| Exception to signal that an unexpected internal error occurred. | ||
| """ | ||
|
|
||
| def __init__(self): | ||
| super().__init__("PLP0000") | ||
|
|
||
| def __str__(self): | ||
| return _("An internal error occurred.") | ||
|
|
||
|
|
||
| class ResourceImmutableError(PulpException): | ||
| """ | ||
| Exceptions that are raised due to trying to update an immutable resource | ||
|
|
@@ -94,3 +106,73 @@ def __init__(self): | |
|
|
||
| def __str__(self): | ||
| return _("You cannot delete a domain that still contains repositories with content.") | ||
|
|
||
|
|
||
| class DnsDomainNameException(PulpException): | ||
| """ | ||
| Exception to signal that dns could not resolve the domain name for specified url. | ||
| """ | ||
|
|
||
| def __init__(self, url): | ||
| """ | ||
| :param url: the url that dns could not resolve | ||
| :type url: str | ||
| """ | ||
| super().__init__("PLP0008") | ||
| self.url = url | ||
|
|
||
| def __str__(self): | ||
| return _("URL lookup failed.") | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's more leaked data with the other exceptions. |
||
|
|
||
|
|
||
| class UrlSchemeNotSupportedError(PulpException): | ||
| """ | ||
| Exception raised when a URL scheme (e.g. 'ftp://') is provided that | ||
| Pulp does not have a registered handler for. | ||
| """ | ||
|
|
||
| def __init__(self, url): | ||
| """ | ||
| :param url: The full URL that failed validation. | ||
| :type url: str | ||
| """ | ||
| super().__init__("PLP0009") | ||
| self.url = url | ||
|
|
||
| def __str__(self): | ||
| return _("URL: {u} not supported.").format(u=self.url) | ||
|
|
||
|
|
||
| class ProxyAuthenticationRequiredError(PulpException): | ||
| """ | ||
| Exception to signal that the proxy server requires authentication | ||
| but it was not provided or is invalid (HTTP 407). | ||
| """ | ||
|
|
||
| def __init__(self, proxy_url): | ||
| """ | ||
| :param proxy_url: The URL of the proxy server. | ||
| :type proxy_url: str | ||
| """ | ||
| super().__init__("PLP0010") | ||
| self.proxy_url = proxy_url | ||
|
|
||
| def __str__(self): | ||
| return _( | ||
| "Proxy authentication failed for {proxy_url}. Please check your proxy credentials." | ||
| ).format(proxy_url=self.proxy_url) | ||
|
|
||
|
|
||
| class RepositoryVersionDeleteError(PulpException): | ||
| """ | ||
| Raised when attempting to delete a repository version that cannot be deleted | ||
| """ | ||
|
|
||
| def __init__(self): | ||
| super().__init__("PLP0011") | ||
|
|
||
| def __str__(self): | ||
| return _( | ||
| "Cannot delete repository version. Repositories must have at least one " | ||
| "repository version." | ||
| ) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
When you have a chance, could you please squash the commits where it makes sense? Also, if you want to sync the branch with
main, rebasing instead of creating merge commits would help to keep the history clean.