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

Update ngclient to skip visited nodes on delegation tree traversal #1683

Merged

Conversation

ivanayov
Copy link
Collaborator

This change edits the ngclient Updater to traverse the delegation
tree on nodes, instead of edges in order to skip already visited
nodes.

For more detailed clarification, please review
theupdateframework/specification#177

Fixes #1528

Signed-off-by: Ivana Atanasova iyovcheva@iyovcheva-a02.vmware.com

  • The code follows the Code Style Guidelines
  • [n/a] Tests have been added for the bug fix or new feature
  • [n/a] Docs have been added for the bug fix or new feature

@ivanayov
Copy link
Collaborator Author

Testing the delegation tree traversal requires changes in the implementation that are not related to this change and as a major update of the tests is already in the process of writing, I'm pushing this change relying only on current tests and logic assumptions.

@coveralls
Copy link

coveralls commented Nov 18, 2021

Pull Request Test Coverage Report for Build 1477552793

  • 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 97.463%

Totals Coverage Status
Change from base Build 1476295870: 0.0%
Covered Lines: 3948
Relevant Lines: 4032

💛 - Coveralls

Copy link
Contributor

@sechkova sechkova left a comment

Choose a reason for hiding this comment

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

Unfortunately creating cyclic delegation graphs is not trivial yet both with old and new test code. I've been working on it #1641 ... so I'd say this is ok for now except for my comment below.

tuf/ngclient/updater.py Outdated Show resolved Hide resolved
This change edits the ngclient `Updater` to traverse the delegation
tree on nodes, instead of edges in order to skip already visited
nodes.

For more detailed clarification, please review
theupdateframework/specification#177

Fixes theupdateframework#1528

Signed-off-by: Ivana Atanasova <iyovcheva@iyovcheva-a02.vmware.com>
@ivanayov ivanayov force-pushed the ivanayov/ngclient_skip_visited_roles branch from f5ee005 to aff96c3 Compare November 18, 2021 17:18
@jku jku merged commit fb645f9 into theupdateframework:develop Nov 22, 2021
@lukpueh lukpueh mentioned this pull request Dec 13, 2021
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.

ngclient: skipping visited roles
4 participants