Skip to content

Validate usage of knative.dev/hack/shell#32

Merged
knative-prow-robot merged 2 commits into
knative:masterfrom
cardil:followup/30-validate-shellout-usage
Dec 1, 2020
Merged

Validate usage of knative.dev/hack/shell#32
knative-prow-robot merged 2 commits into
knative:masterfrom
cardil:followup/30-validate-shellout-usage

Conversation

@cardil
Copy link
Copy Markdown
Contributor

@cardil cardil commented Nov 26, 2020

This is follow up to #30 intended to disallow using this shell out package without control.

If a new place is required to use this package, an "allow PR" should be made to this repo first.

/cc @n3wscott

@google-cla google-cla Bot added the cla: yes Indicates the PR's author has signed the CLA. label Nov 26, 2020
@knative-prow-robot knative-prow-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 26, 2020
@cardil cardil force-pushed the followup/30-validate-shellout-usage branch from e957121 to f4ed6bd Compare November 26, 2020 11:22
This is follow up to knative.dev/hack#30 intended to disallow using this
shell out package without control.

If new place is required to use this package, first a allow PR should be
made to this repo.
@cardil cardil force-pushed the followup/30-validate-shellout-usage branch from f4ed6bd to 1f1f81b Compare November 26, 2020 11:25
@cardil
Copy link
Copy Markdown
Contributor Author

cardil commented Nov 26, 2020

What do you think of this solution, to block not allowed usages @n3wscott ?

"knative.dev/hack/shell"
)

func TestCallerNotAllowed(t *testing.T) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think it just needs the deprecated comment, this test will be removed in the vendoring process.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Of course test will be removed.

But, there's a validation added to shell/project.go that will return error in used from not allowed location

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

FWIW: Using deprecated comments will upset the linter.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

FWIW: Using deprecated comments will upset the linter.

That is the point. You have to opt-in to using the deprecated code

Copy link
Copy Markdown

@n3wscott n3wscott left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

Let's try this.

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 1, 2020
@knative-prow-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cardil, n3wscott

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

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 1, 2020
@knative-prow-robot knative-prow-robot merged commit 0cc6568 into knative:master Dec 1, 2020
@cardil cardil deleted the followup/30-validate-shellout-usage branch December 2, 2020 17:37
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. cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants