Skip to content
This repository was archived by the owner on Mar 9, 2021. It is now read-only.

[kn-curl] with support for namespace and better help#52

Open
maximilien wants to merge 6 commits into
knative:mainfrom
maximilien:kn-curl2
Open

[kn-curl] with support for namespace and better help#52
maximilien wants to merge 6 commits into
knative:mainfrom
maximilien:kn-curl2

Conversation

@maximilien
Copy link
Copy Markdown
Contributor

@maximilien maximilien commented Jun 18, 2020

kn-curl second attempt

  • supports namespace
  • better help usage message matching kn style
  • supports -h and --help

Supports getting INGRESS with Istio. Needs to following:

  • needs to be updated to support other ingress types.
  • needs at least an integration test and run in new vendor-less fashion.

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Jun 18, 2020
@knative-prow-robot knative-prow-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 18, 2020
Copy link
Copy Markdown
Member

@mattmoor mattmoor left a comment

Choose a reason for hiding this comment

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

Produced via:
prettier --write --prose-wrap=always $(find -name '*.md' | grep -v vendor | grep -v .github | grep -v docs/cmd/)

Copy link
Copy Markdown
Member

@mattmoor mattmoor left a comment

Choose a reason for hiding this comment

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

Produced via:
prettier --write --prose-wrap=always $(find -name '*.md' | grep -v vendor | grep -v .github | grep -v docs/cmd/)

Copy link
Copy Markdown
Member

@mattmoor mattmoor left a comment

Choose a reason for hiding this comment

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

Produced via:
prettier --write --prose-wrap=always $(find -name '*.md' | grep -v vendor | grep -v .github | grep -v docs/cmd/)

Copy link
Copy Markdown
Contributor

@navidshaikh navidshaikh left a comment

Choose a reason for hiding this comment

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

nice!

Comment thread plugins/kn-curl/README.md Outdated
Comment thread plugins/kn-curl/README.md Outdated
Comment thread plugins/kn-curl/README.md Outdated
Comment thread plugins/kn-curl/README.md
Comment thread plugins/kn-curl/kn-curl Outdated
Comment thread plugins/kn-curl/kn-curl Outdated
Comment thread plugins/kn-curl/kn-curl Outdated
Comment thread plugins/kn-curl/kn-curl Outdated
@maximilien
Copy link
Copy Markdown
Contributor Author

Thanks for review @navidshaikh 🙏🏽

Will address comments today. Best.

Copy link
Copy Markdown
Member

@mattmoor mattmoor left a comment

Choose a reason for hiding this comment

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

Produced via:
prettier --write --prose-wrap=always $(find -name '*.md' | grep -v vendor | grep -v .github | grep -v docs/cmd/)

Copy link
Copy Markdown
Contributor

@navidshaikh navidshaikh 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

/hold
for @daisy-ycguo @rhuss to take a look

@knative-prow-robot knative-prow-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 26, 2020
@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 26, 2020
@knative-prow-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: maximilien, navidshaikh

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:
  • OWNERS [maximilien,navidshaikh]

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

Comment thread plugins/kn-curl/kn-curl Outdated
Comment thread plugins/kn-curl/kn-curl Outdated
Comment thread plugins/kn-curl/kn-curl Outdated
Comment thread plugins/kn-curl/kn-curl
@@ -0,0 +1,77 @@
#!/bin/bash
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.

maybe we could restrict to a simple bourne shell to make it the plugin more conservative and allow it to run on more platforms (e.g. also on Alpine which only has ash by default) ?

This would require to avoid bash specific extensions, but since this plugin is quite simple I think this should be no issue.

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.

Did you really mean ash?

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.

@maximilien : /bin/sh

Comment thread plugins/kn-curl/kn-curl
Comment thread plugins/kn-curl/kn-curl Outdated
Comment thread plugins/kn-curl/kn-curl Outdated
Comment thread plugins/kn-curl/kn-curl Outdated
Comment thread plugins/kn-curl/kn-curl Outdated
@maximilien
Copy link
Copy Markdown
Contributor Author

Great feedback @rhuss and @navidshaikh. Addressing. Thank you 🙏

@knative-prow-robot knative-prow-robot removed the lgtm Indicates that a PR is ready to be merged. label Jun 29, 2020
@knative-prow-robot
Copy link
Copy Markdown

New changes are detected. LGTM label has been removed.

@maximilien
Copy link
Copy Markdown
Contributor Author

OK latest update addresses all comments except for the two TODOs I had: 1) e2e tests (almost done) and 2) other ingress, have not started this...

Comment thread plugins/kn-curl/README.md Outdated
Comment thread plugins/kn-curl/README.md Outdated
Copy link
Copy Markdown
Member

@mattmoor mattmoor left a comment

Choose a reason for hiding this comment

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

Produced via:
prettier --write --prose-wrap=always $(find -name '*.md' | grep -v vendor | grep -v .github | grep -v docs/cmd/)

Comment thread plugins/kn-curl/README.md Outdated
Comment thread plugins/kn-curl/README.md Outdated
@maximilien
Copy link
Copy Markdown
Contributor Author

Added checks for istio and first e2e tests. Need to address some of auto the linting feedback

@maximilien
Copy link
Copy Markdown
Contributor Author

/hold remove

@maximilien
Copy link
Copy Markdown
Contributor Author

/unhold

@knative-prow-robot knative-prow-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 19, 2020
@maximilien
Copy link
Copy Markdown
Contributor Author

@navidshaikh can I get a final review and LGTM on this? Thanks

Comment thread plugins/kn-curl/kn-curl
@@ -0,0 +1,88 @@
#!/bin/bash
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.

Suggested change
#!/bin/bash
#!/bin/sh

Comment thread plugins/kn-curl/kn-curl
@@ -0,0 +1,77 @@
#!/bin/bash
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.

@maximilien : /bin/sh

Comment thread plugins/kn-curl/kn-curl
# See the License for the specific language governing permissions and
# limitations under the License.

USAGE=$"Usage:
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.

not sure why $ is prefixed here

Comment thread plugins/kn-curl/kn-curl
Comment on lines +31 to +41
# Need at least the service name
if [ -z "$1" ]; then
echo "$USAGE"
exit 0
fi

# If -h or --help is first argument
if [ "$1" == "-h" ] || [ "$1" == "--help" ]; then
echo "$USAGE"
exit 0
fi
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.

just combine the if checks then it'd print USAGE in all the three cases ?

Base automatically changed from master to main March 8, 2021 17:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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. 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.

6 participants