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

az dls cmd logs preview warning to stderr since new version which makes devops pipeline fail #9891

Closed
markvanschaik opened this issue Jul 9, 2019 · 7 comments
Assignees
Labels
Core CLI core infrastructure

Comments

@markvanschaik
Copy link

markvanschaik commented Jul 9, 2019

Describe the bug

Command Name
az dls account list

Errors:
A dls-preview warning is shown when calling any az dls cmd, which is written to the std err output. The devops pipeline fails, as it is treated as an error.

Command group 'dls' is in preview. It may be changed/removed in a future release.

We came up with a temporary solution to write the error to the null device by adding 2> /dev/null to each az dls cmd, so that the pipeline will succeed.

To Reproduce:

Execute any az dls command. For example:

  • az dls account list --query {}

Expected Behavior

The dls commands were not in preview before, so we were suprised to find it in preview mode since the new version came out.

Environment Summary

Windows-10-10.0.17134-SP0
Python 3.6.6
Shell: powershell.exe

azure-cli 2.0.68

Additional Context

@tjprescott
Copy link
Member

The DLS commands have always been in preview. It was not called out until the recent change.

@Juliehzl Juliehzl added the Data Lake Store az dls label Aug 12, 2019
@aweiker
Copy link

aweiker commented Oct 4, 2019

The pipelines commands had the same thing happen to them. The side effect here is that our Azure DevOps pipelines now fail because warnings are written to STDERR.

How is this new feature disabled so that we can differentiate between an error and an informational notice?

@yonzhan yonzhan added the Service Attention This issue is responsible by Azure service team. label Oct 6, 2019
@ghost
Copy link

ghost commented Oct 6, 2019

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @sumantmehtams

@yugangw-msft yugangw-msft added Core CLI core infrastructure and removed Data Lake Store az dls Service Attention This issue is responsible by Azure service team. labels Oct 8, 2019
@yonzhan yonzhan added this to the Sprint 76 - For Ignite milestone Oct 8, 2019
@jiasli
Copy link
Member

jiasli commented Oct 8, 2019

Writing to std.err is a very common behavior across many CLI tools.

The CI should not rely on the contents in std.err. The CI should check the exit code instead: https://github.com/Azure/azure-cli#exit-codes

@Azure Azure deleted a comment from yonzhan Oct 9, 2019
@igelineau
Copy link

The problem is Powershell is not very friendly with programs writing to STDERR. I've spend half of my day trying to strip out what is written to STDERR and only keep the JSON output from STDOUT, but didn't find a solution yet. Any workaround at this point would be much appreciated.

@atbagga
Copy link
Contributor

atbagga commented Oct 17, 2019

@igelineau Follow this thread for detailed conversations and some workarounds - microsoft/knack#166

@jiasli
Copy link
Member

jiasli commented Mar 24, 2020

We have added option --only-show-errors in #12604 to disable warnings that are written to stderr. It will be included in S167 release.

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

No branches or pull requests

10 participants