Skip to content

Conversation

@ivankatliarchuk
Copy link
Member

@ivankatliarchuk ivankatliarchuk commented Dec 14, 2025

What does it do ?

Follow-ups:

Motivation

Follow-up for #5836

Relates #5379

More

  • Yes, this PR title follows Conventional Commits
  • Yes, I added unit tests
  • Yes, I updated end user documentation accordingly

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign mloiseleur for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the apis Issues or PRs related to API change label Dec 14, 2025
@k8s-ci-robot k8s-ci-robot added internal Issues or PRs related to internal code size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Dec 14, 2025
@ivankatliarchuk ivankatliarchuk changed the title feat(cli): cobra to support negation [no-] flags feat(cli): cobra cli args library to support negation [no-] flags Dec 14, 2025
@coveralls
Copy link

coveralls commented Dec 14, 2025

Pull Request Test Coverage Report for Build 20211224035

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 9 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.06%) to 78.636%

Files with Coverage Reduction New Missed Lines %
apis/externaldns/types.go 3 99.13%
apis/externaldns/binders.go 6 94.39%
Totals Coverage Status
Change from base Build 20209428653: -0.06%
Covered Lines: 16056
Relevant Lines: 20418

💛 - Coveralls

@mloiseleur
Copy link
Collaborator

@ivankatliarchuk 🤔 Why introduce such complexity ?

I mean,

  • Only syntax like --xxx=true|false => ✅
  • Only syntax like --xxx|--no-xxx => ✅
  • Both syntax: (--xxx=true|false)|(--no-xxx=true|false) => 😵‍💫

We may also introduce a breaking change, where users need to switch their flags from current --xxx|--no-xxx (kingpin) to --xxx=true|false (cobra). Wdyt ?

@ivankatliarchuk
Copy link
Member Author

ivankatliarchuk commented Dec 14, 2025

Agree it adds a bit of complexity. One of the ideas is to keep behaviour as is, and move flag changes to upstream library at some point, if they accept changes.

If we going to move away from negative flags - yes it will simplify things for us. For users, semantics is going to change for every boolean flag. Like they need to explicitly specify true|false. Nothing wrong with this approach.

I leave it for reviewer to decide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

apis Issues or PRs related to API change cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. internal Issues or PRs related to internal code size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants