Skip to content

Conversation

@DaveTryon
Copy link
Contributor

If a config file is used, it is possible to pass in a request for a manifest type that we don't support. When this happens, the code throws an exception in SbomGenerationWorkflow.GenerateAsync(). This PR uses a TryGet pattern to more gracefully detect this situation and display a warning so the caller can decide to fix it if they want. It also adds code to return false if none of manifest types in the config file are supported. Unit tests cover both supported and unsupported manifest types.

@DaveTryon DaveTryon requested a review from a team as a code owner May 3, 2025 00:16
@DaveTryon
Copy link
Contributor Author

/azp run

@DaveTryon
Copy link
Contributor Author

/azp run

@github-actions
Copy link

github-actions bot commented May 5, 2025

This PR changes files in the API project. Does it change any of the API interfaces in any way? Please note that this includes the following types of changes:

  • Changing the signature of an existing interface method
  • Adding a new method to an existing interface
  • Adding a required data member to a class that an existing interface method consumes

Because any of these changes can potentially break a downstream consumer with customized interface implementations, these changes need to be treated as breaking changes. Please do one of the following:

Option 1 - Publish this as a breaking change

  1. Update the documentation to show the new functionality
  2. Bump the major version in the next release
  3. Be sure to highlight the breaking changes in the release notes

Option 2 - Refactor the changes to be non-breaking

  1. Review this commit, which adds a new interface in a backward-compatible way
  2. Refactor the change to follow this pattern so that existing interfaces are left completely intact
  3. Bump the minor version in the next release

@microsoft microsoft deleted a comment from github-actions bot May 5, 2025
@microsoft microsoft deleted a comment from github-actions bot May 5, 2025
@DaveTryon
Copy link
Contributor Author

/azp run

@DaveTryon DaveTryon merged commit 6fdf28d into main May 5, 2025
5 checks passed
@DaveTryon DaveTryon deleted the DaveTryon/better-handling-of-unknown-manifest-types branch May 5, 2025 19:41
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.

3 participants