Skip to content

Azure CLI Task is emitting a lot of log output #15970

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

Closed
jhueppauff opened this issue Feb 25, 2022 · 5 comments
Closed

Azure CLI Task is emitting a lot of log output #15970

jhueppauff opened this issue Feb 25, 2022 · 5 comments

Comments

@jhueppauff
Copy link

Type: Question (maybe a feature request)

Enter Task Name: AzureCLI

Environment

Azure Pipelines - affects all accounts

  • Agent - Hosted or Private:

Hosted agent and private agent

Issue Description

I am using the AzureCLI Task in a pipeline to build bicep files.

- task: AzureCLI@2  
  displayName: 'Build bicep artifact' 
  inputs: 
    azureSubscription: ${{ parameters.azureServiceConnection }}
    scriptType: 'pscore'  
    scriptLocation: 'inlineScript'  
    inlineScript: 'az bicep build --file $(Build.SourcesDirectory)/templates/keyvault.bicep'

The task emits an unnecessary amount of output which makes it harder to catch the important and "real" log output.

As far as I can tell it runs az --version which takes about 20 lines and then it prints out every subscription it seems to have access to. Which in my case adds 60 lines of output.

The only output the inline script produces (when everything goes right) is 0.

It feels a bit wrong to print out so much unnecessary information and it makes it hard to catch the important stuff.
Is there any option to reduce the amount of log output?

@github-actions github-actions bot added Area: Release enhancement environment:need-to-triage Issues need to be triage by environment-deployment team question labels Feb 25, 2022
@PhilipsonJoseph PhilipsonJoseph removed the environment:need-to-triage Issues need to be triage by environment-deployment team label Feb 28, 2022
@TripleMalahat
Copy link

I agree entirely. I came looking for info on this behaviour as well. I found this closed issue from last year: #14156. It has a not-ideal workaround in it but no fix. Any chance this behaviour could be revisited? My environment have over 100 subscriptions in it so this makes the logs for each AzureCLI@2 task an absolute mess.

@piotr-gbyliczek
Copy link
Contributor

I've come across this issue too and attempted to change the code to facilitate hiding extra output: #16701.

@github-actions
Copy link

github-actions bot commented Feb 4, 2023

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

@github-actions github-actions bot added the stale label Feb 4, 2023
@syedhamjath
Copy link

syedhamjath commented Feb 9, 2023

There is no harm in reducing the log size to make everyone life less difficult. @jhueppauff Please remove the stale label.

@github-actions github-actions bot removed the stale label Feb 9, 2023
@github-actions
Copy link

github-actions bot commented Aug 8, 2023

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

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

7 participants