Skip to content

Serialise drctl boolean flags with the "=" form - #2533

Open
delthas wants to merge 2 commits into
development/2.16from
bugfix/ZENKO-5356/drctl-boolean-flags
Open

delthas wants to merge 2 commits into
development/2.16from
bugfix/ZENKO-5356/drctl-boolean-flags

Conversation

@delthas

@delthas delthas commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

What does this PR do, and why do we need it?

CTST built every zenko-drctl command line with --flag value. pflag boolean flags do
not consume the next argument, so --force-rotate-service-credentials false set the flag
to true and left "false" as a positional argument, silently ignored.

Every Given a DR installed therefore force-rotated the sink's service credentials,
instead of only the install that follows an uninstall. Each rotation rolls the sink's
backbeat pods and can stall D/R replication, which shows up as intermittent PRA failures:
on run 34585935213 the six
installs produced six rotations on the sink against one on the source, and both failing
scenarios were replicated deletes that never landed.

Emit booleans as --flag=value, and cover paramToCli in the tests for
common/utils.ts, renamed from parseGoDuration.test.ts now that it holds cases for a
second helper.

Which issue does this PR fix?

Fixes ZENKO-5356.

@bert-e

bert-e commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Hello delthas,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval
/bypass_build_status Bypass the build and test status
/bypass_commit_size Bypass the check on the size of the changeset TBA
/bypass_incompatible_branch Bypass the check on the source branch prefix
/bypass_jira_check Bypass the Jira issue check
/bypass_peer_approval Bypass the pull request peers' approval
/bypass_leader_approval Bypass the pull request leaders' approval
/bypass_source_branch_lineage Bypass the cross-branch contamination check
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request.
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

@scality scality deleted a comment from bert-e Sep 14, 2026
@bert-e

bert-e commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • 2 peers

@delthas
delthas force-pushed the bugfix/ZENKO-5356/drctl-boolean-flags branch from 968e06f to f4d55ce Compare September 15, 2026 08:11
The file tests a helper from common/utils.ts and is about to cover a second
one. Name it after the module rather than after a single function, and rename
its case list accordingly.

Issue: ZENKO-5356
@delthas
delthas force-pushed the bugfix/ZENKO-5356/drctl-boolean-flags branch 2 times, most recently from ff449e6 to 9ab37a2 Compare September 15, 2026 08:18
@delthas
delthas marked this pull request as ready for review September 15, 2026 08:20
@delthas
delthas requested review from a team, benzekrimaha and francoisferrand September 15, 2026 08:20
Comment thread tests/functional/ctst/common/utils.ts Outdated
CTST built every zenko-drctl command line with "--flag value". spf13/pflag
gives boolean flags NoOptDefVal = "true", so a bool flag does not consume the
next argv token: "--force-rotate-service-credentials false" set the flag to
true and left "false" as a positional argument, silently accepted because no
drctl leaf command declares an Args validator.

Every "Given a DR installed" therefore force-rotated the sink's service
credentials, regardless of the install counter. On run 34585935213 the six
installs produced six rotations on the sink against one on the source, leaving
the CR at service-users-seq 7 while pods still mounted user-creds.v1.5.

Issue: ZENKO-5356
@delthas
delthas force-pushed the bugfix/ZENKO-5356/drctl-boolean-flags branch from 9ab37a2 to 303c4e1 Compare September 15, 2026 09:33
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.

3 participants