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

Use shorter label namespace #881

Closed
wants to merge 2 commits into from

Conversation

fmuyassarov
Copy link
Member

Fixes: #778

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 1, 2022
@k8s-ci-robot
Copy link
Contributor

Hi @fmuyassarov. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 1, 2022
@fmuyassarov
Copy link
Member Author

/cc @marquiz Sorry to bother again :)

@marquiz
Copy link
Contributor

marquiz commented Sep 6, 2022

@marquiz Sorry to bother again :)

Sorry, haven't had time to concentrate on this. Just some quick thoughts below. The details and corner cases might get hairier than expected.

If we want to do this, I think we need to think about a transition plan from long to short labels. I.e. have a way to not break existing applications. This would probably mean the possibility to have both long and short labels turned on at the same time. Then, after apps have been migrated long labels could be turned off 🤔 Another consideration is that in the code cleaning up old labels we would need to take care about both the long and short labels (I think). And the (still experimental) extended resources should be handled, too.

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 6, 2022
@fmuyassarov
Copy link
Member Author

fmuyassarov commented Sep 7, 2022

This is a breaking change, and usually in k8s for such a change it takes ~3-4 releases to remove a feature. Example: rename "node-role.kubernetes.io/master" node-role.kubernetes.io/master label & taint renaming in Kubeadm, they had both labels in parallel that gave time to users to switch to the new format. And perhaps we can follow the same path?

For example,

Release - v0.12.X

  1. introduce a short label and a flag to switch between long and short labels
  2. set the flag to use long label by default
  3. announce to community/users to adapt to use the short label
  4. get community/users feedback

Release - v0.13.X

  1. turn on both short and long labels by default but still have an option to disable them
  2. get community/users feedback

Release - v0.14.X

  1. Turn off long label by default but still have an option to enable it

Release - v0.15.X

  1. Remove the long label entirely from the codebase and keep only short label
  2. Remove the flag to switch between short and long labels

I'm not sure about the estimated time between MINOR releases in NFD project, but if you think it is too short that we take above steps in every MINOR release, then of course we can extend it. And actually better if we get users feedback on that.

@marquiz
Copy link
Contributor

marquiz commented Sep 7, 2022

Release - v0.12.X

  1. introduce a short label and a flag to switch between long and short labels
  2. set the flag to use long label by default
  3. announce to community/users to adapt to use the short label
  4. get community/users feedback

Release - v0.13.X

  1. turn on both short and long labels by default but still have an option to disable them
  2. get community/users feedback

Release - v0.14.X

  1. Turn off long label by default but still have an option to enable it

Release - v0.15.X

  1. Remove the long label entirely from the codebase and keep only short label
  2. Remove the flag to switch between short and long labels

I'm not sure about the estimated time between MINOR releases in NFD project, but if you think it is too short that we take above steps in every MINOR release, then of course we can extend it. And actually better if we get users feedback on that.

Yeah, along those lines, I guess. I had something similar in my mind. Do transition over several releases and we can also back off if it turns out to be too much of an hassle 😅

@netlify
Copy link

netlify bot commented Oct 3, 2022

Deploy Preview for kubernetes-sigs-nfd ready!

Name Link
🔨 Latest commit 18ef4e7
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-nfd/deploys/634e8a2acbdc4c000887ec30
😎 Deploy Preview https://deploy-preview-881--kubernetes-sigs-nfd.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 settings.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 6, 2022
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 14, 2022
@fmuyassarov
Copy link
Member Author

Rebased

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: fmuyassarov
Once this PR has been reviewed and has the lgtm label, please assign marquiz for approval by writing /assign @marquiz in a comment. 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

Copy link
Contributor

@marquiz marquiz left a comment

Choose a reason for hiding this comment

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

Thanks @fmuyassarov for working on this.

I think there's more things to do here. At least:

  1. Deletion of labels: labels created by NFD are stored in the feature-labels annotation. When deleting old labels we must delete labels from both the long and short ns.
  2. Allowed namespaces: both the long and short should be allowed independent of what is enabled for the default labels. People might have rules creating labels in the old namespace and we don't want to break those. Don't know if we should have some automation to convert/duplicate those into the shorter ns version 🤔
  3. I think we need a bit more documentation, even at this phase. E.g. some notes in the docs where feature.node.kubernetes.io namespace is mentioned in the docs (like docs/get-started/features.md)

Comment on lines +110 to +111
flagset.StringVar(&args.NsFormat, "label-ns", "legacy",
"Feature label namespace format. By default set to legacy.")
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we need the possibility to have both short and long turned on at the same time 🤔

One option is to make this flag tri-state, i.e. smth like -label-ns={legacy,short,both}. If keeping the flag as string parameter we need to do input validation of it.

Another way could be having separate bool flags, i.e. smth like -label-ns-legacy and -label-ns-short. In this case we probably want to check that at least one of them is turned on.

Comment on lines +63 to +64
// ProfileLabelNs is the namespace for profile labels
ProfileLabelNs = "profile.node.kubernetes.io"
Copy link
Contributor

Choose a reason for hiding this comment

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

The profile ns should switch to a shorter version, too

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 3, 2022
@k8s-ci-robot
Copy link
Contributor

@fmuyassarov: PR needs rebase.

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.

@ArangoGutierrez
Copy link
Contributor

PING this PR alive?

@fmuyassarov
Copy link
Member Author

PING this PR alive?

Not at the moment. But I plan to update it hopefully this week.

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 27, 2023
@ArangoGutierrez
Copy link
Contributor

@fmuyassarov PING this PR alive?

@fmuyassarov
Copy link
Member Author

@fmuyassarov PING this PR alive?

Hi @ArangoGutierrez. Um, it is almost dead :) Sorry that could not come to it before. But I'm willing to give it a time and get it done.

@ArangoGutierrez
Copy link
Contributor

  • /remove-lifecycle stale

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 28, 2023
@marquiz
Copy link
Contributor

marquiz commented Feb 28, 2023

I've started to think if we really want/need this at all. I'm not sure it's worth all the hassle, especially wrt. to breaking the "user interface", i.e. changing all labels. After thinking it again, I don't think nfd.k8s.io is necessarily a good choice, especially as we already have two subnamespaces feature.node.kubernetes.io and profile.node.kubernetes.io. We could save a few characters with feature.node.k8s.io but is it really worth it

@fmuyassarov
Copy link
Member Author

yeah, that's one of the reasons I didn't have a motivation to finish this work, because as we discussed earlier f2f, I was also not sure if we really need it.

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 29, 2023
@ArangoGutierrez
Copy link
Contributor

yeah, that's one of the reasons I didn't have a motivation to finish this work, because as we discussed earlier f2f, I was also not sure if we really need it.

Close?

@fmuyassarov
Copy link
Member Author

yeah, that's one of the reasons I didn't have a motivation to finish this work, because as we discussed earlier f2f, I was also not sure if we really need it.

Close?

for now at least yes,
/close

@k8s-ci-robot
Copy link
Contributor

@fmuyassarov: Closed this PR.

In response to this:

yeah, that's one of the reasons I didn't have a motivation to finish this work, because as we discussed earlier f2f, I was also not sure if we really need it.

Close?

for now at least yes,
/close

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.

@fmuyassarov fmuyassarov deleted the short-labels branch May 30, 2023 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

Use shorter label namespace
5 participants