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

[WIP] Support private module completions #16051

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

StephenWeatherford
Copy link
Contributor

@StephenWeatherford StephenWeatherford commented Jan 9, 2025

Fixes #9038

Microsoft Reviewers: Open in CodeFlow
  • telemetry

@StephenWeatherford StephenWeatherford changed the title Support private module completions [WIP] Support private module completions Jan 9, 2025
Copy link
Contributor

github-actions bot commented Jan 9, 2025

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

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

Copy link
Contributor

github-actions bot commented Jan 9, 2025

Dotnet Test Results

    78 files   -     39      78 suites   - 39   28m 17s ⏱️ - 20m 6s
11 465 tests  -    146  11 465 ✅  -    146  0 💤 ±0  0 ❌ ±0 
26 662 runs   - 13 686  26 662 ✅  - 13 686  0 💤 ±0  0 ❌ ±0 

Results for commit 4c9caa2. ± Comparison against base commit 5bb9779.

This pull request removes 2011 and adds 685 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.UseRecentModuleVersionsIntegrationTests ‑ IfNoRestoreSpecified_ThenShouldNotDownloadMetadata_AndShouldFailBecauseNoCache
Bicep.Core.IntegrationTests.AzTypesViaRegistryTests ‑ Bicep_compiler_handles_corrupted_extension_package_gracefully (\u001f�\u0008\u0000\u0000\u0000\u0000\u0000\u0000
�Ա
�0\u0010\u0006��>E�\u0003�K{I[��Ep�\u0001b{b�Vi*\u0014�w7\u001dĥťU�|c� ��?b�1�LN�\u0015*Iù`c\u0003G#��w$�L�O� VZ3���'�q����(���\u0007�	7MQ�RƑ�!�(\u0014
�ԑ��Z6T�)���,��Zq��k/�ڿ}Lo������w��\u0008��\u0003\u0010\u0014"\u00002�
���G2�����`[Q{���|M��`���d����<���<\u0000����\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
�0\u0010\u0006�=EN��$��]t��+\u0004-����\u0005��\u000b�E���
�[f\u00182���d��m�\u000eE�\u0008�f2\u0011ln\u0010\u0018���\u0001jdh_���\u0006\u0019��쓌���a�%��A2�=�E�V\u0019#	�\u0014�J�2�	��d
�յǼ�\u0017_ݼ87�\u001f\u001aʩ��\u001f\u001a�z��o��S�\u0001$C�\u0004�\u0008�B�Q�<�E2����?֞ ��(Z�\u0013��\u00047\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�\u0007�{y�2�\u0010t�\u0008\u000b��1r��\u0016j �囇�t�%h���3س����W�Z�D\u0017%��\u0001�0�\u001b1\u0004@�|��\u001a�o\u0004\u0011�\u000b��S��I�GY�´2�^?�IGUi�C*�\u0010\u000c(g\u0018\u0002�%��ҹ�D\u0003箪K�扮����c��g��}^p�[����L�A\u0002�\u0001\u0008\u0001D�\u0019�����?��Ӎ��r\u001b�N��.v\u0017�����ɲ,�\u001a�\u000b�S\u0015%\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\u0014\u0006��>E�\u0003���
\u001d\u0004\u0007+R\u0005�U�
X�U�
\u0005_�t\u0010�\u0016�^\u0004�ɁsB�\u000f���^\u001b���DL\u0012�#�7lI�[�\u001b�+@�\u001b\u0006X	A\u0001�ux��.�(c��At\u000eu�f&$�II9V\u000cq�h ���;wݑ\u0000�uu	�<15����)Ϻʧ~����������L9�;�c��"\u0004`)��#\u001c%�����\u0017���6Z�6�]�-���S��8��\u000c�\u0005�+;K\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��K
�0\u0010\u0006�=E�\u0001��m���\u0008n<@�#*��6BA���Bܴ��\u000f0�230\u0013�\u001f6]�v�.Ǻa�p1edl\u0010\u0018�z�;\Y��\u0003\u0010�Z\u000bBh;�&=.�wuX�\u0013�~��Q�\u000f\u0005f�Jc�\u0002+�\u00063\u0003H'��\u001d��V��C�cˎ͹�ڋ��o_3\u001a�|���x�����?@�V�rN�h�C�?��?���&�\u0012�
�\u001e�%\u0016\u001b��9ݹS��o�\u0016EQ\u0014��\u001d�z`�\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�}�=A��i���\u001e}��\u0003?X'�����v\u0007�Æ��	�wl\u0008I	���\�-ܡ�\u001b�-�T��A`�F�\u0007hP ��\u00006d�H��7\u0019�5���*K��A*K\{*�\u001cY[�\u0008\u0018%qFZ�&���5L��=板���幩��PN5���h����5�S�\u0001�@b\u0002C��C��0���L�y�7��(���\u0004��Y;\u0000\u000c\u0000\u0000,"The path: index.json was not found in artifact contents")
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 234
   at Bicep.Core.Registry.AzureContainerRegistryManager.DownloadManifestAndLayersAsync(IOciArtifactReference artifactReference, ContainerRegistryContentClient client) in /home/runner/work/bicep/bicep/src/Bicep.Core/Registry/AzureContainerRegistryManager.cs:line 234,[(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 234
   at Bicep.Core.Registry.AzureContainerRegistryManager.DownloadManifestAndLayersAsync(IOciArtifactReference artifactReference, ContainerRegistryContentClient client) in D:\a\bicep\bicep\src\Bicep.Core\Registry\AzureContainerRegistryManager.cs:line 234,[(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 234
   at Bicep.Core.Registry.AzureContainerRegistryManager.<>c__DisplayClass6_0.<<PullArtifactAsync>g__DownloadManifestInternalAsync|0>d.MoveNext() in /home/runner/work/bicep/bicep/src/Bicep.Core/Registry/AzureContainerRegistryManager.cs:line 133
--- End of stack trace from previous location ---
   at Bicep.Core.Registry.AzureContainerRegistryManager.PullArtifactAsync(CloudConfiguration cloud, IOciArtifactReference artifactReference) in /home/runner/work/bicep/bicep/src/Bicep.Core/Registry/AzureContainerRegistryManager.cs:line 140
   at Bicep.Core.Registry.AzureContainerRegistryManager.DownloadManifestAndLayersAsync(IOciArtifactReference artifactReference, ContainerRegistryContentClient client) in /home/runner/work/bicep/bicep/src/Bicep.Core/Registry/AzureContainerRegistryManager.cs:line 234
   at Bicep.Core.Registry.AzureContainerRegistryManager.<>c__DisplayClass6_0.<<PullArtifactAsync>g__DownloadManifestInternalAsync|0>d.MoveNext() in /home/runner/work/bicep/bicep/src/Bicep.Core/Registry/AzureContainerRegistryManager.cs:line 133
--- End of stack trace from previous location ---
   at Bicep.Core.Registry.AzureContainerRegistryManager.PullArtifactAsync(CloudConfiguration cloud, IOciArtifactReference artifactReference) in /home/runner/work/bicep/bicep/src/Bicep.Core/Registry/AzureContainerRegistryManager.cs:line 152
   at Bicep.Core.Registry.OciArtifactRegistry.TryRestoreArtifactAsync(RootConfiguration configuration, OciArtifactReference reference) in /home/runner/work/bicep/bicep/src/Bicep.Core/Registry/OciArtifactRegistry.cs:line 503,[(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.

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.

Support ACR (private) module reference completions
1 participant