-
Notifications
You must be signed in to change notification settings - Fork 244
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
Updating config cmds and tests for logged out senario #4975
Updating config cmds and tests for logged out senario #4975
Conversation
7f201fe
to
8e9a9ba
Compare
timeout |
1 similar comment
timeout |
project list json output |
890fedf
to
7cc309a
Compare
timeout |
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.
Code is adding a bunch of err1
and err2
. I'm not sure why we're not just using err
. Subsequent calls would either set err
to nil
or an error returned by the function called. What's wrong in using it?
@mohammedzee1000 can you please update the Changelog.md and add the steps to test the change in this PR? |
a831e46
to
efb235d
Compare
prow error |
Unrelated error • Failure [55.931 seconds]
odo devfile push command tests
/go/src/github.com/openshift/odo/tests/integration/devfile/cmd_devfile_push_test.go:18
verify command executions
/go/src/github.com/openshift/odo/tests/integration/devfile/cmd_devfile_push_test.go:464
when default build and run commands are defined
/go/src/github.com/openshift/odo/tests/integration/devfile/cmd_devfile_push_test.go:494
should execute correct commands [It]
/go/src/github.com/openshift/odo/tests/integration/devfile/cmd_devfile_push_test.go:495
Unexpected error:
<*errors.errorString | 0xc0003583e0>: {
s: "cmd [ps -ef] failed with error Signal 23 (URG) caught by ps (3.3.15).\nps:ps/display.c:66: please report this bug\ncommand terminated with exit code 1\n on pod ammwlb-app-f48ddc5d7-vcmck",
}
cmd [ps -ef] failed with error Signal 23 (URG) caught by ps (3.3.15).
ps:ps/display.c:66: please report this bug
command terminated with exit code 1
on pod ammwlb-app-f48ddc5d7-vcmck
occurred
/go/src/github.com/openshift/odo/tests/integration/devfile/cmd_devfile_push_test.go:514
------------------------------
••••••••• /test v4.8-integration-e2e Timed out /test psi-kubernetes-integration-e2e |
732dff0
to
b39927e
Compare
pkg/util/util.go
Outdated
} else { | ||
klog.V(4).Infof("no KUBECONFIG provided and cannot fallback to default") | ||
return false | ||
func IsValidKubeConfigPath() error { |
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'm not sure if the return value of this function should be error
. Function name indicates that the response to expect from it should be either Yes or No, that is, a boolean value.
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.
Renaming
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'm more inclined at not changing the signature of the function, if possible.
pkg/util/util.go
Outdated
func IsValidKubeConfigPath() error { | ||
kubeConfigPath := os.Getenv("KUBECONFIG") | ||
if kubeConfigPath != "" { | ||
f1, err := os.Stat(kubeConfigPath) |
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.
Why f1
and not f
? Something to do with Formula 1? 😉
pkg/util/util.go
Outdated
return nil | ||
} | ||
|
||
func NewInvalidKubeConfigPathError() error { |
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.
Why NewInvalidKubeConfigPathError
and not InvalidKubeConfigPathError
? Also, why define a function instead of defining it as an error type? For example: https://github.com/openshift/odo/blob/089b8ea26c253592cd4788ed615a698297d620a5/pkg/kclient/operators.go#L15-L17
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.
Updating
time out |
Prow error |
/retest |
Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>
Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>
Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>
Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>
Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>
Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>
Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>
Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>
Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>
Co-authored-by: Dharmit Shah <shahdharmit@gmail.com>
Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>
Co-authored-by: Philippe Martin <contact@elol.fr>
659470e
to
2d3fe86
Compare
SonarCloud Quality Gate failed. 0 Bugs No Coverage information |
/lgtm |
json format project error |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: valaparthvi 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 |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
5 similar comments
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
Signed-off-by: Mohammed Zeeshan Ahmed mohammed.zee1000@gmail.com
What type of PR is this?
See topic
Also, identified 2 cases:
Essentially it boils down to us not handling error from context.New()
/kind bug
What does this PR do / why we need it:
See topic
Which issue(s) this PR fixes:
Fixes #4910
PR acceptance criteria:
Unit test
Integration test
Documentation
Update changelog
I have read the test guidelines
How to test changes / Special notes to the reviewer: