Skip to content

Move applyStorageProfile constant to API package#3962

Closed
noamasu wants to merge 1 commit into
kubevirt:mainfrom
noamasu:bugfix/move-applystorageprofile-to-cdi-api
Closed

Move applyStorageProfile constant to API package#3962
noamasu wants to merge 1 commit into
kubevirt:mainfrom
noamasu:bugfix/move-applystorageprofile-to-cdi-api

Conversation

@noamasu

@noamasu noamasu commented Dec 1, 2025

Copy link
Copy Markdown
Collaborator

Moving cdi.kubevirt.io/applyStorageProfile to the API package.

What this PR does / why we need it:
This enables external projects (e.g., KubeVirt) to import the constant from the API package instead of duplicating it.

  • Add LabelApplyStorageProfile to containerized-data-importer-api package for external consumer access
  • Update CDI code to use cdiv1.LabelApplyStorageProfile

Which issue(s) this PR fixes:
Part of a fix for # https://issues.redhat.com/browse/CNV-73408

This kubevirt/kubevirt#16229 PR in kubevirt relies on this change.

Special notes for your reviewer:
@arnongilboa
@ShellyKa13

Release note:

NONE

@kubevirt-bot kubevirt-bot added dco-signoff: yes Indicates the PR's author has DCO signed all their commits. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Dec 1, 2025
@kubevirt-bot kubevirt-bot requested a review from aglitke December 1, 2025 10:28
@kubevirt-bot

Copy link
Copy Markdown
Contributor

[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 assign aglitke for approval. For more information see the Code Review Process.

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

Details 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

@kubevirt-bot kubevirt-bot requested a review from akalenyu December 1, 2025 10:28
@kubevirt-bot kubevirt-bot added size/M release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Dec 1, 2025
@coveralls

coveralls commented Dec 1, 2025

Copy link
Copy Markdown

Coverage Status

coverage: 58.669% (+0.02%) from 58.652%
when pulling 36bfa8d on noamasu:bugfix/move-applystorageprofile-to-cdi-api
into a6f7fd8 on kubevirt:main.

Comment thread pkg/common/common.go Outdated
Comment on lines +71 to +73
// Deprecated: Use cdiv1.LabelApplyStorageProfile from containerized-data-importer-api instead.
// This constant is kept for backwards compatibility and will be removed in a future release.
PvcApplyStorageProfileLabel = cdiv1.LabelApplyStorageProfile

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why keep it if all refs are updated?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

removing.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Still appears in the commit message and the PR description.

@noamasu noamasu force-pushed the bugfix/move-applystorageprofile-to-cdi-api branch 2 times, most recently from 4f3e82f to 379b3a2 Compare December 1, 2025 13:34

// LabelApplyStorageProfile is a PVC label that tells the CDI mutating webhook to modify the PVC
// according to the storage profile. When set to "true", the webhook will process the PVC based on
// its associated StorageProfile (e.g., setting volume mode, access modes, etc.).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

in the e.g. you may add "minimum supported pvc size", as it's the main motivation for its usage in kubevirt via the api.

@kubevirt-bot kubevirt-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 2, 2025
@noamasu noamasu force-pushed the bugfix/move-applystorageprofile-to-cdi-api branch from 379b3a2 to 63cc5d7 Compare December 2, 2025 10:05
@kubevirt-bot kubevirt-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 2, 2025
- Add LabelApplyStorageProfile to containerized-data-importer-api
  package for external consumer access
- Update CDI code to use cdiv1.LabelApplyStorageProfile

This enables external projects (e.g., KubeVirt) to import the constant
from the API package instead of duplicating it.

Signed-off-by: Noam Assouline <nassouli@redhat.com>
@noamasu noamasu force-pushed the bugfix/move-applystorageprofile-to-cdi-api branch from 63cc5d7 to 36bfa8d Compare December 2, 2025 10:12
@arnongilboa

Copy link
Copy Markdown
Collaborator

/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Dec 3, 2025
@kubevirt-bot

Copy link
Copy Markdown
Contributor

Pull requests that are marked with lgtm should receive a review
from an approver within 1 week.

After that period the bot marks them with the label needs-approver-review.

/label needs-approver-review

@kubevirt-bot kubevirt-bot added the needs-approver-review Indicates that a PR requires a review from an approver. label Dec 10, 2025
@kubevirt-bot kubevirt-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 27, 2026
@kubevirt-bot

Copy link
Copy Markdown
Contributor

PR needs rebase.

Details

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.

@kubevirt-bot

Copy link
Copy Markdown
Contributor

There has been no activity on this PR for 45 days.
To protect limited CI resources, it has been automatically labelled 'stale'.
This PR will automatically rot after an additional 14 days of inactivity, and will be closed shortly after that.

What you can do:

  • If the PR is waiting on you to respond to a question or feedback and/or update the PR, please do so.
  • You can mark the PR as fresh and remove the label with the following command: /remove-lifecycle stale
  • If this PR is safe to close now, please help the project by closing it with: /close
  • If you need attention on this PR from a reviewer, you can raise it on the agenda of the relevant SIG meeting or KubeVirt Community meeting, or ping the kubevirt-dev slack channel.

/lifecycle stale

@kubevirt-bot kubevirt-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 7, 2026
@kubevirt-bot

Copy link
Copy Markdown
Contributor

There has been no activity on this PR for 59 days and it has been stale for 14 days.
To protect limited CI resources, it has been automatically labelled 'rotten' and will be closed in 7 days.

What you can do:

  • If the PR is waiting on you to respond to a question or feedback and/or update the PR, please do so.
  • You can mark the PR as fresh and remove the label with the following command: /remove-lifecycle rotten
  • If this PR is safe to close now, please help the project by closing it with: /close
  • If you need attention on this PR from a reviewer, you can raise it on the agenda of the relevant SIG meeting or KubeVirt Community meeting, or ping the kubevirt-dev slack channel.

/lifecycle rotten

@kubevirt-bot kubevirt-bot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels May 21, 2026
@kubevirt-bot

Copy link
Copy Markdown
Contributor

There has been no activity on this PR for 66 days and it has been rotten for 7 days.
To protect limited CI resources, it has been automatically closed.

What you can do:

/close

@kubevirt-bot

Copy link
Copy Markdown
Contributor

@kubevirt-bot: Closed this PR.

Details

In response to this:

There has been no activity on this PR for 66 days and it has been rotten for 7 days.
To protect limited CI resources, it has been automatically closed.

What you can do:

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

@kubevirt-bot

Copy link
Copy Markdown
Contributor

/remove-label needs-approver-review

@kubevirt-bot kubevirt-bot removed the needs-approver-review Indicates that a PR requires a review from an approver. label May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note-none Denotes a PR that doesn't merit a release note. size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants