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 2 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
  • finish tests
  • version completions don't automatically pop up the first time (actually, it does, but doesn't pop up until there are suggestions)
  • no loading... message

@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 12959142507)

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

Copy link
Contributor

github-actions bot commented Jan 9, 2025

Dotnet Test Results

    78 files   -     39      78 suites   - 39   31m 42s ⏱️ - 20m 10s
11 559 tests  -    132  11 559 ✅  -    132  0 💤 ±0  0 ❌ ±0 
26 850 runs   - 13 738  26 850 ✅  - 13 738  0 💤 ±0  0 ❌ ±0 

Results for commit 20046e7. ± Comparison against base commit 8ae4324.

This pull request removes 2042 and adds 713 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
��K
�0\u0010\u0006�=E�\u0001�ͣ\u0015ܻ\u0011�x�hG��Z�
\u0005��\u000bqcqӇ`�e2��㏘om�&�PY	�b=\u0017�o�h)?��P\u001a��\u0005\u0018\u0018�5c�齓\u000fnUmK��\u0018k��E�m�f�B\u0013\u001a�AF��\u0008\u0018\u0001��ܡk\u000ec^���J�\u001aq��y[�u�O�M�����;�o��P2�\u0007H\u0005��(d��Z�����?���\u0007����\u000e5%\u001b��T\u0006K~���\u001eS��y��
�	�:�\u001f\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
��O\u000b�0\u0014\u0000��\u0014�\u000f07��4�\u0010t�\u0008\u000b��1r��\u0016j �囇�tQ\u000b���`o��#�N5+�R]V�\u0005�t	\u001a\u001a5$��-�\u00011x����\u0012!�\u000c^I�{U�Ҕ2�^?�\u000b���\G\u000c|\u0000Iy �\u000f<\u0014>�L��\u0017c!���\u001ceE�\u001br��E�������V����wE���z\u001c�\u0019�\u00055?�KD�\u0010���$=����p������z�M�96\u0013��5Y�eY�{\u0002\u0002�*�\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
���
�0\u0010\u0006��}�<A:��C�\u001e}��\u0005\u0017�J\u0017Z\u0010��� xh�R\u001b�|�\u000cC&�ϲ�\u001bv�;\u0016u��nu��� �RN��P!A�\u0002\u0004��H\u0008\u001d\u0016�dB״�\u000e����\u000f►�\\u00169\u001aa�\u0006i9��r��&�\u000e�5�7מ��_}�{vi*?6�s
�\u000f�Lz��o]ѧ�\u0003p��H\u0005��H\u001e�B�����?���\u0011{�$I�$�'��\u0012�\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�ӽ
�0\u0010\u0007��>E�\u0003�I����Ep�\u0001b{�bki+\u0014�w7\u001dĥť\u001f������p�Y���\u0006m�U�"-㐑�q�(���\u0011�&��\u0013\u000eZ\u001bBh;�&=�uc+��\u001c�~�\u0004j�s���\u0008�p%b\u0006J\u0018%W��\u000e�DLKۜ�s�a�.�������
�\p�\u0019���#��\u0005Js\u0001RE�\u001b����,����?h�/�-1m0�b~�*Xӣ���\z7��<o:/䮫�\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\u0010\u0007��>E�\u0003��4\u001fV� 8X�*\u0008�\u0012l�
��V(�\uda58\udcf8���C0�19�\u000b���۫z�U��\u0012��\u0006\u001eF}#�`���\u0001L"�o\u0004\u0011�\u0005 �ԽO��QV�0����\u0007ѹ��4�!H_JA\u0018\u0004X\u0002%\u0014��ܝ�� p�i��\u001a_�[ޔg]�S?������z|�?�\u000c�\u001d�8\u0001I������(����?�(>.���9�bw�
<�L�eY��^�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��K\u000e�0\u0010\u0006�=\u0005'(3��\u0005{�^�Q\u0012\u001f�\u0018\u001e��xw���\u0005�
�����Nf�������\u001e�ڨm,���K�F�\u0007hP ��\u00006�ߎ��7\u0019�֍��*K��A*�ls.�\u000cY3'@�Ri�p�k��\u001aF7ۜ��]]�9y�K74\u0014S
k?4\u0018���ߚ�)�\u0000J 1\u0019@V�>�����"�����\u001fko\u0010\u0004A\u0010��	@[Zv\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 246
   at Bicep.Core.Registry.AzureContainerRegistryManager.DownloadManifestAndLayersAsync(IOciArtifactReference artifactReference, ContainerRegistryContentClient client) in /home/runner/work/bicep/bicep/src/Bicep.Core/Registry/AzureContainerRegistryManager.cs:line 246,[(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 246
   at Bicep.Core.Registry.AzureContainerRegistryManager.DownloadManifestAndLayersAsync(IOciArtifactReference artifactReference, ContainerRegistryContentClient client) in D:\a\bicep\bicep\src\Bicep.Core\Registry\AzureContainerRegistryManager.cs:line 246,[(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 246
   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 140
--- 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 147
   at Bicep.Core.Registry.AzureContainerRegistryManager.DownloadManifestAndLayersAsync(IOciArtifactReference artifactReference, ContainerRegistryContentClient client) in /home/runner/work/bicep/bicep/src/Bicep.Core/Registry/AzureContainerRegistryManager.cs:line 246
   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 140
--- 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 164
   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.

@StephenWeatherford StephenWeatherford force-pushed the sw/acr-completions branch 5 times, most recently from a447698 to 479ed50 Compare January 16, 2025 00:47
@StephenWeatherford StephenWeatherford force-pushed the sw/acr-completions branch 4 times, most recently from af65f40 to 5ea8c28 Compare January 24, 2025 18:56
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