Skip to content

[DRAFT] Prepare for protobuf upgrade#89

Open
Jorres wants to merge 1 commit intomasterfrom
prepare-for-2026-proto-update
Open

[DRAFT] Prepare for protobuf upgrade#89
Jorres wants to merge 1 commit intomasterfrom
prepare-for-2026-proto-update

Conversation

@Jorres
Copy link
Contributor

@Jorres Jorres commented Mar 5, 2026

We need to update our proto dependency to use a couple new features:

  • drain
  • cms smart mode

... but we need to guard against new proto fields before updating proto dependency. E.g. we implicitly rely the only type of action is Lock, but there are 2 new ones since the last time we bumped proto: https://github.com/Jorres/ydb-api-protos/blob/cc7e4c0e797abaab01eb30c6df8f5dd321d4359c/draft/protos/ydb_maintenance.proto#L146-L147

4 changes in total:

  • add GetLockAction() == nil checks with panic (panic, not err, because we are using solely lockc right now and wont be able to do anything if CMS suddently replies with a non-lock action. Later if we mix and match, e.g. with drain, I will implement proper runtime checks)
  • explicit error in cms client in CompleteActions for non-lock actions
  • use status.String() in prettyprint instead of hardcoded "PENDING" - this is just cosmetic to be honest, for prettier statuses
  • add e2e test that simulates a non-lock action from mock CMS, verifies panic

@Jorres Jorres changed the title Prepare for protobuf upgrade [DRAFT] Prepare for protobuf upgrade Mar 5, 2026
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.

1 participant