Skip to content

fix: check if repository is available in provenance available check#467

Merged
behnazh-w merged 1 commit into
stagingfrom
fix-prov-check-null-repo
Sep 12, 2023
Merged

fix: check if repository is available in provenance available check#467
behnazh-w merged 1 commit into
stagingfrom
fix-prov-check-null-repo

Conversation

@behnazh-w

Copy link
Copy Markdown
Member

If a repository is not available for an artifact/analysis target identified by a PURL string, the mcn_provenance_available_1 check throws an exception.

This PR fixes this bug by checking if the repository is available before running the check.

@behnazh-w behnazh-w requested a review from nathanwn September 11, 2023 07:14
@behnazh-w behnazh-w requested a review from tromai as a code owner September 11, 2023 07:14
@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Sep 11, 2023
@behnazh-w behnazh-w changed the base branch from fix-purl-processing to staging September 12, 2023 01:53
@behnazh-w behnazh-w force-pushed the fix-prov-check-null-repo branch from 048cd56 to d684c29 Compare September 12, 2023 01:56
Signed-off-by: behnazh-w <behnaz.hassanshahi@oracle.com>
@behnazh-w behnazh-w force-pushed the fix-prov-check-null-repo branch from d684c29 to d80f49a Compare September 12, 2023 02:05

@nathanwn nathanwn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

As we have discussed, I wonder if this issue can be prevented with static type checking. We should revisit this in the future to see if there is a solution that works well with both SQLAlchemy and mypy.

@behnazh-w

Copy link
Copy Markdown
Member Author

As we have discussed, I wonder if this issue can be prevented with static type checking. We should revisit this in the future to see if there is a solution that works well with both SQLAlchemy and mypy.

Yes, it would be nice to enforce type checking on repositories, which can be None in our data model. But that requires some investigation.

@behnazh-w behnazh-w merged commit fae998b into staging Sep 12, 2023
@behnazh-w behnazh-w deleted the fix-prov-check-null-repo branch October 10, 2023 03:41
art1f1c3R pushed a commit that referenced this pull request Nov 29, 2024
…467)

If a repository is not available for an artifact/analysis target identified by a PURL string, the `mcn_provenance_available_1` check throws an exception.

This PR fixes this bug by checking if the repository is available before running the check.

Signed-off-by: behnazh-w <behnaz.hassanshahi@oracle.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants