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

fix: race condition for signed versioned artifacts #932

Merged
merged 2 commits into from
Sep 12, 2023

Conversation

rdimitrov
Copy link
Member

The following PR fixes a race condition happening depending on the order of receiving events for signed versioned artifacts. The result was a never ending loop trying to process the artifact publish event.

Marking as draft since it was created during debugging with Jakub. It will be converted once we agree on the solution.

@rdimitrov rdimitrov added bug Something isn't working go Pull requests that update Go code labels Sep 11, 2023
@rdimitrov rdimitrov marked this pull request as draft September 11, 2023 22:03
Copy link
Contributor

@jhrozek jhrozek left a comment

Choose a reason for hiding this comment

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

I won't ack this patch because we wrote it in a pairing session with Rado, so someone else should click the review button

@rdimitrov rdimitrov marked this pull request as ready for review September 12, 2023 06:57
Copy link
Contributor

@JAORMX JAORMX left a comment

Choose a reason for hiding this comment

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

Is there any way we could add a test for this?

@jhrozek
Copy link
Contributor

jhrozek commented Sep 12, 2023

yes, we should add a test in general for the artifact webhook like we have for the repo webhook. Note that this might involve mocking the APIs to get the signatures which currently call out to rekor.

@rdimitrov
Copy link
Member Author

I'll give it a go 👍

JAORMX
JAORMX previously approved these changes Sep 12, 2023
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
@rdimitrov rdimitrov merged commit 490abf4 into mindersec:main Sep 12, 2023
12 checks passed
@rdimitrov rdimitrov deleted the race-condition branch September 12, 2023 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants