Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reject submit if api token or cert id are empty #756

Merged
merged 1 commit into from
Aug 16, 2022

Conversation

bcrochet
Copy link
Contributor

@bcrochet bcrochet commented Aug 8, 2022

Just setting the flags to required on submit doesn't test for whether
the flags are actually provided. It only checks for their existence.
This code checks that the data is actually provided, and that another
flag isn't accidentally accepted as the value.

Fixes #754

Signed-off-by: Brad P. Crochet brad@redhat.com

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 8, 2022
@coveralls
Copy link

coveralls commented Aug 8, 2022

Coverage Status

Coverage increased (+0.06%) to 84.342% when pulling e2ad836 on bcrochet:fixes/754 into ee9cf5b on redhat-openshift-ecosystem:main.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 8, 2022
Copy link
Contributor

@komish komish left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Aug 9, 2022
@acornett21
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 9, 2022
@bcrochet bcrochet added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 10, 2022
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Aug 11, 2022
@bcrochet bcrochet removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 11, 2022
@bcrochet bcrochet force-pushed the fixes/754 branch 2 times, most recently from 101b195 to b9555dd Compare August 11, 2022 17:45
cmd/check_container.go Outdated Show resolved Hide resolved
@bcrochet bcrochet force-pushed the fixes/754 branch 3 times, most recently from 0a18871 to b8fb86a Compare August 11, 2022 19:16
cmd/check_container.go Outdated Show resolved Hide resolved
Copy link
Contributor

@komish komish left a comment

Choose a reason for hiding this comment

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

We already discussed this offline, but for the record (happy to be in the minority of opinion, of course, and this is not blocking): I just don't feel like this adds a huge amount of value to us.

We effectively special-case a single flag's behavior in a bit of a unique/opaque way, in an effort to ensure that the submit flag wasn't "eaten" by another. This feels a bit weird to do.

It's a small change, and so for that reason, I'm not going to block on that opinion that may not be shared. Few comments, otherwise looks okay.

@bcrochet
Copy link
Contributor Author

/retest

cmd/check_container.go Outdated Show resolved Hide resolved
cmd/check_container.go Outdated Show resolved Hide resolved
Copy link
Contributor

@komish komish left a comment

Choose a reason for hiding this comment

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

Just a few final questions. Otherwise, this looks ok.

Just setting the flags to required on submit doesn't test for whether
the flags are actually provided. It only checks for their existence.
This code checks that the data is actually provided, and that another
flag isn't accidentally accepted as the value.

Fixes redhat-openshift-ecosystem#754

Signed-off-by: Brad P. Crochet <brad@redhat.com>
@bcrochet
Copy link
Contributor Author

Just a few final questions. Otherwise, this looks ok.

Addressed.

Copy link
Contributor

@komish komish left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 16, 2022
@openshift-ci
Copy link

openshift-ci bot commented Aug 16, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: acornett21, bcrochet, komish, skattoju

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

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [acornett21,bcrochet,komish,skattoju]

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

@bcrochet bcrochet merged commit 8a685ae into redhat-openshift-ecosystem:main Aug 16, 2022
@bcrochet bcrochet deleted the fixes/754 branch June 6, 2023 17:00
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. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Panic in stable version
6 participants