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

Refactor CLI code #3317

Merged
merged 4 commits into from
Mar 29, 2019
Merged

Refactor CLI code #3317

merged 4 commits into from
Mar 29, 2019

Conversation

trishankatdatadog
Copy link
Member

What does this PR do?

Refactors CLI code and fixes integration test.

Motivation

Originally wanted to deprecate usage of simple indices in the new downloader, by reading off versions of integrations directly from TUF metadata instead of depending on Python simple indices.

Unfortunately the reference implementation of TUF does not yet support doing this in an elegant and future-proof way. This is because it does not yet allow for the easy and foolproof verification of delegated targets metadata.

Therefore, I have refactored the CLI code to be simpler (by moving code to the more appropriate download module instead). I also fixed the integration test to pick up all known wheels (bug in regex).

Additional Notes

N/A.

Review checklist (to be filled by reviewers)

  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have changelog/ and integration/ labels attached
  • Feature or bugfix must have tests
  • Git history must be clean
  • If PR adds a configuration option, it must be added to the configuration file.

@codecov
Copy link

codecov bot commented Mar 18, 2019

Codecov Report

Merging #3317 into master will decrease coverage by 5.48%.
The diff coverage is 82.92%.

@@            Coverage Diff             @@
##           master    #3317      +/-   ##
==========================================
- Coverage    85.9%   80.42%   -5.49%     
==========================================
  Files         745        8     -737     
  Lines       38692      235   -38457     
  Branches     4563       22    -4541     
==========================================
- Hits        33239      189   -33050     
+ Misses       4179       36    -4143     
+ Partials     1274       10    -1264

zippolyte
zippolyte previously approved these changes Mar 19, 2019
Copy link
Contributor

@zippolyte zippolyte left a comment

Choose a reason for hiding this comment

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

LGTM, changing label to Added since it moves some code around

@zippolyte zippolyte changed the title Refactor CLI code and fix integration test Refactor CLI code Mar 19, 2019
@zippolyte zippolyte merged commit f4b51f0 into master Mar 29, 2019
@zippolyte zippolyte deleted the trishankatdatadog/refactor-cli branch March 29, 2019 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants