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

[Devfile] Add a spinner for deployment rollout #2915

Merged

Conversation

johnmcollier
Copy link
Member

Signed-off-by: John Collier John.J.Collier@ibm.com

What type of PR is this?

Uncomment only one /kind line, and delete the rest.
For example, > /kind bug would simply become: /kind bug

/kind bug
/area devfile

What does does this PR do / why we need it:
This PR adds a spinner to the WaitForDeploymentRollout function in kclient. Previously, since there was no spinner, the user would be looking at

Johns-MacBook-Pro-3:springboot johncollier$ odo push
 •  Push devfile component java-spring-boot  ...

While they waited for the component to rollout. Now they will see:

Johns-MacBook-Pro-3:springboot johncollier$ odo push
 •  Push devfile component java-spring-boot  ...
 ◓  Waiting for component to start

and

Johns-MacBook-Pro-3:springboot johncollier$ odo push
 •  Push devfile component java-spring-boot  ...
 ✓  Waiting for component to start [8s]
 ✓  Checking files for pushing [6ms]
 ✓  Syncing files to the component [2s]
 ✓  Executing devbuild command "/artifacts/bin/build-container-full.sh" [28s]
 ✓  Executing devrun command "/artifacts/bin/start-server.sh" [2s]
 ✓  Push devfile component java-spring-boot [42s]
 ✓  Changes successfully pushed to component

Which issue(s) this PR fixes:

Fixes #2827

How to test changes / Special notes to the reviewer:
Run odo push with a devfile, and verify that the spinner shows up while the deployment rolls out

Signed-off-by: John Collier <John.J.Collier@ibm.com>
Signed-off-by: John Collier <John.J.Collier@ibm.com>
@openshift-ci-robot openshift-ci-robot added kind/bug Categorizes issue or PR as related to a bug. area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. labels Apr 17, 2020
@@ -86,7 +86,7 @@ func (a Adapter) Push(parameters common.PushParameters) (err error) {
}

// Wait for Pod to be in running state otherwise we can't sync data or exec commands to it.
pod, err := a.waitAndGetComponentPod(false)
pod, err := a.waitAndGetComponentPod(true)
Copy link
Contributor

Choose a reason for hiding this comment

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

We set hideSpinner to true here, that means we don't need the spinner for waiting pods?

Copy link
Member Author

Choose a reason for hiding this comment

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

The spinner is not necessary here, we're just using that to retrieve the pod. The actually waiting for the component to start is in the Rollout function.

@GeekArthur
Copy link
Contributor

The changes look good to me, just leave a comment above
/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Apr 17, 2020
@johnmcollier
Copy link
Member Author

/retest

@codecov
Copy link

codecov bot commented Apr 18, 2020

Codecov Report

Merging #2915 into master will increase coverage by 0.01%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2915      +/-   ##
==========================================
+ Coverage   43.70%   43.71%   +0.01%     
==========================================
  Files         102      102              
  Lines        9160     9163       +3     
==========================================
+ Hits         4003     4006       +3     
- Misses       4780     4781       +1     
+ Partials      377      376       -1     
Impacted Files Coverage Δ
...g/devfile/adapters/kubernetes/component/adapter.go 27.61% <0.00%> (ø)
pkg/kclient/deployments.go 35.48% <0.00%> (-1.19%) ⬇️
pkg/watch/watch.go 65.29% <0.00%> (+1.76%) ⬆️

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 3f49286...bd7eca7. Read the comment docs.

@girishramnani
Copy link
Contributor

/approve

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: girishramnani

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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. Required by Prow. label Apr 20, 2020
@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 6740e51 into redhat-developer:master Apr 20, 2020
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. Required by Prow. area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. Required by Prow.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No spinner on wait for deployment rollout
6 participants