Skip to content

Conversation

@lmphil
Copy link
Contributor

@lmphil lmphil commented Aug 14, 2024

Pull Request

Description

This change adds support for SBOM aliases and tags.

The following commands have been added:

  1. alias set
  2. alias remove
  3. alias list
  4. tag clear
  5. tag add
  6. tag remove
  7. tag list

The following options were added to the fetch command:

  1. alias
  2. tag

The following options were added to the import command:

  1. alias
  2. tag

The following option was added to the list command:

  1. tag

The following option was added to the merge command:

  1. alias
  2. tag

Additionally, the export, list, fetch, merge, and push commands were modified to also use aliases as IDs.

Fixes #65

Type of change

  • [ x] New feature (non-breaking change which adds functionality)
  • [ x] This change requires a documentation update

How Has This Been Tested?

Manually tested each command with different input.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Signed-off-by: Philippe <philippe.a.aviles@lmco.com>
lmphil added 3 commits August 15, 2024 21:30
Signed-off-by: Philippe <philippe.a.aviles@lmco.com>
Signed-off-by: Philippe <philippe.a.aviles@lmco.com>
Signed-off-by: Philippe <philippe.a.aviles@lmco.com>
@jhoward-lm
Copy link
Contributor

jhoward-lm commented Aug 22, 2024

Please change PR title to start with feat: to work with changelog generation

@lmphil lmphil changed the title SBOM Aliases Feat: SBOM Aliases Aug 22, 2024
lmphil added 2 commits August 22, 2024 14:02
Signed-off-by: Philippe <philippe.a.aviles@lmco.com>
…aliases

Signed-off-by: Philippe <philippe.a.aviles@lmco.com>
@lmphil lmphil changed the title Feat: SBOM Aliases feat: SBOM Aliases Aug 22, 2024
lmphil added 11 commits August 22, 2024 16:22
Signed-off-by: Philippe <philippe.a.aviles@lmco.com>
Signed-off-by: Philippe <philippe.a.aviles@lmco.com>
Signed-off-by: Philippe <philippe.a.aviles@lmco.com>
Signed-off-by: Philippe <philippe.a.aviles@lmco.com>
Signed-off-by: Philippe <philippe.a.aviles@lmco.com>
Signed-off-by: Philippe <philippe.a.aviles@lmco.com>
Signed-off-by: Philippe <philippe.a.aviles@lmco.com>
Signed-off-by: Philippe <philippe.a.aviles@lmco.com>
Signed-off-by: Philippe <philippe.a.aviles@lmco.com>
Signed-off-by: Philippe <philippe.a.aviles@lmco.com>
Signed-off-by: Philippe <philippe.a.aviles@lmco.com>
lmphil added 2 commits August 27, 2024 11:32
Signed-off-by: Philippe <philippe.a.aviles@lmco.com>
Signed-off-by: Philippe <philippe.a.aviles@lmco.com>
@jhoward-lm
Copy link
Contributor

jhoward-lm commented Sep 1, 2024

With upcoming changes to protobom/storage and #68, let's add constants in db.go such as

const (
    BomctlAnnotationAlias string = "bomctl_annotation_alias"
    BomctlAnnotationLabel string = "bomctl_annotation_label"
)

@idunbarh
Copy link
Member

idunbarh commented Sep 4, 2024

Please update the README.md that includes the command instructions.

Signed-off-by: Philippe <philippe.a.aviles@lmco.com>
Signed-off-by: Philippe <philippe.a.aviles@lmco.com>
Signed-off-by: Philippe <philippe.a.aviles@lmco.com>
Signed-off-by: Philippe <philippe.a.aviles@lmco.com>
Signed-off-by: Philippe <philippe.a.aviles@lmco.com>
@lmphil
Copy link
Contributor Author

lmphil commented Sep 12, 2024

In the README.md file, I'm not sure if the "Merge" item in the "Roadmap" section is still needed or if it was fully covered by the PR that added the Merge command.

Signed-off-by: Philippe <philippe.a.aviles@lmco.com>
Signed-off-by: Philippe <philippe.a.aviles@lmco.com>
Signed-off-by: Philippe <philippe.a.aviles@lmco.com>
Copy link
Member

@ashearin ashearin left a comment

Choose a reason for hiding this comment

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

I would like to see the width of bomctl list be dynamic to allow it to show the entirety of the alias, but that is work for a future issue.

@lmphil
Copy link
Contributor Author

lmphil commented Sep 12, 2024

I would like to see the width of bomctl list be dynamic to allow it to show the entirety of the alias, but that is work for a future issue.

I agree. In the meantime, with this change we have an ellipsis as a visual indicator when aliases get truncated inside the list table, and an alias list command that will always display complete aliases and their corresponding document IDs.

Copy link
Contributor

@jhoward-lm jhoward-lm left a comment

Choose a reason for hiding this comment

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

I think we should probably merge #157 first, but in general we need to start putting a blank line between header and package declaration. We also need to come up with a way to translate backslashes to forward slashes in header paths

Signed-off-by: Philippe <philippe.a.aviles@lmco.com>
Signed-off-by: Philippe <philippe.a.aviles@lmco.com>
Signed-off-by: Philippe <philippe.a.aviles@lmco.com>
Signed-off-by: Philippe <philippe.a.aviles@lmco.com>
Copy link
Member

@ashearin ashearin left a comment

Choose a reason for hiding this comment

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

Looks great!

…aliases

Signed-off-by: Philippe <philippe.a.aviles@lmco.com>
Copy link
Contributor

@jhoward-lm jhoward-lm left a comment

Choose a reason for hiding this comment

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

Good work, thanks!

@jhoward-lm jhoward-lm merged commit 45de959 into main Sep 17, 2024
@jhoward-lm jhoward-lm deleted the 65-sbom-aliases branch September 17, 2024 15:28
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.

SBOM Aliases

5 participants