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

[Wait-And-Retry] Decorator output standardization #16603

Merged
merged 2 commits into from
Mar 11, 2025

Conversation

subha-sa
Copy link
Contributor

@subha-sa subha-sa commented Mar 11, 2025

This is an incremental PR that introduces the WaitUntil and RetryOn decorators to the Bicep language.
The PR introduces changes on WaitUntil and RetryOn decorators where the output of the decorators is standardized based on this PR Azure/bicep-reps#13

Context:
Users are facing issues with certain RPs (example SRP), where due to latency in replication or RP itself responded with success even before the resource is ready for use.

In such a case, dependent resource deployments fail, because the resource isn't available according to ARM or some properties of the resource isn't available like list keys for example. #1013 for reference.

Previous PRs
#16167
#16342

Microsoft Reviewers: Open in CodeFlow

Copy link
Contributor

github-actions bot commented Mar 11, 2025

Test this change out locally with the following install scripts (Action run 13796379411)

VSCode
  • Mac/Linux
    bash <(curl -Ls https://aka.ms/bicep/nightly-vsix.sh) --run-id 13796379411
  • Windows
    iex "& { $(irm https://aka.ms/bicep/nightly-vsix.ps1) } -RunId 13796379411"
Azure CLI
  • Mac/Linux
    bash <(curl -Ls https://aka.ms/bicep/nightly-cli.sh) --run-id 13796379411
  • Windows
    iex "& { $(irm https://aka.ms/bicep/nightly-cli.ps1) } -RunId 13796379411"

Copy link
Contributor

Dotnet Test Results

    78 files   -     39      78 suites   - 39   32m 26s ⏱️ - 17m 35s
11 936 tests  -     13  11 936 ✅  -     13  0 💤 ±0  0 ❌ ±0 
27 630 runs   - 13 810  27 630 ✅  - 13 810  0 💤 ±0  0 ❌ ±0 

Results for commit 344c233. ± Comparison against base commit 67d80a3.

This pull request removes 1792 and adds 611 tests. Note that renamed tests count towards both.

		nestedProp1: 1
		nestedProp2: 2
		prop1: true
		prop2: false
	1
	2
	\$'")
	prop1: true
	prop2: false
…
Bicep.Core.IntegrationTests.AzTypesViaRegistryTests ‑ Bicep_compiler_handles_corrupted_extension_package_gracefully (\u001f�\u0008\u0000\u0000\u0000\u0000\u0000\u0000
�ӽ
�0\u0010\u0007��>E�\u0003�K����"��\u0000ў��*m�������\u000f0�%�;�%�/�K���r�j��Tc��\u0006�պs�%CM�\u00030@c�1�\u0007��ån\\u0015F��Y?H!w;��D-\u00110�Xa&F\u0001�Bi�S�\u0019?�f7ۗ9yq�Oe�]�t���Q��\u000f��^�\u001fҐ��V�1�R\u000clXC�?��?���'����6
�\u000b*�T%S�uǚnߞ-��(z�;�\u0002e\u0008\u0000\u000c\u0000\u0000,"Value cannot be null. (Parameter 'source')")
Bicep.Core.IntegrationTests.AzTypesViaRegistryTests ‑ Bicep_compiler_handles_corrupted_extension_package_gracefully (\u001f�\u0008\u0000\u0000\u0000\u0000\u0000\u0000
�ӽ\u000e�0\u0010\u0007��>\u0005OPzm�\u0007\u0003����(�\u001f�\u0018
������\u0001�`b�c/�^���tg�mi\u000fe�"�)gs\u0013��z�|\u0000\u0008\u000c�E0A�
cI?�$#:��&���]?Hf�mOUY\u0000i Ayf8*�#�&���5H��=\u0016��������nh��\u001a�~h4������O�\u0017B2�d�@TR���\u001a�H&�<����\u0013DQ\u0014Ekx\u00025OH�\u0000\u000c\u0000\u0000,"The path: index.json was not found in artifact contents")
Bicep.Core.IntegrationTests.AzTypesViaRegistryTests ‑ Bicep_compiler_handles_corrupted_extension_package_gracefully (\u001f�\u0008\u0000\u0000\u0000\u0000\u0000\u0000
���\u000b�0\u0014\u0007��+�?`ns���C�!#,\u0008���A\u0006Z���?�<D\u0017��?��9n\u000f���}�۫z�U��\u0012�@��Q߈!9o]oP\u000e��\u001bA\u0004��\u0011r��;i�(+U�V�8�\u0007����4�!\u0005N�@0�XH�@��읻�h��Uu	�<�5����)Ϻʧ�������=ѷ�\u0013Ƒ�\u0001�\u0013�{�\u0010�B0��Q2�����Q|\n��is����1\u0013x�,˲��\u0000V> $\u0000\u000c\u0000\u0000,"'7' is an invalid end of a number. Expected a delimiter. Path: $.INVALID_JSON | LineNumber: 0 | BytePositionInLine: 20.")
Bicep.Core.IntegrationTests.AzTypesViaRegistryTests ‑ Bicep_compiler_handles_corrupted_extension_package_gracefully (\u001f�\u0008\u0000\u0000\u0000\u0000\u0000\u0000\u0003�ӽ
�0\u0010\u0007��>E�\u0003�I����Ep�\u0001b{b���V(��n:�K�K?\u0004�\u001bs\u0007w���`o�-�\u0014����C@��1KK������y\u000c�\u0004�#����׍��*s��A\u0002�i�\u001cc\u000e�\u0003�HH���\u0014�l)\u0019(�5)Ms��"Ŗ^�[�u�\u0003�K��\u0019���t3�埅6�\u0012�dJ1m�\u00126��d���� ����Ĥ�t��\u0011+�CN�Z�s��\u001c�q��\u0000��Ea\u0000\u000c\u0000\u0000,"Value cannot be null. (Parameter 'source')")
Bicep.Core.IntegrationTests.AzTypesViaRegistryTests ‑ Bicep_compiler_handles_corrupted_extension_package_gracefully (\u001f�\u0008\u0000\u0000\u0000\u0000\u0000\u0000\u0003���
�0\u000c\u0007��\u0014>AMlj���\u001d�
e\u0013��u���ػ�\u001e\u0006;(�8\u001d��cCHJ��xo�]n�yUK�ȱ\u0014s\u0003/%\u001a}\u001f�F��\u0002\u0002X�\u0016"�g�dD[7��,1�\u0007%&�͹�3dB\u00066��[��\u0018���d
��mNY뮮으ԥ\u001b\u001a����?\u001a�z�߷f|�?@"�8%�\u001a4��#)��E2����?�� \u0008� X�\u00131�b�\u0000\u000c\u0000\u0000,"The path: index.json was not found in artifact contents")
Bicep.Core.IntegrationTests.AzTypesViaRegistryTests ‑ Bicep_compiler_handles_corrupted_extension_package_gracefully (\u001f�\u0008\u0000\u0000\u0000\u0000\u0000\u0000\u0003���\u000b�0\u0014\u0007��+�?`n�m��C�!#,\u0008���A\u0006Z���?�<D\u0017��?��9n\u000f�\u001b����W�Z�D\u0017%�)�\u001eF}#�\u0000h=oP���7���!�ԽO��QV�0����\u0007��QU��J��Ȁ\u0001�\u0000����;w�ѹsW�%L�D��Z��<�*���V���
��[�	\u0003dv�\u0000�9\u0011&��sj�?J&�<�O7���m�:m\u000e��]8f\u0003O=�eY�5�\u0017>#	m\u0000\u000c\u0000\u0000,"'7' is an invalid end of a number. Expected a delimiter. Path: $.INVALID_JSON | LineNumber: 0 | BytePositionInLine: 20.")
Bicep.Core.IntegrationTests.DecompilationTests ‑ Decompiler_handles_banned_function_replacement ("createArray(1, 2, 3)","array","[
  1
  2
  3
]")
Bicep.Core.IntegrationTests.DecompilationTests ‑ Decompiler_handles_banned_function_replacement ("createObject('key', 'value')","object","{
  key: 'value'
}")
Bicep.Core.IntegrationTests.DecompilationTests ‑ Decompiler_handles_strings_with_newlines ("
","\n")
Bicep.Core.IntegrationTests.DecompilationTests ‑ Decompiler_handles_strings_with_newlines ("
","\r\n")
…

Copy link
Member

@majastrz majastrz left a comment

Choose a reason for hiding this comment

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

:shipit:

Copy link
Member

@anthony-c-martin anthony-c-martin left a comment

Choose a reason for hiding this comment

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

LGTM

@subha-sa subha-sa merged commit c306107 into main Mar 11, 2025
47 checks passed
@subha-sa subha-sa deleted the susamban/waitandretry_decoratorStd branch March 11, 2025 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants