-
Notifications
You must be signed in to change notification settings - Fork 263
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 exit code on service delete and revision delete #971
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.
@hemanrnjn: 0 warnings.
In response to this:
Description
Changes
- Fixed exit code to 1 which was earlier returned upon any failure of
kn service delete
Reference
Fixes #960
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.
Hi @hemanrnjn. 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 Once the patch is verified, the new status will be reflected by the 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. |
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
@hemanrnjn : needs rebase + add some tests ?
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.
See comment. Please address. Thanks.
/test pull-knative-client-integration-tests
kn all command failed exited code is 0,does this need to be modified uniformly? |
Can you tell me more specifically with exactly what command you encountered this issue? |
/retest
|
I read the code and found no default error exit code,I tested some commands and found that part of the exit code was 1 and most of the exit code was 0.
|
+1 its the bug in revision delete command as well, @hemanrnjn might want to apply the fix for revisions too ? |
In this PR or a separate PR? |
LGTM once we can pass tests again. Also, should the "WIP" prefix be removed from title, or do you have more planned for this PR @hemanrnjn? |
Not anything additional. Just looking into the cause of the failures of the integration tests as it might need some changes. I will remove WIP right after. |
The following is the coverage report on the affected files.
|
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
/approve
thanks for the contribution!
@@ -136,12 +136,12 @@ func serviceMultipleDelete(r *test.KnRunResultCollector, existService, nonexistS | |||
assert.Check(r.T(), !strings.Contains(out.Stdout, nonexistService), "The service", nonexistService, " exists (but is supposed to be not)") | |||
|
|||
out = r.KnTest().Kn().Run("service", "delete", existService, nonexistService) | |||
r.AssertNoError(out) |
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.
👍
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hemanrnjn, maximilien, navidshaikh 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 |
* Fix exit code 0 upon service delete * Mentioned bug fix in CHANGELOG.adoc * Add error check test for service not found * Fix for kn revision delete failure exit code and add test cases * Testing changes in test cases for failure in intergration tests * Fix test case error causing integration test failure
* fix(docs): Fix tekton task link in README (#934) * Fix missing NAMESPACE column header (#951) * Fix missing NAMESPACE column header * Fix missing namespace column header for 'kn source list -A' * List inbuilt sources if CRD access is restricted (#948) * List inbuilt sources if CRD access is restricted Fixes #947 - Identify restricted access error - If server returns restricted access error, fallback to listing only eventing inbuilt sources using their GVKs. - List any inbuilt source (ApiServerSource) object and read the error to know if eventing is installed for `kn source list-types`. * Fix golint warnings * Remove unused imports * Verify each built in source before listing source types * Improve the check if sources are not installed in the cluster * Update finding forbidden error * Update finding errors * Add unit tests for IsForbiddenError util * Add unit tests * Add tests for dynamic pkg library * Add unit tests for case when no sources are installed * Update test name * Use Tekton Catalog GA structure for tasks (#966) * fix: `kn source list` command print spelling problems (#963) * Fix exit code on service delete and revision delete (#971) * Fix exit code 0 upon service delete * Mentioned bug fix in CHANGELOG.adoc * Add error check test for service not found * Fix for kn revision delete failure exit code and add test cases * Testing changes in test cases for failure in intergration tests * Fix test case error causing integration test failure * fix(volume): Generate volume name compliant with DNS Label names (#975) * fix(volume): Volume names to not contain dots Replace non alphanumberic characters with hyphen as the volumen name must be a DNS_LABEL (https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-label-names) ref: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#volume-v1-core * Generate volume name compliant with DNS Label names Volume names to follow the DNS label standard as defined in RFC 1123. This means the name must: - contain at most 63 characters - contain only lowercase alphanumeric characters or '-' - start with an alphanumeric character - end with an alphanumeric character * Set client custom GVK for source list for machine readable output (#980) - Use custom GVK {Group: client.knative.dev, Version: v1alpha1, Kind: SourceList} - Source list may contain different source types CO and machine readable output (using -o) requires List object to have GVK set, since the list contains different types of source COs, we set a custom client GVK on it. Fixes #953 * Update CHANGELOG for v0.16.1 Co-authored-by: kaustubh <[email protected]> Co-authored-by: Chris Suszynski <[email protected]> Co-authored-by: tianfeiyu <[email protected]> Co-authored-by: Himanshu Ranjan <[email protected]>
* Fix exit code 0 upon service delete * Mentioned bug fix in CHANGELOG.adoc * Add error check test for service not found * Fix for kn revision delete failure exit code and add test cases * Testing changes in test cases for failure in intergration tests * Fix test case error causing integration test failure
Description
Fixed exit code issue on service delete
Changes
kn service delete
Reference
Fixes #960