Skip to content

fix: correct "Decomissioned" typo to "Decommissioned" in safekeeper status#12867

Open
MaxwellCalkin wants to merge 1 commit into
neondatabase:mainfrom
MaxwellCalkin:fix-decomissioned-typo
Open

fix: correct "Decomissioned" typo to "Decommissioned" in safekeeper status#12867
MaxwellCalkin wants to merge 1 commit into
neondatabase:mainfrom
MaxwellCalkin:fix-decomissioned-typo

Conversation

@MaxwellCalkin

Copy link
Copy Markdown

Note: This PR was authored by Claude (AI), operated by @MaxwellCalkin.

Fixes #12832

Summary

The SkSchedulingPolicy enum variant was misspelled as Decomissioned (missing one "m") instead of Decommissioned. This typo propagated to API responses, string serialization, comments, documentation, and tests across 7 files.

Changes

Rust source (libs/pageserver_api/src/controller_api.rs)

  • Rename enum variant Decomissioned to Decommissioned
  • Add #[serde(alias = "Decomissioned")] for backwards-compatible JSON deserialization
  • Accept both "decommissioned" and "decomissioned" in FromStr for database compatibility
  • Update canonical From<SkSchedulingPolicy> for String output to "decommissioned"

Storage controller (storage_controller/src/)

  • Update all SkSchedulingPolicy::Decomissioned references to SkSchedulingPolicy::Decommissioned in:
    • heartbeater.rs
    • service/safekeeper_service.rs
    • service/safekeeper_reconciler.rs
  • Fix misspelled comments ("decomissioned" -> "decommissioned")

Database migration

  • Add migration 2026-03-08-000001_fix_decommissioned_typo to update existing scheduling_policy = 'decomissioned' rows to 'decommissioned'

Documentation

  • Fix typo in docs/rfcs/035-safekeeper-dynamic-membership-change.md

Tests

  • Update string literals in test_runner/regress/test_safekeeper_migration.py and test_runner/regress/test_storage_controller.py

Backwards compatibility

  • JSON deserialization: The #[serde(alias = "Decomissioned")] attribute ensures that JSON payloads using the old spelling are still accepted
  • Database: The FromStr implementation accepts both "decomissioned" and "decommissioned", and the migration updates existing rows
  • API responses: Will now return the correctly-spelled "Decommissioned" (via serde) and "decommissioned" (via From<> for String)

…tatus

The SkSchedulingPolicy enum variant and all references were misspelled
as "Decomissioned" (missing one "m"). This affected API responses,
string serialization, comments, documentation, and tests.

Changes:
- Rename enum variant Decomissioned -> Decommissioned
- Add #[serde(alias = "Decomissioned")] for backwards-compatible JSON deserialization
- Accept both "decommissioned" and "decomissioned" in FromStr for DB compatibility
- Update canonical string output to "decommissioned"
- Add DB migration to update existing rows
- Fix typo in RFC doc, comments, and test assertions

Fixes neondatabase#12832
@MaxwellCalkin MaxwellCalkin requested a review from a team as a code owner March 8, 2026 06:35
@MaxwellCalkin MaxwellCalkin requested a review from VladLazar March 8, 2026 06:35
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.

There is a typo in safekeeper's status.

1 participant