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

Decompile-params: Resolve bicep file path relative to current directory #15986

Merged

Conversation

levimatheri
Copy link
Contributor

@levimatheri levimatheri commented Dec 31, 2024

Resolves #13785.

Microsoft Reviewers: Open in CodeFlow

Copy link
Contributor

github-actions bot commented Dec 31, 2024

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

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

@levimatheri levimatheri requested a review from Copilot December 31, 2024 01:18

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Copy link
Contributor

github-actions bot commented Dec 31, 2024

Dotnet Test Results

    78 files   -     39      78 suites   - 39   30m 11s ⏱️ - 16m 39s
11 565 tests  -     25  11 565 ✅  -     25  0 💤 ±0  0 ❌ ±0 
26 860 runs   - 13 422  26 860 ✅  - 13 422  0 💤 ±0  0 ❌ ±0 

Results for commit 9de2240. ± Comparison against base commit a9814db.

This pull request removes 1842 and adds 631 tests. Note that renamed tests count towards both.

		nestedProp1: 1
		nestedProp2: 2
		prop1: true
		prop2: false
	1
	2
	\$'")
	prop1: true
	prop2: false
…
Bicep.Cli.IntegrationTests.CliScenarioTests ‑ Test_Issue13785
Bicep.Core.IntegrationTests.AzTypesViaRegistryTests ‑ Bicep_compiler_handles_corrupted_extension_package_gracefully (\u001f�\u0008\u0000\u0000\u0000\u0000\u0000\u0000
�Խ\u000e�0\u0010\u0007��>E�\u0003�\u0016z\u0014L�]L\|�
g�\u0008\u0012�	���-�q���ab�c�^����{�nQgX7,��\u0019\u0019\u001b�B){�;B*"�\u001b'\\u0001\u0000!�\u001d}�\u001e���ڎ2�^?ȏ�6y��P\u0001���|`1W
b���t�&bZisN�2Ö]�[ٵ\u0017C�K\u001f�\u0019�y���[�y ��\u0003\u0002�a � <\u0004�m�g����A�C�m���l��\u0011koCO���s��\u001c�q��\u0000-Q��\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
��K\u000e� \u0010\u0006`֞�'�3�\u00016ݻ�
D��H�iilb��ta⢍�ZL�[2�0<~��찭�j;n�D��� PRN�����~\u0001\u0006�\u0008\u0018ˆ�'��w޶a�5��A�d֟�D]�2h\u0004qc�DR�P���0�Z�,{wq���s׸���k�}�d���}�>�\u001f@0��ˀ*�Đ�,(���L�y���\u0013$I�$1<\u0001����\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
��M\u000b�0\u0018\u0007��\u0014�\u000f0��7\u0003\u000fA��� �\u001a#\u0007\u0019h�\u0006B_�y�.J\u0017����{\u0006{��\u001f�w�Y\u0019���B
s�#04l	�:�[�ֈ|�\u0000K�)\u0000�\u0019��\u000e��֥me��~\u0010�P�Yn""\u0003.\u0014Q�#\u00152I�̖N=%\u0012���QV��A��Z�����ޣ��}��ҧ�cj����"`�\u0000,8'6��d�����������z�M�9�?�{r\u001c�q��\u0004�#�C\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�ӽ
� \u0010\u0007p�>�O`��Y�w�+H\u001b�\u00071%\u001a\u001a(}����!�K�\u0014�o�8�D�"��~[�C�z���L��A�\u0013��\u000fP#C�\u0002\u000c�&�\u0018�g�dD�m�*K��A��6��D�t^�\u0001%��҄�X�O֐_m8��������7nh��\u001a־h2����5�S�\u0001$C�_\u0006r%c�� a��"�����\u001fko�$I���	�\u0018��\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��K
�0\u0010\u0006�=E�\u0001ҤyU�{7�\u001b\u000f\u0010�\u0011+��6B@���Bܴ��C0�2\u0019�	�\u001f\u001c��݂Ρi1�\u0005�p06�H�{�;����7\u0012\u0010%��Fv�Iz�[�\u001b7�\u001c�~P� m�\u0012R���	U�a�$��t�;�F�6紨r���ު��\u001c*_��ހ��M��[�	��\u0001L\u0010�b�\u000b�\u0014B��ϒ�?��\u0003��
l
��|\u0007�\u0011�p�N���s��<���\u0000+m�\u0002\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���\u000b�0\u0014\u0007��+������f���CFX\u0010t��B\u0006Z���?�<D\u0017��?��9n\u000f�\u001b������:�qR��{ \��F
)D�y�	��z��*\u0000S���'i�(+]�Q����<\u001f�*͒�)\u000e�g�r�\u0000(�|f��]wl�ﺺ\u0004i\u001e'5����)Ϻʧ~�����������	dv\u0000\u0007*�gv\u0001�\u0000`�?J&�<�O'���m�:m\u000e��Y`����ɲ,�\u001a�\u000b��Og\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 ‑ Repository_not_found_in_registry (ArtifactRegistryAddress { RegistryAddress = mcr.microsoft.com, RepositoryPath = unknown/path/az, ExtensionVersion = 0.0.0-placeholder },Azure.RequestFailedException: The artifact does not exist in the registry.
   at Bicep.Core.Registry.AzureContainerRegistryManager.DownloadManifestAndLayersAsync(IOciArtifactReference artifactReference, ContainerRegistryContentClient client) in /home/runner/work/bicep/bicep/src/Bicep.Core/Registry/AzureContainerRegistryManager.cs:line 138
   at Bicep.Core.Registry.AzureContainerRegistryManager.DownloadManifestAndLayersAsync(IOciArtifactReference artifactReference, ContainerRegistryContentClient client) in /home/runner/work/bicep/bicep/src/Bicep.Core/Registry/AzureContainerRegistryManager.cs:line 138,[(BCP192, Error, Unable to restore the artifact with reference "br:mcr.microsoft.com/unknown/path/az:0.0.0-placeholder": The artifact does not exist in the registry.)])
Bicep.Core.IntegrationTests.AzTypesViaRegistryTests ‑ Repository_not_found_in_registry (ArtifactRegistryAddress { RegistryAddress = mcr.microsoft.com, RepositoryPath = unknown/path/az, ExtensionVersion = 0.0.0-placeholder },Azure.RequestFailedException: The artifact does not exist in the registry.
   at Bicep.Core.Registry.AzureContainerRegistryManager.DownloadManifestAndLayersAsync(IOciArtifactReference artifactReference, ContainerRegistryContentClient client) in D:\a\bicep\bicep\src\Bicep.Core\Registry\AzureContainerRegistryManager.cs:line 138
   at Bicep.Core.Registry.AzureContainerRegistryManager.DownloadManifestAndLayersAsync(IOciArtifactReference artifactReference, ContainerRegistryContentClient client) in D:\a\bicep\bicep\src\Bicep.Core\Registry\AzureContainerRegistryManager.cs:line 138,[(BCP192, Error, Unable to restore the artifact with reference "br:mcr.microsoft.com/unknown/path/az:0.0.0-placeholder": The artifact does not exist in the registry.)])
Bicep.Core.IntegrationTests.AzTypesViaRegistryTests ‑ Repository_not_found_in_registry (ArtifactRegistryAddress { RegistryAddress = unknown.registry.azurecr.io, RepositoryPath = bicep/extensions/az, ExtensionVersion = 0.0.0-placeholder },System.AggregateException: Retry failed after 4 tries. Retry settings can be adjusted in ClientOptions.Retry or by configuring a custom retry policy in ClientOptions.RetryPolicy. (No such host is known. (unknown.registry.azurecr.io:443)) (No such host is known. (unknown.registry.azurecr.io:443)) (No such host is known. (unknown.registry.azurecr.io:443)) (No such host is known. (unknown.registry.azurecr.io:443))
   at Bicep.Core.Registry.AzureContainerRegistryManager.DownloadManifestAndLayersAsync(IOciArtifactReference artifactReference, ContainerRegistryContentClient client) in /home/runner/work/bicep/bicep/src/Bicep.Core/Registry/AzureContainerRegistryManager.cs:line 138
   at Bicep.Core.Registry.AzureContainerRegistryManager.<>c__DisplayClass4_0.<<PullArtifactAsync>g__DownloadManifestInternalAsync|0>d.MoveNext() in /home/runner/work/bicep/bicep/src/Bicep.Core/Registry/AzureContainerRegistryManager.cs:line 44
--- End of stack trace from previous location ---
   at Bicep.Core.Registry.AzureContainerRegistryManager.PullArtifactAsync(RootConfiguration configuration, IOciArtifactReference artifactReference) in /home/runner/work/bicep/bicep/src/Bicep.Core/Registry/AzureContainerRegistryManager.cs:line 51
   at Bicep.Core.Registry.AzureContainerRegistryManager.DownloadManifestAndLayersAsync(IOciArtifactReference artifactReference, ContainerRegistryContentClient client) in /home/runner/work/bicep/bicep/src/Bicep.Core/Registry/AzureContainerRegistryManager.cs:line 138
   at Bicep.Core.Registry.AzureContainerRegistryManager.<>c__DisplayClass4_0.<<PullArtifactAsync>g__DownloadManifestInternalAsync|0>d.MoveNext() in /home/runner/work/bicep/bicep/src/Bicep.Core/Registry/AzureContainerRegistryManager.cs:line 44
--- End of stack trace from previous location ---
   at Bicep.Core.Registry.AzureContainerRegistryManager.PullArtifactAsync(RootConfiguration configuration, IOciArtifactReference artifactReference) in /home/runner/work/bicep/bicep/src/Bicep.Core/Registry/AzureContainerRegistryManager.cs:line 63
   at Bicep.Core.Registry.OciArtifactRegistry.TryRestoreArtifactAsync(RootConfiguration configuration, OciArtifactReference reference) in /home/runner/work/bicep/bicep/src/Bicep.Core/Registry/OciArtifactRegistry.cs:line 495,[(BCP192, Error, Unable to restore the artifact with reference "br:unknown.registry.azurecr.io/bicep/extensions/az:0.0.0-placeholder": Retry failed after 4 tries. Retry settings can be adjusted in ClientOptions.Retry or by configuring a custom retry policy in ClientOptions.RetryPolicy. (No such host is known. (unknown.registry.azurecr.io:443)) (No such host is known. (unknown.registry.azurecr.io:443)) (No such host is known. (unknown.registry.azurecr.io:443)) (No such host is known. (unknown.registry.azurecr.io:443)))])
…

♻️ This comment has been updated with latest results.

@levimatheri levimatheri merged commit 4f9a6f2 into main Dec 31, 2024
42 of 47 checks passed
@levimatheri levimatheri deleted the muriukilevi/issue-13785-decompile-param-bicep-file-path branch December 31, 2024 22:31
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.

bicep decompile-params generates invalid output with error BCP051
2 participants