You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: reserve core operational labels in provider requests - #1826
No actionable comments were generated in the recent review.
Walkthrough
The change adds shared reserved-label constants and validation, applies validation to workspace, external-provider, and Kubernetes label inputs, and updates existing label declarations to use the shared constants. Documentation describes which label inputs are rejected or remain supported.
Defines reserved label keys and validates user-supplied label keys. Existing label declarations now use shared constants. Documentation describes rejected inputs and supported labels.
Workspace and external-provider validation cmd/workspace/up/up_validate.go, pkg/devcontainer/run.go, pkg/devcontainer/reserved_labels_test.go, pkg/driver/external/run_image.go, pkg/driver/external/reserved_labels_test.go
Workspace entry points validate identity labels. External-provider request construction validates identity labels and adds workspace labels before validation or execution. Tests cover reserved labels and runtime label handling.
devsy-org/devsy#1503: Defines and writes the WSLg snapshot label that this change centralizes and adds to the reserved-label validation.
Merge Risk: Minimal · up to 9b7b5
The change rejects reserved labels before they are merged into provider requests, and ordinary labels keep working. No merge-blocking risk was found. Native argument hardening is a documented follow-up outside this change.
Pre-merge checks: 3 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Description check
The pull request has no description. The objectives state that the change rejects reserved user-supplied labels before explicit driver or provider map merges while preserving configurable identity and…
Add a pull request description that follows the repository template. Include: (1) a Conventional Commits title, such as "fix(config): reserve core operational labels in provider requests"; (2) a "What and why" section that states the proble…
Passed checks: 3 passed
Check name
Status
Explanation
Title check
The title uses a Conventional Commits prefix (fix:) and names the main change: reserved core operational labels are now rejected in provider requests. The raw summary shows that ValidateUserLabels rej…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title uses a Conventional Commits prefix (fix:) and names the main change: reserved core operational labels are now rejected in provider requests. The raw summary shows that ValidateUserLabels rejects reserved keys in IDLabels, and driver and Kubernetes map merges also reject them, so the title matches the changeset.
Full details: Description check
Explanation
The pull request has no description. The objectives state that the change rejects reserved user-supplied labels before explicit driver or provider map merges while preserving configurable identity and metadata labels. They also report test, lint, and vet results and exclude native argument hardening. The description does not include the repository template sections.
Resolution
Add a pull request description that follows the repository template. Include: (1) a Conventional Commits title, such as "fix(config): reserve core operational labels in provider requests"; (2) a "What and why" section that states the problem and scope; (3) a "Fixes" or "Refs" line with the related issue, or "none"; (4) the applicable "Type of change" checkbox, such as "Bug fix"; (5) an "AI assistance" section with the tool, model, and share of generated code; (6) a "Testing" section with the Ginkgo e2e spec or a reason for not adding one, plus the commands run and their results; (7) the checklist items, including mise run cli:lint:ci and mise run cli:test; and (8) "Notes for reviewers" stating that native argument hardening is excluded and the reported positional-image bypass is a follow-up. Remove unused template sections and placeholders.
Finishing Touches
Simplify code
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.
[Medium impact] The PR appears safe to merge within its documented explicit-label scope.
Summary
The PR reserves core operational labels while keeping custom identity and metadata labels configurable.
Devsy rejects reserved identification labels before workspace startup and external requests.
Kubernetes rejects reserved labels from pod templates and provider settings.
No actionable issues were found.
Acknowledged scope: skevetter explicitly deferred native argument hardening and documented the positional-image bypass. Native argument parity and protection against arbitrary clients are not claimed by this PR.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User identity labels] --> B[Reject reserved keys]
B --> C[Assemble external request]
D[Generated operational labels] --> C
C --> E[Validate request]
E --> F[Create workspace]
G[Kubernetes provider and template labels] --> H[Reject reserved keys]
H --> I[Add generated Kubernetes labels]
I --> J[Create resources]
The four-section body and omission of tracker references follow the requested delivery rules. I retained that format and added explicit Ginkgo test status rather than additional template headings. No new Ginkgo specs were added: the namespace regression is covered by the real child-process gRPC runtime harness and CLI rejection/control runs, while the existing hosted integration matrix passed. Native positional-image argument hardening remains the owner follow-up documented in Not verified.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.