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

Adding a . as a valid character for Modules' name. #969

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

ybettan
Copy link
Contributor

@ybettan ybettan commented Jan 8, 2025

When a Module is deleted, the NMC controller is removing the labels for this Module in the NMC object.

As long as those labels for a specific module exists, the module's finalizer will not be removed upon module deletion and the module will keep hanging forever if deleted.

When a module is created with a . in its name, the created label for NMC doesn't match the expected regexp for this label and, therefore, not removed upon module's deletion.

Adding the . will allow the label to match the regexp, be removed upon deletion and deleting the module gracefully.


/assign @yevgeny-shnaidman
/cc @TomerNewman
Fixes #967

@k8s-ci-robot
Copy link
Contributor

@ybettan: GitHub didn't allow me to request PR reviews from the following users: TomerNewman.

Note that only kubernetes-sigs members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

When a Module is deleted, the NMC controller is removing the labels for this Module in the NMC object.

As long as those labels for a specific module exists, the module's finalizer will not be removed upon module deletion and the module will keep hanging forever if deleted.

When a module is created with a . in its name, the created label for NMC doesn't match the expected regexp for this label and, therefore, not removed upon module's deletion.

Adding the . will allow the label to match the regexp, be removed upon deletion and deleting the module gracefully.


/assign @yevgeny-shnaidman
/cc @TomerNewman
Fixes #967

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-sigs/prow repository.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ybettan

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

The pull request process is described 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

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 8, 2025
Copy link

netlify bot commented Jan 8, 2025

Deploy Preview for kubernetes-sigs-kmm ready!

Name Link
🔨 Latest commit 0b6d54d
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kmm/deploys/677fba505cf2fa0008b8008c
😎 Deploy Preview https://deploy-preview-969--kubernetes-sigs-kmm.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@codecov-commenter
Copy link

codecov-commenter commented Jan 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.68%. Comparing base (fa23a9b) to head (0b6d54d).
Report is 169 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #969      +/-   ##
==========================================
- Coverage   79.09%   72.68%   -6.42%     
==========================================
  Files          51       65      +14     
  Lines        5109     5762     +653     
==========================================
+ Hits         4041     4188     +147     
- Misses        882     1395     +513     
+ Partials      186      179       -7     

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

@yevgeny-shnaidman
Copy link
Contributor

looks good, but lets add unit-test that verify the new regex

@ybettan ybettan force-pushed the dot-in-module-name branch from a45b8fc to 2f98ec0 Compare January 9, 2025 07:38
@k8s-ci-robot k8s-ci-robot removed the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jan 9, 2025
@ybettan
Copy link
Contributor Author

ybettan commented Jan 9, 2025

looks good, but lets add unit-test that verify the new regex

Good catch :)
Done.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 9, 2025
@ybettan ybettan force-pushed the dot-in-module-name branch 2 times, most recently from 23394f2 to 8c28344 Compare January 9, 2025 11:59
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 9, 2025
When a `Module` is deleted, the `NMC` controller is removing the labels
for this `Module` in the `NMC` object.

As long as those labels for a specific module exists, the module's
finalizer will not be removed upon module deletion and the module will
keep hanging forever if deleted.

When a module is created with a `.` in its name, the created label for
`NMC` doesn't match the expected regexp for this label and, therefore, not
removed upon module's deletion.

Adding the `.` will allow the label to match the regexp, be removed upon
deletion and deleting the module gracefully.

Signed-off-by: Yoni Bettan <[email protected]>
@ybettan ybettan force-pushed the dot-in-module-name branch from 8c28344 to 0b6d54d Compare January 9, 2025 12:00
@yevgeny-shnaidman
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 9, 2025
@k8s-ci-robot k8s-ci-robot merged commit dadd25e into kubernetes-sigs:main Jan 9, 2025
22 checks passed
@ybettan ybettan deleted the dot-in-module-name branch January 9, 2025 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modules with a '.' in their name can not be deleted
4 participants