Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

ps:scale does not understand the new dyno types #1586

Closed
shedd opened this issue May 26, 2015 · 2 comments
Closed

ps:scale does not understand the new dyno types #1586

shedd opened this issue May 26, 2015 · 2 comments

Comments

@shedd
Copy link

shedd commented May 26, 2015

There seems to be a bug in trying to scale applications using the ps:scale command with the new dyno types.

I keep hitting this error:

$ heroku ps:scale web=1:Standard-2X worker=1:Standard-1X --app appname
! Usage: heroku ps:scale DYNO1=AMOUNT1[:SIZE] [DYNO2=AMOUNT2 ...]
! Must specify DYNO and AMOUNT to scale.
$ heroku ps:scale web=1:standard-2X worker=1:standard-1X --app appname
! Usage: heroku ps:scale DYNO1=AMOUNT1[:SIZE] [DYNO2=AMOUNT2 ...]
! Must specify DYNO and AMOUNT to scale.

This syntax works with the old 1X, 2X, PX dynos, but not the new names.

@bharat
Copy link

bharat commented May 30, 2015

I deleted my earlier comments - they were about an unrelated issue (you can't use heroku toolbelt to change the dyno type until you take an action in the web ui first).

However - I believe this issue is caused by a failure in the regex here:
https://github.com/heroku/heroku/blob/master/lib/heroku/command/ps.rb#L232

Changing the \w+ to [\w-]+ resolved the problem for me:

      if change = arg.scan(/^([a-zA-Z0-9_]+)([=+-]\d+)(?::([\w-]+))?$/).first

bharat pushed a commit to bharat/heroku that referenced this issue May 30, 2015
@jdx
Copy link
Contributor

jdx commented Jun 1, 2015

fixed in 3.37.4

@jdx jdx closed this as completed Jun 1, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants