Skip to content

[ARM] az bicep build: Fix #22621: --stdout does not work#22685

Merged
zhoxing-ms merged 3 commits intoAzure:devfrom
shenglol:shenglol/fix-bicep-stdout
Jun 4, 2022
Merged

[ARM] az bicep build: Fix #22621: --stdout does not work#22685
zhoxing-ms merged 3 commits intoAzure:devfrom
shenglol:shenglol/fix-bicep-stdout

Conversation

@shenglol
Copy link
Copy Markdown
Contributor

@shenglol shenglol commented May 31, 2022

Related command

Description
v2.37.0 has a regression where --stdout stops working for az bicep build. The PR fixes it.

Closes #22621.

Testing Guide
az bicep build -f main.bicep --stdout


This checklist is used to make sure that common guidelines for a pull request are followed.

@ghost ghost added the Auto-Assign Auto assign by bot label May 31, 2022
@ghost ghost requested a review from yonzhan May 31, 2022 20:38
@ghost ghost assigned zhoxing-ms May 31, 2022
@ghost ghost added this to the Jun 2022 (2022-07-05) milestone May 31, 2022
@ghost ghost added the ARM az resource/group/lock/tag/deployment/policy/managementapp/account management-group label May 31, 2022
Copy link
Copy Markdown
Member

@ellismg ellismg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Just wondering - imagine that we only called run_bicep_command(args) from a single place (i.e. as we do on line 3687) and just captured the output and then depending on if stdout was set we printed the value, otherwise return?

I'm wondering if that would make it less likely, going forward, for issues like this to be introduced?

@shenglol
Copy link
Copy Markdown
Contributor Author

LGTM.

Just wondering - imagine that we only called run_bicep_command(args) from a single place (i.e. as we do on line 3687) and just captured the output and then depending on if stdout was set we printed the value, otherwise return?

I'm wondering if that would make it less likely, going forward, for issues like this to be introduced?

Good point. I'll do some refactoring.

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented May 31, 2022

ARM

@AlexanderSehr
Copy link
Copy Markdown

@shenglol Please merge this as soon as you can. This bug causes all CARML pipelines running on Ubuntu-20.04 to fail as the 'az bicep build' command does not return any more results.
The workaround of adding '--no-restore' may have other un-intended complications so we may wait for this fix to be merged.

@shenglol
Copy link
Copy Markdown
Contributor Author

shenglol commented Jun 3, 2022

@zhoxing-ms Could you help approve and merge the PR?

@shenglol
Copy link
Copy Markdown
Contributor Author

shenglol commented Jun 3, 2022

@shenglol Please merge this as soon as you can. This bug causes all CARML pipelines running on Ubuntu-20.04 to fail as the 'az bicep build' command does not return any more results. The workaround of adding '--no-restore' may have other un-intended complications so we may wait for this fix to be merged.

I'd suggest using the workaround below:

az bicep restore -f main.bicep
az bicep build -f main.bicep --no-restore

Or we can just directly invoke Bicep CLI available at ~/.azure/bin/bicep.

@zhoxing-ms zhoxing-ms merged commit f5db5e6 into Azure:dev Jun 4, 2022
@ellismg
Copy link
Copy Markdown
Member

ellismg commented Jun 6, 2022

Thanks for the quick fix!

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

Labels

ARM az resource/group/lock/tag/deployment/policy/managementapp/account management-group Auto-Assign Auto assign by bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Regression] --stdout does not work for az bicep build in v2.37.0

5 participants