Skip to content

display progress notification during deploy - #280

Merged
lukemelia merged 1 commit into
masterfrom
pleasant-progress
Jan 22, 2016
Merged

lukemelia merged 1 commit into
masterfrom
pleasant-progress

Conversation

@ghedamat

Copy link
Copy Markdown
Collaborator

first pass at addressing #276

Remaining TODOs:

  • add commandLine option to disable progressBar
  • add configFile option as well
  • ideally figure out a way to resolve rendering issues as seen in the video
  • test this out?
  • update ember-cli-deploy-plugin version in core repos

http://gsnaps.s3.amazonaws.com/screencast_2016-01-08_14-54-36_0_edited.mp4

@ghedamat

Copy link
Copy Markdown
Collaborator Author

shall we make the progress thingy optional if --verbose is passed?

@lukemelia

Copy link
Copy Markdown
Contributor

I don't want to rush this into 0.5.0. I'd suggest saving it for 0.5.1.

@ghedamat

Copy link
Copy Markdown
Collaborator Author

works for me :)

@lukemelia lukemelia added this to the 0.6.x milestone Dec 30, 2015
@seawatts

seawatts commented Jan 6, 2016

Copy link
Copy Markdown

Woo hoo this would be awesome!

@ghedamat

ghedamat commented Jan 8, 2016

Copy link
Copy Markdown
Collaborator Author

current status
http://gsnaps.s3.amazonaws.com/screencast_2016-01-08_14-54-36_0_edited.mp4

we don't count configure hooks

we trigger a tick for each of the other hooks, in my demo app we have 10 ticks in total

it's still a bit "choppy" because some hooks are faster than other but I think it's not bad.

feedback is welcome

@lukemelia @achambers @seawatts

@ghedamat

ghedamat commented Jan 8, 2016

Copy link
Copy Markdown
Collaborator Author

also, this currently runs also for deploy:list and deploy:activate and ends up looking quite weird.

maybe we should pass an option and do it only for deploy?

ghedamat added a commit to ember-cli-deploy/ember-cli-deploy-plugin that referenced this pull request Jan 11, 2016
This is related to ember-cli-deploy/ember-cli-deploy#280

In order to ensure proper rendering we need to reset the line position
to 0. This can not be the case if the progress bar is rendering and a
plugin tries to display a log message (i.e. the redis plugin notifying
about the upoaded revision)
@ghedamat

Copy link
Copy Markdown
Collaborator Author

once we merge ember-cli-deploy/ember-cli-deploy-plugin#6 and update the relevant plugins we should solve the overlap problem

http://gsnaps.s3.amazonaws.com/screencast_2016-01-10_22-06-28_0_edited.mp4

ghedamat added a commit to ember-cli-deploy/ember-cli-deploy-plugin that referenced this pull request Jan 11, 2016
This is related to ember-cli-deploy/ember-cli-deploy#280

In order to ensure proper rendering we need to reset the line position
to 0. This can not be the case if the progress bar is rendering and a
plugin tries to display a log message (i.e. the redis plugin notifying
about the upoaded revision)
ghedamat added a commit to ember-cli-deploy/ember-cli-deploy-plugin that referenced this pull request Jan 11, 2016
This is related to ember-cli-deploy/ember-cli-deploy#280

In order to ensure proper rendering we need to reset the line position
to 0. This can not be the case if the progress bar is rendering and a
plugin tries to display a log message (i.e. the redis plugin notifying
about the upoaded revision)
ghedamat added a commit to ember-cli-deploy/ember-cli-deploy-plugin that referenced this pull request Jan 11, 2016
This is related to ember-cli-deploy/ember-cli-deploy#280

In order to ensure proper rendering we need to reset the line position
to 0. This can not be the case if the progress bar is rendering and a
plugin tries to display a log message (i.e. the redis plugin notifying
about the upoaded revision)
ghedamat added a commit to ember-cli-deploy/ember-cli-deploy-plugin that referenced this pull request Jan 11, 2016
This is related to ember-cli-deploy/ember-cli-deploy#280

In order to ensure proper rendering we need to reset the line position
to 0. This can not be the case if the progress bar is rendering and a
plugin tries to display a log message (i.e. the redis plugin notifying
about the upoaded revision)
@ghedamat

Copy link
Copy Markdown
Collaborator Author

@seawatts

Copy link
Copy Markdown

👍

On Tue, Jan 12, 2016 at 3:21 PM, Mattia Gheda [email protected]
wrote:

Now with increased niceness
http://gsnaps.s3.amazonaws.com/screencast_2016-01-12_18-19-02_0_edited.mp4

(note that I'll have to add a tweak to ember-cli-deploy-plugin for this
to work properly)

—
Reply to this email directly or view it on GitHub
#280 (comment)
.

Chris Watts | Software Engineer | [email protected]

@stefanpenner

Copy link
Copy Markdown
Contributor

fancy

@ghedamat

Copy link
Copy Markdown
Collaborator Author

@lukemelia @stefanpenner you might know this

what's the consensus on adding an emoji to a command line prompt? from experience I know it likely won't work on linux terminals, so I'm kind of against it but it would be cute (I was thinking of 🚀)

@hhff

hhff commented Jan 13, 2016

Copy link
Copy Markdown

💅

@lukemelia

Copy link
Copy Markdown
Contributor

@ghedamat no idea of tech details of terminal emoji, but we could probably platform detect, I am 👍 🚀 ❗

@ghedamat
ghedamat force-pushed the pleasant-progress branch 3 times, most recently from 4717508 to c429f7d Compare January 21, 2016 09:40
@ghedamat
ghedamat force-pushed the pleasant-progress branch 8 times, most recently from 522a3b2 to 6324290 Compare January 21, 2016 10:22
@ghedamat

Copy link
Copy Markdown
Collaborator Author

ok, to whom is interested, now I consider this ready for review :p

only thing to note is that from what I can tell ember-cli help won't print long aliases correctly (maybe this should be a separate PR)

i.e.

--show-progress is aliased to -p and --progress

but the help is printed as

ember deploy <deployTarget> <options...>
  Deploys an ember-cli app
  --deploy-config-file (String) (Default: config/deploy.js)
  --verbose (Boolean) (Default: false)
  --activate (Boolean) (Default: false)
  --show-progress (Boolean) (Default: true)
    aliases: -p, -progress

it seems that when using it both -progress and --progress are being supported
see https://github.com/ember-cli/ember-cli/blob/282641ba662292afb40cb88cdf31557a3e4cc6b7/lib%2Futilities%2Fprint-command.js#L76

EDIT:
just opened ember-cli/ember-cli#5380 that should address ^^

@lukemelia

Copy link
Copy Markdown
Contributor

@ghedamat looks great! I have one last idea for your consideration. Shall we only default this to true if the command is being run from a terminal? Seems like we can check process.stdout.isTTY (source)

@ghedamat

Copy link
Copy Markdown
Collaborator Author

@lukemelia done directly in the deploy command so that it's the default

minor problem is: if you use .ember-cli option that will override the default, but I don't see why one would force it to "true" as that's the standard behaviour anyway

lukemelia added a commit that referenced this pull request Jan 22, 2016
display progress notification during deploy
@lukemelia
lukemelia merged commit 81adff5 into master Jan 22, 2016
@lukemelia
lukemelia deleted the pleasant-progress branch January 22, 2016 14:23
@lukemelia

Copy link
Copy Markdown
Contributor

Great work @ghedamat!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants