Skip to content

Added projection level option to clusters update command#107

Merged
aneshas merged 1 commit into
masterfrom
projection-level
May 4, 2026
Merged

Added projection level option to clusters update command#107
aneshas merged 1 commit into
masterfrom
projection-level

Conversation

@aneshas

@aneshas aneshas commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@qodo-code-review

Copy link
Copy Markdown

Review Summary by Qodo

Add projection level option to clusters update command

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Add projection level option to cluster update command
• Support off, system, or user projection levels
• Extend UpdateClusterRequest with projection_level field
Diagram
flowchart LR
  CLI["CLI UpdateCluster struct"]
  PARSE["Parse projection_level argument"]
  API["UpdateClusterRequest struct"]
  CALL["API call with projection_level"]
  CLI -- "add projection_level field" --> PARSE
  PARSE -- "pass to request" --> API
  API -- "send to endpoint" --> CALL
Loading

Grey Divider

File Changes

1. cli/src/main.rs ✨ Enhancement +8/-0

Add projection level CLI option to update command

• Add projection_level field to UpdateCluster struct with custom parser
• Field accepts off, system, or user projection levels
• Pass projection_level parameter to UpdateClusterRequest in API call

cli/src/main.rs


2. generated/src/mesdb/schemas.rs ✨ Enhancement +2/-0

Add projection level field to request schema

• Add projection_level field to UpdateClusterRequest struct
• Field is optional and skipped during serialization if None
• Supports ProjectionLevel enum type

generated/src/mesdb/schemas.rs


Grey Divider

Qodo Logo

@qodo-code-review

qodo-code-review Bot commented Apr 28, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0)

Grey Divider


Remediation recommended

1. Public API struct break 🐞 Bug ⚙ Maintainability
Description
generated::mesdb::UpdateClusterRequest gained a new public field, which causes compile errors for
any downstream crate constructing it with a struct literal (they must now add `projection_level:
...`). This is a breaking change to the generated client API surface and should be handled via
versioning and/or safer construction patterns.
Code

generated/src/mesdb/schemas.rs[R586-587]

+    #[serde(skip_serializing_if = "Option::is_none")]
+    pub projection_level: Option<ProjectionLevel>,
Evidence
UpdateClusterRequest is a pub struct, so adding a field changes its construction requirements
for all consumers; the CLI had to be updated in this PR to include the new field in the struct
literal, demonstrating the impact. While the new field is optional for serialization, it is still
mandatory to mention in Rust struct literals unless using a helper like Default + struct update
syntax.

generated/src/mesdb/schemas.rs[577-588]
cli/src/main.rs[2941-2953]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`UpdateClusterRequest` is a public struct and a new field was added (`projection_level`). This is a breaking change for downstream Rust code that constructs `UpdateClusterRequest` using a struct literal, because Rust requires all fields to be present unless using struct update syntax.

### Issue Context
Within this repo, `cli/src/main.rs` was updated to include the new field, but external consumers of the generated client types may still break at compile time.

### Fix Focus Areas
- generated/src/mesdb/schemas.rs[577-588]

### Suggested fix
- Add `Default` support for `UpdateClusterRequest` (e.g., `#[derive(Default)]` or an explicit `impl Default`) so consumers can write `UpdateClusterRequest { acl_id: ..., ..Default::default() }` and be resilient to future optional-field additions.
- If these crates are published, ensure the change is reflected in semver/versioning notes (breaking-change acknowledgment).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

@aneshas aneshas changed the title Added projection level option to clusters update command [CLO-260] Added projection level option to clusters update command Apr 29, 2026
@linear

linear Bot commented Apr 29, 2026

Copy link
Copy Markdown

@aneshas aneshas changed the title [CLO-260] Added projection level option to clusters update command Added projection level option to clusters update command Apr 29, 2026
@aneshas
aneshas merged commit 4ee70de into master May 4, 2026
13 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants