Skip to content

fix: validation functions are not called anywhere#6565

Merged
jetstack-bot merged 2 commits intocert-manager:masterfrom
ThatsMrTalbot:fix/flag-validation-not-called
Dec 21, 2023
Merged

fix: validation functions are not called anywhere#6565
jetstack-bot merged 2 commits intocert-manager:masterfrom
ThatsMrTalbot:fix/flag-validation-not-called

Conversation

@ThatsMrTalbot
Copy link
Copy Markdown
Contributor

Pull Request Motivation

Flag validation functions exist, but are not called anywhere. This adds calls to them at each command root.

Kind

fix

Release Note

NONE

Signed-off-by: Adam Talbot <adam.talbot@venafi.com>
@jetstack-bot jetstack-bot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 20, 2023
@jetstack-bot
Copy link
Copy Markdown
Contributor

Hi @ThatsMrTalbot. Thanks for your PR.

I'm waiting for a cert-manager member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@jetstack-bot jetstack-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Dec 20, 2023
@inteon
Copy link
Copy Markdown
Member

inteon commented Dec 20, 2023

/ok-to-test

@jetstack-bot jetstack-bot added ok-to-test and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 20, 2023
@inteon
Copy link
Copy Markdown
Member

inteon commented Dec 20, 2023

@ThatsMrTalbot Thank you for fixing this issue. Could you also add some tests and manually do some validation to make sure this validation logic works as expected?

@jetstack-bot jetstack-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 21, 2023
@ThatsMrTalbot
Copy link
Copy Markdown
Contributor Author

@ThatsMrTalbot Thank you for fixing this issue. Could you also add some tests and manually do some validation to make sure this validation logic works as expected?

I have added a table test for each validation method, also did some manual testing and it seems to behave as expected

Signed-off-by: Adam Talbot <adam.talbot@venafi.com>
@ThatsMrTalbot ThatsMrTalbot force-pushed the fix/flag-validation-not-called branch from 560f4ef to 59184de Compare December 21, 2023 08:58
@inteon
Copy link
Copy Markdown
Member

inteon commented Dec 21, 2023

Thanks for fixing this.
This change will make the controllers fail upfront with a clear error that explains what is wrong with the config.
It should not be breaking since the application would otherwise also fail (just at a deeper level with an error that is less clear).

/lgtm
/approve

@jetstack-bot jetstack-bot added the lgtm Indicates that a PR is ready to be merged. label Dec 21, 2023
@jetstack-bot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: inteon

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

The pull request process is described here

Details 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

@jetstack-bot jetstack-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 21, 2023
@jetstack-bot jetstack-bot merged commit ebb955f into cert-manager:master Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. lgtm Indicates that a PR is ready to be merged. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. ok-to-test release-note-none Denotes a PR that doesn't merit a release note. 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.

3 participants