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

Fallback build details project #69

Merged
merged 13 commits into from
Oct 20, 2022
Merged

Conversation

thepwagner
Copy link
Collaborator

@thepwagner thepwagner commented Oct 14, 2022

This is cherry-picking @rxbchen and @chrisshino 's work in Shopify#16 onto the current grafeas/voucher: I ran git cherry-pick dab0b6902f2542ada0f6cede2c962866c5d7b1ef^..0935f52c7f2c0f735d9c102b136ff9b1c476a4cc, then biased towards "incoming changes" to resolve conflicts.

In #47 (comment) , Shopify made a nasty hack and forked Voucher to avoid polluting upstream. We'd like to finish that work correctly, so this is part of the housekeeping to bring the branches closer.


What?

Added a new configuration that allows user to configure a fallback project for when build metadata is not found in the same project as the image.

Why?

This addresses the issue where an image and it's corresponding build metadata lives in different GCP projects causing excessive warning logs to be emitted

How?

This is done by adding a configuration:

[containeranalysis]
build_detail_fallback_project = "project_name"

If this field is not empty, we will attempt to get image build metadata from there when any error occurs

Checklist

Before Merging

  • I have 🎩'd this locally
    • If this is complex to 🎩, I have provided instructions for others
  • I have requested reviews or pinged the relevant persons/teams

@thepwagner thepwagner requested a review from rxbchen October 14, 2022 13:46
@thepwagner thepwagner self-assigned this Oct 14, 2022
Copy link
Collaborator

@lynnsh lynnsh left a comment

Choose a reason for hiding this comment

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

LGTM!

@thepwagner thepwagner merged commit 25c7187 into main Oct 20, 2022
@thepwagner thepwagner deleted the fallback-build-details-project branch October 20, 2022 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants