Skip to content

az bicep decompile: add exit code for warning errors #25009

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

Open
juju4 opened this issue Dec 30, 2022 · 5 comments
Open

az bicep decompile: add exit code for warning errors #25009

juju4 opened this issue Dec 30, 2022 · 5 comments
Labels
ARM - Templates customer-reported Issues that are reported by GitHub users external to the Azure organization. Service Attention This issue is responsible by Azure service team.

Comments

@juju4
Copy link

juju4 commented Dec 30, 2022

Related command
az bicep decompile

Is your feature request related to a problem? Please describe.
Similar to PowerShell/PSScriptAnalyzer#840
az bicep decompile seems to always return exit code 0 or at least for warnings
there should be an option to detect warning so it can update status appropriately in azure-pipelines
https://learn.microsoft.com/en-us/azure/devops/pipelines/scripts/logging-commands?view=azure-devops&tabs=bash

I'm using this command to validate my ARM templates as part of azure pipelines.

Describe the solution you'd like
Either by default, either with an option, it should be possible an exit code that could match a pipeline status (success, warn, fail/error...)

Describe alternatives you've considered
An alternative would be trapping command output and search for warning.

Additional context
N/A

@ghost ghost added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Dec 30, 2022
@yonzhan yonzhan added ARM az resource/group/lock/tag/deployment/policy/managementapp/account management-group CXP Attention This issue is handled by CXP team. labels Dec 31, 2022
@ghost
Copy link

ghost commented Dec 31, 2022

Thank you for your feedback. This has been routed to the support team for assistance.

@yonzhan
Copy link
Collaborator

yonzhan commented Dec 31, 2022

route to CXP team

@navba-MSFT navba-MSFT added Service Attention This issue is responsible by Azure service team. and removed CXP Attention This issue is handled by CXP team. labels Jan 2, 2023
@ghost
Copy link

ghost commented Jan 2, 2023

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @josephkwchan, @jennyhunter-msft.

Issue Details

Related command
az bicep decompile

Is your feature request related to a problem? Please describe.
Similar to PowerShell/PSScriptAnalyzer#840
az bicep decompile seems to always return exit code 0 or at least for warnings
there should be an option to detect warning so it can update status appropriately in azure-pipelines
https://learn.microsoft.com/en-us/azure/devops/pipelines/scripts/logging-commands?view=azure-devops&tabs=bash

I'm using this command to validate my ARM templates as part of azure pipelines.

Describe the solution you'd like
Either by default, either with an option, it should be possible an exit code that could match a pipeline status (success, warn, fail/error...)

Describe alternatives you've considered
An alternative would be trapping command output and search for warning.

Additional context
N/A

Author: juju4
Assignees: -
Labels:

Service Attention, ARM, customer-reported

Milestone: -

@navba-MSFT
Copy link
Contributor

Adding Service team, to look into this.

@josephkwchan, @jennyhunter-msft Could you please look into this once you get a chance ?

@ghost
Copy link

ghost commented Jan 3, 2023

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

Issue Details

Related command
az bicep decompile

Is your feature request related to a problem? Please describe.
Similar to PowerShell/PSScriptAnalyzer#840
az bicep decompile seems to always return exit code 0 or at least for warnings
there should be an option to detect warning so it can update status appropriately in azure-pipelines
https://learn.microsoft.com/en-us/azure/devops/pipelines/scripts/logging-commands?view=azure-devops&tabs=bash

I'm using this command to validate my ARM templates as part of azure pipelines.

Describe the solution you'd like
Either by default, either with an option, it should be possible an exit code that could match a pipeline status (success, warn, fail/error...)

Describe alternatives you've considered
An alternative would be trapping command output and search for warning.

Additional context
N/A

Author: juju4
Assignees: -
Labels:

Service Attention, ARM, ARM - Templates, customer-reported

Milestone: -

@jennyhunter-msft jennyhunter-msft removed the ARM az resource/group/lock/tag/deployment/policy/managementapp/account management-group label Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARM - Templates customer-reported Issues that are reported by GitHub users external to the Azure organization. Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

4 participants