-
Notifications
You must be signed in to change notification settings - Fork 243
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
Support exec command #6579
Support exec command #6579
Conversation
✅ Deploy Preview for odo-docusaurus-preview ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
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.
A few comments after testing it.
|
9d59bf5
to
f48d25e
Compare
8c2fd60
to
65c38a1
Compare
Signed-off-by: Parthvi Vala <pvala@redhat.com>
Signed-off-by: Parthvi Vala <pvala@redhat.com>
Signed-off-by: Parthvi Vala <pvala@redhat.com>
Signed-off-by: Parthvi Vala <pvala@redhat.com>
…re that Signed-off-by: Parthvi Vala <pvala@redhat.com>
…nto account Signed-off-by: Parthvi Vala <pvala@redhat.com>
…le pkg Signed-off-by: Parthvi Vala <pvala@redhat.com>
Signed-off-by: Parthvi Vala <pvala@redhat.com>
Signed-off-by: Parthvi Vala <pvala@redhat.com>
…unc doc and gofmt the files Signed-off-by: Parthvi Vala <pvala@redhat.com>
Signed-off-by: Parthvi Vala <pvala@redhat.com>
Signed-off-by: Parthvi Vala <pvala@redhat.com>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
When I execute a long-running command, and try to get the logs, as documented in the output of
I'm not sure if it is a problem on |
Are you running |
I'm running
|
My bad, I cannot reproduce it either today. |
Thanks @valaparthvi for this work |
Unrelated failing test |
@feloy: Overrode contexts on behalf of feloy: Kubernetes-Integration-Tests/Kubernetes-Integration-Tests In response to this:
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. |
* Support exec command for deploy Signed-off-by: Parthvi Vala <pvala@redhat.com> * Print log after timeout Signed-off-by: Parthvi Vala <pvala@redhat.com> * Add helper function to form proper commandLine Signed-off-by: Parthvi Vala <pvala@redhat.com> * Mockgen kclient Signed-off-by: Parthvi Vala <pvala@redhat.com> * Enhance error message Signed-off-by: Parthvi Vala <pvala@redhat.com> * Attempt at fixing unit test failures Signed-off-by: Parthvi Vala <pvala@redhat.com> * Rename import v1 to batchv1 Signed-off-by: Parthvi Vala <pvala@redhat.com> * Remove TODOs Signed-off-by: Parthvi Vala <pvala@redhat.com> * Add integration tests and cleanup on user interrupt Signed-off-by: Parthvi Vala <pvala@redhat.com> * Temp changes Signed-off-by: Parthvi Vala <pvala@redhat.com> * Log tip to run odo logs after a minute Signed-off-by: Parthvi Vala <pvala@redhat.com> * List components to delete even if there are no devfile resources Signed-off-by: Parthvi Vala <pvala@redhat.com> * Fix integration tests Signed-off-by: Parthvi Vala <pvala@redhat.com> * Fix deploy exec delete integration test Signed-off-by: Parthvi Vala <pvala@redhat.com> * Temp Change * Fix delete command tests * Fix mockgen client * Fix validation errors Signed-off-by: Parthvi Vala <pvala@redhat.com> * Fix unit test failure Signed-off-by: Parthvi Vala <pvala@redhat.com> * Attemp at writing less flaky integration test Signed-off-by: Parthvi Vala <pvala@redhat.com> * Remove TODOs Signed-off-by: Parthvi Vala <pvala@redhat.com> * Add tip after 1 minute and return the go routine if job finishes before that Signed-off-by: Parthvi Vala <pvala@redhat.com> * Use the container as it is so that container-overrides can be taken into account Signed-off-by: Parthvi Vala <pvala@redhat.com> * Move job spec code to a different helper function inside the libdevfile pkg Signed-off-by: Parthvi Vala <pvala@redhat.com> * Modify the Execute method to use the new helper function and refactoring Signed-off-by: Parthvi Vala <pvala@redhat.com> * Attempt at fixing integration and unit tests Signed-off-by: Parthvi Vala <pvala@redhat.com> * Move defer to print remaining resources to a separate function, fix func doc and gofmt the files Signed-off-by: Parthvi Vala <pvala@redhat.com> * Fix test failures Signed-off-by: Parthvi Vala <pvala@redhat.com> * Cleanup Signed-off-by: Parthvi Vala <pvala@redhat.com> * Cleanup unused functions Signed-off-by: Parthvi Vala <pvala@redhat.com> --------- Signed-off-by: Parthvi Vala <pvala@redhat.com>
What type of PR is this:
What does this PR do / why we need it:
Which issue(s) this PR fixes:
Fixes #5701
PR acceptance criteria:
Unit test
Integration test
Documentation
How to test changes / Special notes to the reviewer:
git clone https://github.com/kadel/demo-odo-springboot.git
git checkout d5956f5
devfile.yaml
odo deploy
The first task(deploy-pi-db) should execute successfully, the second(deploy-db) should fail because of incorrect ServiceAccount setup. In both cases a log should be printed and the job should be deleted in 60s after its completion.
There is a third case where if the job continues to run after 60s minute, log/error will be printed after every 60s which will continue until the user interrupts. This can be tested by changing the image for container comp
pi
togeolandg
or some non-existent image.