-
Notifications
You must be signed in to change notification settings - Fork 55
Description
I'm submitting a...
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[x] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:
Problem
We have an issue with the ask-cli breaking our CI/CD pipelines. It is due to [Warn] logs being written to STDERR.
We use the Alexa Skills Kit (ASK) CLI and the Alexa Skill Management API (SMAPI) command in our pipelines.
Although the command executes successfully, our pipeline task fails with:
##[error]Error: The process '/usr/bin/bash' failed because one or more lines were written to the STDERR stream
We have attempted to debug this to see what is being written to STDERR by adding the following to the end of the command, which will prepend "STDERROR: " to each line sent to STDERR.
2> >(while read line; do (>&2 echo "STDERROR: $line"); done)
This results in us seeing
STDERROR: [Warn]: This is an asynchronous operation. Check the progress using the following command: ask smapi get-skill-status --skill-id amzn1.ask.skill.<redacted> --resource interactionModel --profile __ENVIRONMENT_ASK_PROFILE__
According to the documentation (https://developer.amazon.com/en-US/docs/alexa/smapi/ask-cli-command-reference.html) we see the following information:
Most ASK CLI commands can be run in debug mode, by appending --debug to the command. The same results appear as when –debug is not specified, except that an additional debug message is displayed (sent to stderr) after the command finishes running.
This seems to be the issue. This additional debug message is written to STDERR, which is causing our pipeline task to fail as anything written to STDERR is seen as an error.
How can we resolve this? Are there any options we/you can add to the ASK CLI to not write this additional debug message to STDERR?
Note that this was also an issue with the Azure CLI (see Azure/azure-cli#10856) and they resolved this for users by adding in a --only-show-errors option.
Please advise us on what we can do to resolve this.
Request
If writing [Warn] logs to STDERR is the expected behavior for the ask-cli, can you consider adding an option to disable warnings being written to STDERR?
Your Environment and Context
- ask-cli version: v2.22.4