Skip to content

Conversation

mjudeikis
Copy link
Contributor

@mjudeikis mjudeikis commented Apr 15, 2025

Summary

This is half of the code from #3282 to promote mounts to spec.
This way we can get it out faster while we solve open questions how to "prefill data without compromising cardinality".

What Type of PR Is This?

/kind feature
/kind api-change

Related Issue(s)

Fixes #

Release Notes

Add optional `spec.mount` to `Workspace` objects to stabilize mount API

@kcp-ci-bot kcp-ci-bot added kind/feature Categorizes issue or PR as related to a new feature. release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has signed the DCO. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Apr 15, 2025
@mjudeikis mjudeikis requested review from Copilot, sttts and embik April 15, 2025 18:01
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR promotes mounts to the stable API by introducing early returns and differentiating mounted workspaces from non‐mounted ones. Key changes include updating reconcile functions, indexers, and admission logic to use the new mount-based workspace specification and converting WorkspaceTypeReference fields from struct to pointer.

Reviewed Changes

Copilot reviewed 41 out of 41 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pkg/reconciler/tenancy/workspace/workspace_reconcile_scheduling.go Early exit added when a workspace is mounted.
pkg/reconciler/tenancy/workspace/workspace_reconcile_phase.go Added mount check to skip phase reconciliation for mounted workspaces.
pkg/reconciler/tenancy/workspace/workspace_reconcile_metadata.go Bypasses metadata reconciliation if workspace is mounted.
pkg/reconciler/tenancy/workspace/workspace_controller.go Adjusted the InstallIndexers signature without altering functionality.
pkg/openapi/zz_generated.openapi.go Updated schema definitions and descriptions to incorporate mount references.
pkg/indexers/workspace_test.go Updated tests to reflect mount changes in workspace indexing.
pkg/indexers/workspace.go Updated workspace indexing to use the new WorkspaceSpec.Mount field.
pkg/index/index_test.go Modified test scenarios for mount handling and workspace lookups.
pkg/index/index.go Updated state management and lookup logic to consider mounts instead of annotations.
pkg/admission/* Updated admission validation logic and tests for pointer-based WorkspaceTypeReference and mounted workspaces.
config/* Revised API resource schemas and export configurations to reflect mount spec changes.
cli/pkg/workspace/plugin/* Updated CLI tests and logic to use pointer-based WorkspaceTypeReference.

@mjudeikis mjudeikis force-pushed the mjudeikis/mounts.promote.part1 branch 2 times, most recently from 74abaf7 to 81c7551 Compare April 15, 2025 18:04
@embik
Copy link
Member

embik commented Apr 16, 2025

Sorry for being that guy but I don't think the release note is super helpful to users. Can we maybe rephrase it a bit, something like

Add optional `spec.mount` to `Workspace` objects to stabilize mount API

@mjudeikis
Copy link
Contributor Author

Sorry for being that guy but I don't think the release note is super helpful to users. Can we maybe rephrase it a bit, something like

Add optional `spec.mount` to `Workspace` objects to stabilize mount API

I always very grateful for "that guy" :D So keep doing it. Changed

@kcp-ci-bot kcp-ci-bot added the area/cli Issues or PRs related to CLI changes label Apr 21, 2025
@mjudeikis mjudeikis force-pushed the mjudeikis/mounts.promote.part1 branch 3 times, most recently from 25d9821 to 379dcad Compare April 21, 2025 11:13
 On-behalf-of: @SAP mangirdas.judeikis@sap.com
 Signed-off-by: Mangirdas Judeikis <Mangirdas@Judeikis.LT>
@mjudeikis
Copy link
Contributor Author

/retest

1 similar comment
@mjudeikis
Copy link
Contributor Author

/retest

@kcp-ci-bot
Copy link
Contributor

@ntnn: changing LGTM is restricted to collaborators

In response to this:

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.

@mjudeikis mjudeikis force-pushed the mjudeikis/mounts.promote.part1 branch from 379dcad to ae3aa02 Compare April 21, 2025 14:30
@mjudeikis mjudeikis force-pushed the mjudeikis/mounts.promote.part1 branch from ae3aa02 to 25c7f6b Compare April 21, 2025 14:51
Copy link
Member

@embik embik left a comment

Choose a reason for hiding this comment

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

/approve

@kcp-ci-bot kcp-ci-bot added the lgtm Indicates that a PR is ready to be merged. label Apr 23, 2025
@kcp-ci-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: embik

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

@kcp-ci-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: e264e2651d65cce1aed82bde0ba52b80108d4c1c

@kcp-ci-bot kcp-ci-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 23, 2025
@kcp-ci-bot kcp-ci-bot merged commit d92c2c1 into kcp-dev:main Apr 23, 2025
13 checks passed
@embik embik added this to the v0.28.0 milestone May 30, 2025
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. area/cli Issues or PRs related to CLI changes dco-signoff: yes Indicates the PR's author has signed the DCO. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants