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

util: fix matching multiples in jsontemplate.py #800

Merged
merged 1 commit into from
Jun 8, 2021
Merged

util: fix matching multiples in jsontemplate.py #800

merged 1 commit into from
Jun 8, 2021

Conversation

applejag
Copy link
Contributor

This is my first contribution to quay. I tried my best to follow the CONTRIBUTING.md guide, but I guessed on a lot of things.

Matching multiples caused exceptions to be raised. This made it so webhook notification POST bodies could not template things like the image tags as ${tags[*]}. This was caused by a typo in the jsonpath_rw match field that was used.

I encountered this when trying to use the notification system in quay.io and decided to dig through the code to understand why it didn't work. I did not find a relevant Jira ticket about this, so I just created this PR without a Jira ticket.

Signed-off-by: Kalle Jillheden kalle.jillheden@iver.se

@app-sre-bot
Copy link
Collaborator

Can one of the admins verify this patch?

kleesc
kleesc previously approved these changes Jun 1, 2021
Copy link
Member

@kleesc kleesc left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this. LGTM.

@applejag
Copy link
Contributor Author

applejag commented Jun 3, 2021

I updated to fix the test and commit name (I think). Don't have a ticket ID so I added PROJQUAY-0000

kleesc
kleesc previously approved these changes Jun 7, 2021
Matching multiples caused exceptions to be raised. This made it so
webhook notification POST bodies could not template things like the
image tags as `${tags[*]}`. This was caused by a typo in the jsonpath_rw
match field that was used.

Signed-off-by: Kalle Jillheden <kalle.jillheden@iver.se>
@applejag
Copy link
Contributor Author

applejag commented Jun 7, 2021

I'm super sorry for the failing tests. I've fixed them, yet again.

Copy link
Member

@kleesc kleesc left a comment

Choose a reason for hiding this comment

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

LGTM

@kleesc kleesc merged commit cfd4e8c into quay:master Jun 8, 2021
@applejag applejag deleted the feature/fix-jsontemplate-multiple-match branch June 8, 2021 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants