Skip to content

chore(operator/scaling)!: Rework Scaler state to complex enum#1195

Open
sbernauer wants to merge 7 commits intomainfrom
chore/scaler-status-complex-enum
Open

chore(operator/scaling)!: Rework Scaler state to complex enum#1195
sbernauer wants to merge 7 commits intomainfrom
chore/scaler-status-complex-enum

Conversation

@sbernauer
Copy link
Copy Markdown
Member

Description

Follow-up of #1190, where switch Scaler.status switch to a complex enum, so that we get a little more type safety.

Definition of Done Checklist

  • Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
  • Please make sure all these things are done and tick the boxes

Author

  • Changes are OpenShift compatible
  • CRD changes approved
  • CRD documentation for all fields, following the style guide.
  • Integration tests passed (for non trivial changes)
  • Changes need to be "offline" compatible

Reviewer

  • Code contains useful comments
  • Code contains useful logging statements
  • (Integration-)Test cases added
  • Documentation added or updated. Follows the style guide.
  • Changelog updated
  • Cargo.toml only contains references to git tags (not specific commits or branches)

Acceptance

  • Feature Tracker has been updated
  • Proper release label has been added

@sbernauer sbernauer changed the title Chore/scaler status complex enum chore!: Rework Scaler.status to complex enum Apr 9, 2026
@sbernauer sbernauer requested a review from Techassi April 9, 2026 12:47
@sbernauer sbernauer self-assigned this Apr 9, 2026
@Techassi Techassi changed the title chore!: Rework Scaler.status to complex enum chore(operator/scaling)!: Rework Scaler state to complex enum Apr 9, 2026
#[derive(Clone, Debug, Deserialize, Serialize, JsonSchema)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize, JsonSchema)]
#[serde(rename_all = "PascalCase")]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think those should be camelCase again, because the individual variants are now also camelCase again.

Suggested change
#[serde(rename_all = "PascalCase")]
#[serde(rename_all = "camelCase")]

}

#[cfg(test)]
mod tests {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

question: Do we really need these tests, as we already generate the CRD preview - and any unintended change will lead to a schema change?

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.

2 participants