-
Notifications
You must be signed in to change notification settings - Fork 261
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
kn export defect to honor mode #1212
kn export defect to honor mode #1212
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@itsmurugappan: 0 warnings.
In response to this:
Description
Mode is ignored, when --with-revisions flag is not mentioned, this pr makes sure that mode is always honored.
Changes
- "replay" is the default mode
- replay without revisions will print ksvc
- replay with revisions will print ksvc list
- export mode with/without revisions will return knexport type
Reference
Fixes #1087
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.
/test pull-knative-client-integration-tests |
I'm leaning towards I'm planing to take a closer look at the code later today to provide feedback. |
assert.Error(t, err, "'kn service export --with-revisions' requires a mode, please specify one of replay|export") | ||
|
||
_, err = executeServiceExportCommand(t, tc, "export", tc.latestSvc.ObjectMeta.Name, "--with-revisions", "--mode", "k8s", "-o", "yaml") | ||
assert.Error(t, err, "'kn service export --with-revisions' requires a mode, please specify one of replay|export") | ||
} | ||
|
||
func TestServiceExport(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should have a similar set of tests for service export --mode export
without --with-revisions
that'd also verity that the fix is working as intended and reflecting --mode
flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added this test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/ok-to-test
@@ -56,12 +56,6 @@ func TestServiceExportError(t *testing.T) { | |||
|
|||
_, err := executeServiceExportCommand(t, tc, "export", tc.latestSvc.ObjectMeta.Name) | |||
assert.Error(t, err, "'kn service export' requires output format") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have a simple test verifying no latest revision in export?
Hi @itsmurugappan just a quick status check, any update wrt review comments above? |
hi @dsimansk , will make the changes this week. Sorry got side tracked. |
/retest |
1 similar comment
/retest |
Thanks, lets wait until friday for the poll in #1087 for what to use as the default mode, merge this PR and I think since this mode is marked as experimental still, we can create a 0.21.1 afterwards so that we don't have to wait for 0.22 to land. |
/retest |
The following is the coverage report on the affected files.
|
/retest |
/test pull-knative-client-integration-tests-latest-release |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dsimansk, maximilien 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 |
Ups, I haven't noticed it's already approved and going to be merged on @itsmurugappan can you do a follow-up with changelog update please? |
David meets all criteria for an approver: - [x] Reviewer for at least 3 months - [x] Primary reviewer for at least 10 substantial PRs to the codebase, e.g. * knative#1246 * knative#1194 * knative#738 * knative#832 * knative#1016 * knative#877 * knative#667 * knative#697 * knative#1212 * knative#835 - [x] Reviewed at least 30 PRs to the codebase ([38 assigned PRs](https://github.com/knative/client/pulls?q=type%3Apr+assignee%3Adsimansk+)) - [x] Nominated by a WG lead (rhuss) Congrats David ! Thanks a lot for your awesome work & contributions.
David meets all criteria for an approver: - [x] Reviewer for at least 3 months - [x] Primary reviewer for at least 10 substantial PRs to the codebase, e.g. * knative#1246 * knative#1194 * knative#738 * knative#832 * knative#1016 * knative#877 * knative#667 * knative#697 * knative#1212 * knative#835 - [x] Reviewed at least 30 PRs to the codebase ([38 assigned PRs](https://github.com/knative/client/pulls?q=type%3Apr+assignee%3Adsimansk+)) - [x] Nominated by a WG lead (rhuss) Congrats David ! Thanks a lot for your awesome work & contributions.
David meets all criteria for an approver: - [x] Reviewer for at least 3 months - [x] Primary reviewer for at least 10 substantial PRs to the codebase, e.g. * #1246 * #1194 * #738 * #832 * #1016 * #877 * #667 * #697 * #1212 * #835 - [x] Reviewed at least 30 PRs to the codebase ([38 assigned PRs](https://github.com/knative/client/pulls?q=type%3Apr+assignee%3Adsimansk+)) - [x] Nominated by a WG lead (rhuss) Congrats David ! Thanks a lot for your awesome work & contributions.
Description
Mode is ignored, when --with-revisions flag is not mentioned, this pr makes sure that mode is always honored.
Changes
Reference
Fixes #1087
cc @dsimansk