Skip to content

CLOUDP-451851: Remove omitempty from planned flag - #131

Merged
danielblanco96 merged 2 commits into
mainfrom
CLOUDP-451851_remove_omitempty_planned_flag
Sep 29, 2026
Merged

danielblanco96 merged 2 commits into
mainfrom
CLOUDP-451851_remove_omitempty_planned_flag

Conversation

@danielblanco96

@danielblanco96 danielblanco96 commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Ticket

CLOUDP-451851

Description

The planned flag was never sent false because of the omitempty in the struct. This PR removes it.

Testing

Before:

➜  mongodb-cli git:(main) ./bin/mongocli ops-manager standby-clusters failover
? Are you sure you want to trigger a failover of the standby cluster at s3://test-mcli/dr_status_prodRS.json? The standby cluster will be promoted to active. Yes
Failover triggered for standby cluster 'prodRS'. State: PromoteStandby.
➜  mongodb-cli git:(main) ./bin/mongocli ops-manager standby-clusters describe -o json
{
  "state": "PromoteStandby",
  "previousState": "Standby",
  "clusterName": "prodRS",
  "version": "2",
  "lastModified": "2026-09-29T06:46:12Z",
  "schemaVersion": "1"
}

After:

➜  mongodb-cli git:(CLOUDP-451851_remove_omitempty_planned_flag) ✗ ./bin/mongocli ops-manager standby-clusters failover
? Are you sure you want to trigger a failover of the standby cluster at s3://test-mcli/dr_status_prodRS.json? The standby cluster will be promoted to active. Yes
Failover triggered for standby cluster 'prodRS'. State: PromoteStandby.
➜  mongodb-cli git:(CLOUDP-451851_remove_omitempty_planned_flag) ✗ ./bin/mongocli ops-manager standby-clusters describe -o json
{
  "state": "PromoteStandby",
  "previousState": "Standby",
  "clusterName": "prodRS",
  "version": "2",
  "lastModified": "2026-09-29T06:52:24Z",
  "schemaVersion": "1",
  "planned": false
}

Tested both the missing planned flag and the planned=true cases

@danielblanco96
danielblanco96 requested a review from a team as a code owner September 29, 2026 06:55
@danielblanco96
danielblanco96 requested review from rzhukovmdb and removed request for a team September 29, 2026 06:55
@danielblanco96
danielblanco96 merged commit f40edb6 into main Sep 29, 2026
21 checks passed
@danielblanco96
danielblanco96 deleted the CLOUDP-451851_remove_omitempty_planned_flag branch September 29, 2026 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants