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

metadata API: Constants for top-level rolenames #1648

Closed
lukpueh opened this issue Oct 28, 2021 · 1 comment · Fixed by #1672
Closed

metadata API: Constants for top-level rolenames #1648

lukpueh opened this issue Oct 28, 2021 · 1 comment · Fixed by #1672
Assignees
Labels
backlog Issues to address with priority for current development goals good first issue Bite-sized items for first time contributors
Milestone

Comments

@lukpueh
Copy link
Member

lukpueh commented Oct 28, 2021

Description of issue or feature request:

Top-level role names - "root", "timestamp", "snapshot" and "targets" - are hardcoded throughout the code base. Good coding practice suggests to create constants for these and use them instead.

See

grep -rE  [\"\']\(root\|targets\|snapshot\|timestamp\)[\"\'] tuf/api/ tuf/ngclient/

Current behavior:

  • Top-level role names are hardcoded

Expected behavior:

  • Constants for top-level role names are defined in tuf/api/metadata.py and
  • Constants are used in TUF 1.0-bound code, that is at least in tuf/api/* and tuf/ngclient/* and probably any new test modules.
@lukpueh lukpueh added the good first issue Bite-sized items for first time contributors label Oct 28, 2021
@sechkova sechkova added the backlog Issues to address with priority for current development goals label Nov 10, 2021
@ivanayov
Copy link
Collaborator

I'd like to work on that, please.

ivanayov pushed a commit to ivanayov/python-tuf that referenced this issue Nov 12, 2021
This is a change in the metadata API to remove hardcoded rolenames
and use constants instead.
Adresses theupdateframework#1648

Signed-off-by: Ivana Atanasova <iyovcheva@iyovcheva-a02.vmware.com>
ivanayov pushed a commit to ivanayov/python-tuf that referenced this issue Nov 12, 2021
This applies the use of constants of top-level rolenames in the
tests instead of the previously hardcoded strings.
Addresses theupdateframework#1648

Signed-off-by: Ivana Atanasova <iyovcheva@iyovcheva-a02.vmware.com>
ivanayov pushed a commit to ivanayov/python-tuf that referenced this issue Nov 12, 2021
This is a change in the metadata API to remove hardcoded rolenames
and use constants instead.
Adresses theupdateframework#1648

Signed-off-by: Ivana Atanasova <iyovcheva@iyovcheva-a02.vmware.com>
ivanayov pushed a commit to ivanayov/python-tuf that referenced this issue Nov 12, 2021
This applies the use of constants of top-level rolenames in the
tests instead of the previously hardcoded strings.
Addresses theupdateframework#1648

Signed-off-by: Ivana Atanasova <iyovcheva@iyovcheva-a02.vmware.com>
ivanayov pushed a commit to ivanayov/python-tuf that referenced this issue Nov 12, 2021
This is a change in the metadata API to remove hardcoded rolenames
and use constants instead.
Adresses theupdateframework#1648

Signed-off-by: Ivana Atanasova <iyovcheva@iyovcheva-a02.vmware.com>
ivanayov pushed a commit to ivanayov/python-tuf that referenced this issue Nov 12, 2021
This applies the use of constants of top-level rolenames in the
tests instead of the previously hardcoded strings.
Addresses theupdateframework#1648

Signed-off-by: Ivana Atanasova <iyovcheva@iyovcheva-a02.vmware.com>
ivanayov pushed a commit to ivanayov/python-tuf that referenced this issue Nov 12, 2021
This applies the use of constants of top-level rolenames in the
tests instead of the previously hardcoded strings.
Addresses theupdateframework#1648

Signed-off-by: Ivana Atanasova <iyovcheva@iyovcheva-a02.vmware.com>
ivanayov pushed a commit to ivanayov/python-tuf that referenced this issue Nov 17, 2021
This is a change in the metadata API to remove hardcoded rolenames
and use constants instead.
Fixes theupdateframework#1648

Signed-off-by: Ivana Atanasova <iyovcheva@iyovcheva-a02.vmware.com>
ivanayov pushed a commit to ivanayov/python-tuf that referenced this issue Nov 17, 2021
This applies the use of constants of top-level rolenames in the
tests instead of the previously hardcoded strings.
Fixes theupdateframework#1648

Signed-off-by: Ivana Atanasova <iyovcheva@iyovcheva-a02.vmware.com>
ivanayov pushed a commit to ivanayov/python-tuf that referenced this issue Nov 22, 2021
This is a change in the metadata API to remove hardcoded rolenames
and use constants instead.
Fixes theupdateframework#1648

Signed-off-by: Ivana Atanasova <iyovcheva@iyovcheva-a02.vmware.com>
ivanayov pushed a commit to ivanayov/python-tuf that referenced this issue Nov 22, 2021
This applies the use of constants of top-level rolenames in the
tests instead of the previously hardcoded strings.
Fixes theupdateframework#1648

Signed-off-by: Ivana Atanasova <iyovcheva@iyovcheva-a02.vmware.com>
@sechkova sechkova added this to the Sprint 13 milestone Nov 24, 2021
ivanayov pushed a commit to ivanayov/python-tuf that referenced this issue Nov 25, 2021
This is a change in the metadata API to remove hardcoded rolenames
and use constants instead.
Fixes theupdateframework#1648

Signed-off-by: Ivana Atanasova <iyovcheva@iyovcheva-a02.vmware.com>
ivanayov pushed a commit to ivanayov/python-tuf that referenced this issue Nov 25, 2021
This applies the use of constants of top-level rolenames in the
tests instead of the previously hardcoded strings.
Fixes theupdateframework#1648

Signed-off-by: Ivana Atanasova <iyovcheva@iyovcheva-a02.vmware.com>
ivanayov pushed a commit to ivanayov/python-tuf that referenced this issue Dec 2, 2021
This is a change in the metadata API to remove hardcoded rolenames
and use constants instead.
Fixes theupdateframework#1648

Signed-off-by: Ivana Atanasova <iyovcheva@iyovcheva-a02.vmware.com>
ivanayov pushed a commit to ivanayov/python-tuf that referenced this issue Dec 2, 2021
This applies the use of constants of top-level rolenames in the
tests instead of the previously hardcoded strings.
Fixes theupdateframework#1648

Signed-off-by: Ivana Atanasova <iyovcheva@iyovcheva-a02.vmware.com>
@jku jku closed this as completed in #1672 Dec 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Issues to address with priority for current development goals good first issue Bite-sized items for first time contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants