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: name matcher to match generate names as well #2841

Merged
merged 2 commits into from
Jul 7, 2023

Conversation

JaydipGabani
Copy link
Contributor

What this PR does / why we need it: namesMatch fails to return true with the objects that have generateName set instead of name.

Which issue(s) this PR fixes (optional, using fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when the PR gets merged):
Fixes #2832

Special notes for your reviewer:

@JaydipGabani
Copy link
Contributor Author

@maxsmythe @ritazh @sozercan Please take a look when you get a chance

@codecov-commenter
Copy link

codecov-commenter commented Jun 20, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.02 🎉

Comparison is base (1878de1) 53.49% compared to head (f7b5444) 53.52%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2841      +/-   ##
==========================================
+ Coverage   53.49%   53.52%   +0.02%     
==========================================
  Files         133      133              
  Lines       11536    11545       +9     
==========================================
+ Hits         6171     6179       +8     
- Misses       4887     4888       +1     
  Partials      478      478              
Flag Coverage Δ
unittests 53.52% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/mutation/match/match.go 96.61% <100.00%> (ø)
pkg/wildcard/wildcard.go 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@maxsmythe maxsmythe left a comment

Choose a reason for hiding this comment

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

LGTM after nit fix

pkg/util/wildcard.go Outdated Show resolved Hide resolved
@sozercan
Copy link
Member

sozercan commented Jul 5, 2023

@JaydipGabani looks like there are some conflicts due to #2853 being merged, can you ptal

Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
@JaydipGabani
Copy link
Contributor Author

@sozercan @maxsmythe PTAL, resolved the merge conflict and nit.

Copy link
Contributor

@maxsmythe maxsmythe left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@sozercan sozercan left a comment

Choose a reason for hiding this comment

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

Thanks! LGTM

@sozercan sozercan merged commit 6c38e80 into open-policy-agent:master Jul 7, 2023
@ritazh ritazh added this to the v3.13.0 milestone Jul 12, 2023
@JaydipGabani JaydipGabani deleted the namesMatch branch October 31, 2023 21:46
dhaiducek pushed a commit to dhaiducek/gatekeeper that referenced this pull request Jan 15, 2024
dhaiducek pushed a commit to dhaiducek/gatekeeper that referenced this pull request Jan 15, 2024
…2841)

ref: https://issues.redhat.com/browse/ACM-9430
Signed-off-by: Dale Haiducek <19750917+dhaiducek@users.noreply.github.com>
openshift-merge-bot bot pushed a commit to stolostron/gatekeeper that referenced this pull request Jan 16, 2024
…2841)

ref: https://issues.redhat.com/browse/ACM-9430
Signed-off-by: Dale Haiducek <19750917+dhaiducek@users.noreply.github.com>
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.

AssignMetadata.spec.match.name might be broken
5 participants