Skip to content
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

Adjust to removals from securesystemslib #855

Merged
merged 1 commit into from
Sep 17, 2019

Conversation

awwad
Copy link
Contributor

@awwad awwad commented Apr 16, 2019

Removal of securesystemslib exceptions that are TUF-specific occurs in securesystemslib PR #165.

This PR adapts to those changes. Exceptions that are specific to TUF should be in TUF and not in securesystemslib. This commit uses those already-existing TUF exceptions instead of pointing to securesystemslib exceptions that will be removed.

For example, securesystemslib has no notion of repositories, so it's clearly wrong to have a RepositoryError in securesystemslib and clearly wrong for TUF to use securesystemslib.exceptions.RepositoryError.

  • The code follows the Code Style Guidelines
  • Tests have been added for the bug fix or new feature
  • Docs have been added for the bug fix or new feature

Removal of securesystemslib exceptions that are TUF-specific
occurs in securesystemslib PR #165
secure-systems-lab/securesystemslib#165

This commit adapts to those changes.  Exceptions that are specific
to TUF should be in TUF and not in securesystemslib.  This commit
uses those already-existing TUF exceptions instead of pointing to
securesystemslib exceptions that will be removed.

For example, securesystemslib has no notion of repositories, so
it's ridiculous to have a RepositoryError in securesystemslib and
ridiculous for TUF to use
securesystemslib.exceptions.RepositoryError.

Signed-off-by: Sebastien Awwad <[email protected]>
@lukpueh lukpueh force-pushed the adjust_to_removals_from_securesystemslib branch from 0b592b9 to a9d7053 Compare September 17, 2019 09:21
Copy link
Member

@lukpueh lukpueh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After rebasing to solve a minor docstring conflict this PR looks good to me:

secure-systems-lab/securesystemslib#165 removed the following custom error classes from securesystemslib as TUF-specific:
BadVersionNumberError, DownloadError, ExpiredMetadataError, ForbiddenTargetError, InsufficientKeysError, KeyAlreadyExistsError, RepositoryError, RoleAlreadyExistsError, UnknownKeyError, UnknownRoleError, UnknownTargetError

All these error classes already existed in tuf.exceptions, and were either already used from there:
DownloadError, ExpiredMetadataError, ForbiddenTargetError, RoleAlreadyExistsError
... or are now (with this PR):
BadVersionNumberError, InsufficientKeysError, KeyAlreadyExistsError, RepositoryError, UnknownKeyError, UnknownRoleError, UnknownTargetError

@lukpueh lukpueh merged commit 6a145d0 into develop Sep 17, 2019
trishankatdatadog added a commit to theupdateframework/specification that referenced this pull request Oct 3, 2019
@trishankatdatadog trishankatdatadog deleted the adjust_to_removals_from_securesystemslib branch November 5, 2019 15:52
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.

2 participants