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

Duplicate prefix shown for private spaces warning message #3056

Open
edmorley opened this issue Oct 24, 2024 · 1 comment
Open

Duplicate prefix shown for private spaces warning message #3056

edmorley opened this issue Oct 24, 2024 · 1 comment

Comments

@edmorley
Copy link
Member

This project is for the Heroku CLI only and issues are reviewed as we are able. If you need more immediate assistance or help with anything not specific to the CLI itself, please use https://help.heroku.com.

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

$ h run -a <some private spaces app> bash
Running bash on ⬢ <some private spaces app>... ⣯
 ›   Warning: Warning: Dynos can take up to a few minutes to be provisioned in Private Spaces.

ie: The warning message has a duplicate prefix: Warning: Warning:

What is the expected behavior?

For the warning message to start with Warning: not Warning: Warning:.

Using DEBUG=* the API is returning:

  http   warning-message: 'Warning: Dynos can take up to a few minutes to be provisioned in Private Spaces.'

And then I'm presuming heroku-cli-util is prefixing it further, due to the use of .warn() here?
https://github.com/heroku/heroku-cli-util/blob/3807dd6968ca039130d8ff2f9a48610deab3ee46/lib/command.js#L64-L65

It seems that either the API responses need to not include the "Warning:" prefix, or else the CLI needs to trim such prefixes first if it's going to add it's own.

The API wording itself comes from:
https://github.com/heroku/api/blob/2af59cdad427b7b9b54327422df256518ffb7065/config/locales/en.yml#L649

However, there are several other message constants that use the "Warning:" prefix, which might need fixing too?
https://github.com/search?q=repo%3Aheroku%2Fapi+%22Warning%3A%22+path%3A%2F%5Econfig%5C%2F%2F&type=code

@sbosio
Copy link
Contributor

sbosio commented Oct 25, 2024

Thanks for the report @edmorley.

We will take care of fixing this.

GUS Work Item: W-17068244 (Heroku internal only).

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

No branches or pull requests

2 participants