Skip to content

fix: name matcher to match generate names as well#2841

Merged
sozercan merged 2 commits into
open-policy-agent:masterfrom
JaydipGabani:namesMatch
Jul 7, 2023
Merged

fix: name matcher to match generate names as well#2841
sozercan merged 2 commits into
open-policy-agent:masterfrom
JaydipGabani:namesMatch

Conversation

@JaydipGabani
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

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

@codecov-commenter
Copy link
Copy Markdown

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.

Comment thread pkg/mutation/match/match.go Outdated
Copy link
Copy Markdown
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

Comment thread pkg/util/wildcard.go Outdated
@sozercan
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

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

Copy link
Copy Markdown
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
Copy Markdown
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