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 incorrect regex for matching curated package registry URL #7049

Merged
merged 1 commit into from Nov 15, 2023

Conversation

chrisdoherty4
Copy link
Member

@chrisdoherty4 chrisdoherty4 commented Nov 13, 2023

Related to https://github.com/aws/eks-anywhere/security/code-scanning/4.

Registry mirror configuration using namespaced registries requires users to specify the curated packages registry.

We have special handling for the curated packages URL and identify URLs of any region using regex. However, the regex was incorrect and matched invalid URLs such as 783794618700&dkr&ecr&amazonaws&com. This is because the string is also used in containerd config that supports wildcard matching (as used in the string).

This change separates regex uses from containerd uses ensuring we correctly match curated packages URLs.

@eks-distro-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from chrisdoherty4. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@eks-distro-bot eks-distro-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Nov 13, 2023
@eks-distro-bot eks-distro-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 14, 2023
Copy link

codecov bot commented Nov 14, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (d297a3b) 71.47% compared to head (a6034bc) 71.47%.

Files Patch % Lines
cmd/eksctl-anywhere/cmd/import_images.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7049   +/-   ##
=======================================
  Coverage   71.47%   71.47%           
=======================================
  Files         538      538           
  Lines       41882    41882           
=======================================
  Hits        29934    29934           
  Misses      10270    10270           
  Partials     1678     1678           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@chrisdoherty4
Copy link
Member Author

/cherry-pick release-0.18

@eks-distro-pr-bot
Copy link
Contributor

@chrisdoherty4: once the present PR merges, I will cherry-pick it on top of release-0.18 in a new PR and assign it to you.

In response to this:

/cherry-pick release-0.18

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@rahulbabu95
Copy link
Member

/lgtm

@chrisdoherty4 chrisdoherty4 merged commit d1cbcad into aws:main Nov 15, 2023
10 of 12 checks passed
@chrisdoherty4 chrisdoherty4 deleted the patch/invalid-regex branch November 15, 2023 01:52
@eks-distro-pr-bot
Copy link
Contributor

@chrisdoherty4: new pull request created: #7053

In response to this:

/cherry-pick release-0.18

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants