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

Deprecate name/namespace labels of work #4813

Merged

Conversation

whitewindmills
Copy link
Member

What type of PR is this?
/kind feature

What this PR does / why we need it:

work.karmada.io/namespace, work.karmada.io/name -> work.karmada.io/permanent-id

Which issue(s) this PR fixes:
part of #4711

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

karmada-controller-manager: deprecate name/namespace labels of work.

@karmada-bot karmada-bot added the kind/feature Categorizes issue or PR as related to a new feature. label Apr 9, 2024
@karmada-bot karmada-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 9, 2024
@whitewindmills
Copy link
Member Author

Split from #4743.
/cc @RainbowMango

@whitewindmills whitewindmills force-pushed the deprecated-work-labels branch 3 times, most recently from 971a416 to 06c6d67 Compare April 11, 2024 02:38
@whitewindmills
Copy link
Member Author

@XiShanYongYe-Chang PTAL~

@XiShanYongYe-Chang
Copy link
Member

/assign

pkg/controllers/execution/execution_controller.go Outdated Show resolved Hide resolved
pkg/util/objectwatcher/objectwatcher.go Outdated Show resolved Hide resolved
pkg/controllers/mcs/endpointslice_controller.go Outdated Show resolved Hide resolved
pkg/controllers/mcs/endpointslice_controller.go Outdated Show resolved Hide resolved
pkg/controllers/status/work_status_controller.go Outdated Show resolved Hide resolved
pkg/controllers/status/work_status_controller.go Outdated Show resolved Hide resolved
@whitewindmills whitewindmills force-pushed the deprecated-work-labels branch from 06c6d67 to 332b317 Compare April 16, 2024 08:46
@XiShanYongYe-Chang
Copy link
Member

XiShanYongYe-Chang commented Apr 24, 2024

Do we also need to be clear about the labels here:

util.MergeLabel(clonedNamespaced, workv1alpha1.WorkNamespaceLabel, workNamespace)
util.MergeLabel(clonedNamespaced, workv1alpha1.WorkNameLabel, workName)

I submit a pr to fix this: #4865

@whitewindmills whitewindmills force-pushed the deprecated-work-labels branch from 332b317 to 2ead650 Compare April 24, 2024 11:28
@codecov-commenter
Copy link

codecov-commenter commented Apr 24, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 53.07%. Comparing base (8f9a624) to head (8328054).
Report is 4 commits behind head on master.

Files Patch % Lines
pkg/controllers/status/work_status_controller.go 63.63% 4 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4813      +/-   ##
==========================================
- Coverage   53.08%   53.07%   -0.02%     
==========================================
  Files         251      251              
  Lines       20387    20389       +2     
==========================================
- Hits        10822    10821       -1     
- Misses       8852     8855       +3     
  Partials      713      713              
Flag Coverage Δ
unittests 53.07% <66.66%> (-0.02%) ⬇️

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

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

@whitewindmills whitewindmills force-pushed the deprecated-work-labels branch from 2ead650 to 7e700d7 Compare April 24, 2024 12:04
@whitewindmills
Copy link
Member Author

@RainbowMango @XiShanYongYe-Chang
can we safely remove this file? since it won't be used.

/*
Copyright 2021 The Karmada Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
const (
// WorkNamespaceLabel is added to objects to specify associated Work's namespace.
WorkNamespaceLabel = "work.karmada.io/namespace"
// WorkNameLabel is added to objects to specify associated Work's name.
WorkNameLabel = "work.karmada.io/name"
)

@XiShanYongYe-Chang
Copy link
Member

XiShanYongYe-Chang commented Apr 25, 2024

can we safely remove this file? since it won't be used.

The file is empty. I think we can remove it.

@whitewindmills whitewindmills force-pushed the deprecated-work-labels branch from 7e700d7 to e56c0bb Compare April 26, 2024 01:58
@whitewindmills whitewindmills force-pushed the deprecated-work-labels branch from e56c0bb to 820832d Compare April 26, 2024 01:58
@whitewindmills
Copy link
Member Author

Please continue to help review this PR.
/cc @RainbowMango

@RainbowMango
Copy link
Member

OK, thanks. will do ASAP.

This PR focuses on removing labels(work.karmada.io/namespace, work.karmada.io/name) from the codebase, right?

@whitewindmills
Copy link
Member Author

This PR focuses on removing labels(work.karmada.io/namespace, work.karmada.io/name) from the codebase, right?

yes

Copy link
Member

@RainbowMango RainbowMango left a comment

Choose a reason for hiding this comment

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

Generally looks good to me.

@whitewindmills whitewindmills force-pushed the deprecated-work-labels branch from 820832d to d4d08b6 Compare April 28, 2024 07:10
@whitewindmills whitewindmills force-pushed the deprecated-work-labels branch from d4d08b6 to 8328054 Compare April 28, 2024 07:22
Copy link
Member

@RainbowMango RainbowMango left a comment

Choose a reason for hiding this comment

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

/lgtm

/assign @XiShanYongYe-Chang

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Apr 28, 2024
Copy link
Member

@XiShanYongYe-Chang XiShanYongYe-Chang 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

Copy link
Member

@RainbowMango RainbowMango left a comment

Choose a reason for hiding this comment

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

/approve

@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RainbowMango

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

@karmada-bot karmada-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 28, 2024
@karmada-bot karmada-bot merged commit 81916d6 into karmada-io:master Apr 28, 2024
12 checks passed
@whitewindmills whitewindmills deleted the deprecated-work-labels branch April 28, 2024 09:45
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. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants