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

Fix env, annotation and labels flags in service create/update/apply #1516

Merged
merged 1 commit into from
Nov 25, 2021
Merged

Conversation

boaz0
Copy link
Contributor

@boaz0 boaz0 commented Nov 9, 2021

Description/Changes

Update descriptions to the following flags in service create/update/apply:

  • env
  • labels
  • annotations

If you can not unset the label/annotation/env then don't mention it in the description of the flag.

Reference

Fixes #1449

@google-cla google-cla bot added the cla: yes Indicates the PR's author has signed the CLA. label Nov 9, 2021
Copy link
Contributor

@knative-prow-robot knative-prow-robot left a comment

Choose a reason for hiding this comment

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

@boaz0: 2 warnings.

In response to this:

Description/Changes

Update descriptions to the following flags in service create/update/apply:

  • env
  • labels
  • annotations

If you can not unset the label/annotation/env then don't mention it in the description of the flag.

Reference

Fixes #1449

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.

pkg/kn/flags/podspec.go Show resolved Hide resolved
pkg/kn/flags/podspec.go Show resolved Hide resolved
@knative-prow-robot knative-prow-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 9, 2021
@knative-prow-robot
Copy link
Contributor

Hi @boaz0. Thanks for your PR.

I'm waiting for a knative 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.

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.

@codecov
Copy link

codecov bot commented Nov 9, 2021

Codecov Report

Merging #1516 (4edf592) into main (4316d03) will increase coverage by 0.07%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1516      +/-   ##
==========================================
+ Coverage   79.39%   79.47%   +0.07%     
==========================================
  Files         162      162              
  Lines        8497     8530      +33     
==========================================
+ Hits         6746     6779      +33     
  Misses       1073     1073              
  Partials      678      678              
Impacted Files Coverage Δ
pkg/kn/commands/container/add.go 94.87% <100.00%> (+0.13%) ⬆️
...kg/kn/commands/service/configuration_edit_flags.go 83.53% <100.00%> (+0.83%) ⬆️
pkg/kn/commands/source/container/create.go 90.24% <100.00%> (+0.24%) ⬆️
pkg/kn/commands/source/container/update.go 90.69% <100.00%> (+0.22%) ⬆️
pkg/kn/flags/podspec.go 79.25% <100.00%> (+2.19%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4316d03...4edf592. Read the comment docs.

@dsimansk
Copy link
Contributor

/ok-to-test

@knative-prow-robot knative-prow-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 16, 2021
Copy link
Contributor

@dsimansk dsimansk left a comment

Choose a reason for hiding this comment

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

It looks good to me, but it'd great if you could add unit tests to newly added AddCreateFlags to meet test coverage threshold as well.

@boaz0
Copy link
Contributor Author

boaz0 commented Nov 20, 2021

@dsimansk sure. No problem.

@knative-metrics-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-knative-client-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/kn/commands/container/add.go 96.0% 96.2% 0.2
pkg/kn/commands/service/configuration_edit_flags.go 89.4% 89.9% 0.5
pkg/kn/commands/source/container/create.go 93.5% 93.8% 0.2
pkg/kn/commands/source/container/update.go 94.1% 94.3% 0.2
pkg/kn/flags/podspec.go 84.4% 85.6% 1.2

Copy link
Contributor

@dsimansk dsimansk left a comment

Choose a reason for hiding this comment

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

Thanks @boaz0!

/approve
/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 25, 2021
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: boaz0, dsimansk

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:

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 Nov 25, 2021
@knative-prow-robot knative-prow-robot merged commit 0e89cfc into knative:main Nov 25, 2021
@boaz0 boaz0 deleted the closes_1449 branch December 4, 2021 20:22
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

Help message for kn service apply --env is appropriate
4 participants