Skip to content

Conversation

@zawadzkidiana
Copy link
Contributor

Summary

This change adds a reason string field to the FailoverDomainRequest message to increase transparency around failover operations. This allows us to store the reason in the failover history and provide that information to users for better operational visibility and debugging.

Type of Change

  • [] Add new API(s)
  • Add new data type(s)
  • [x ] Add new field(s) to existing data type
  • Remove field(s) from data type
  • Remove data type(s)
  • Remove API(s)
  • Other (please provide detailed description)

Data Effect

  • Does it change the data stored in database?
    Yes - The reason field will be persisted as part of the domain failover history.

Detailed Description

This PR adds a new optional reason field (field number 31) to the FailoverDomainRequest message in service_domain.proto. The field captures user-provided rationale for initiating a failover. As a proto3 field, it defaults to an empty string when not provided. The change also includes updated Go bindings generated by the protobuf compiler.

Impact Analysis

  • Backward Compatibility: This change is fully backward compatible. Since proto3 fields are optional by default, existing clients that don't provide a reason will continue to work without any modifications. Old servers will ignore the field if they receive it from newer clients.
  • Forward Compatibility: The change is forward compatible. Newer clients can send the reason field to older servers, which will safely ignore it. However, to fully leverage this feature and persist the reason in failover history, server-side changes are required.

Testing Plan

  • Unit Tests: no unit tests yet
  • Persistence Tests: no persistence tests yet
  • Integration Tests: no integration tests yet
  • Compatibility Tests: ran make with no errors

Rollout Plan

The deployment must follow this order: IDL first, then server updates, then Cadence workflows, and finally CLI updates. This ensures all components understand the new field before clients start sending it. Rollback is safe in reverse order because the field is optional. If issues arise, operators can immediately stop using the --reason flag in CLI commands while the core failover functionality remains unaffected. No explicit kill switch is needed due to the backward-compatible design.
This IDL change requires coordinated updates in the domain handler failover endpoint, Cadence workflows that execute failovers, and both the domain failover and admin cluster failover start CLI commands.

…ncy around failover initiation- was a user-requested feature.

Signed-off-by: Diana Zawadzki <dzawa@live.de>
@zawadzkidiana zawadzkidiana force-pushed the idl_support_for_failover_reason_variable branch from 8c99894 to b4deab1 Compare November 17, 2025 19:43
@zawadzkidiana zawadzkidiana changed the title Idl support for failover reason variable feat: Idl support for failover reason variable Nov 17, 2025
// at the cluster-attribute level only
ActiveClusters active_clusters = 30;
// user-requested addition "reason" variable created to increase transparency around failovers
string reason = 31;
Copy link
Member

Choose a reason for hiding this comment

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

do you mind making the number 40 here?

Copy link
Contributor Author

@zawadzkidiana zawadzkidiana Nov 17, 2025

Choose a reason for hiding this comment

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

Yup! Thank you for catching that.

Signed-off-by: Diana Zawadzki <dzawa@live.de>
@zawadzkidiana zawadzkidiana force-pushed the idl_support_for_failover_reason_variable branch from b4deab1 to 0484415 Compare November 17, 2025 20:01
@zawadzkidiana zawadzkidiana merged commit 110f4fe into cadence-workflow:master Nov 17, 2025
8 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.

2 participants