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

Extension configuration updates for stacks extensibility support. #16444

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

Conversation

kalbert312
Copy link
Member

@kalbert312 kalbert312 commented Feb 18, 2025

Contributing a Pull Request

If you haven't already, read the full contribution guide. The guide may have changed since the last time you read it, so please double-check. Once you are done and ready to submit your PR, run through the relevant checklist below.

Contributing to documentation

Contributing an example

We are integrating the Bicep examples into the Azure QuickStart Templates. If you'd like to contribute new example .bicep files that showcase abilities of the language, please follow these instructions to add them directly there. We can still take bug reports and fixes for the existing examples for the time being.

  • This is a bug fix for an existing example
  • I have resolved all warnings and errors shown by the Bicep VS Code extension
  • I have checked that all tests are passing by running dotnet test
  • I have consistent casing for all of my identifiers and am using camelCasing unless I have a justification to use another casing style

Contributing a feature

  • I have opened a new issue for the proposal, or commented on an existing one, and ensured that the Bicep maintainers are good with the design of the feature being implemented
  • I have included "Fixes #{issue_number}" in the PR description, so GitHub can link to the issue and close it when the PR is merged
  • I have appropriate test coverage of my new feature

Contributing a snippet

  • I have a snippet that is either a single, generic resource or multi resource that uses parent-child syntax

  • I have checked that there is not an equivalent snippet already submitted

  • I have used camelCasing unless I have a justification to use another casing style

  • I have placeholders values that correspond to their property names (e.g. dnsPrefix: 'dnsPrefix'), unless it's a property that MUST be changed or parameterized in order to deploy. In that case, I use 'REQUIRED' e.g. keyData

  • I have my symbolic name as the first tab stop ($1) in the snippet. e.g. res-aks-cluster.bicep

  • I have a resource name property equal to "name"

  • If applicable, I have set the location property to location: /*${<id>:location}*/'location' (not resourceGroup().location) where <id> is a placeholder id, and added param location string to the test's main.bicep file so that the resulting main.combined.bicep file used in the tests compiles without errors

  • I have verified that the snippet deploys correctly when used in the context of an actual bicep file

    e.g.

    resource aksCluster 'Microsoft.ContainerService/managedClusters@2021-03-01' = {
      name: 'name'
Microsoft Reviewers: Open in CodeFlow

Choose a reason for hiding this comment

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

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

Files not reviewed (8)
  • src/Bicep.Core.IntegrationTests/ModuleTests.cs: Evaluated as low risk
  • src/Bicep.Core/LanguageConstants.cs: Evaluated as low risk
  • src/Bicep.Core/Semantics/TemplateSpecSemanticModel.cs: Evaluated as low risk
  • src/Bicep.Core/Semantics/EmptySemanticModel.cs: Evaluated as low risk
  • src/Bicep.Core/TypeSystem/DeclaredTypeManager.cs: Evaluated as low risk
  • src/Bicep.Core/Semantics/ISemanticModel.cs: Evaluated as low risk
  • src/Bicep.Core/TypeSystem/Types/NamespaceType.cs: Evaluated as low risk
  • src/Bicep.Core/Semantics/SemanticModel.cs: Evaluated as low risk
Comments suppressed due to low confidence (1)

src/Bicep.Core/Semantics/Metadata/ExtensionMetadata.cs:12

  • The parameter name 'ConfigType' should be renamed to 'ConfigurationType' for consistency with other parts of the codebase.
ObjectType? ConfigType,
Copy link
Contributor

github-actions bot commented Feb 18, 2025

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

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

Copy link
Contributor

github-actions bot commented Feb 18, 2025

Dotnet Test Results

    68 files   -     49      68 suites   - 49   28m 54s ⏱️ - 22m 16s
10 151 tests  -  1 797  10 122 ✅  -  1 826  0 💤 ±0  29 ❌ +29 
24 407 runs   - 17 030  24 350 ✅  - 17 087  0 💤 ±0  57 ❌ +57 

For more details on these failures, see this check.

Results for commit 6c65a29. ± Comparison against base commit 437f796.

This pull request removes 3602 and adds 636 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\u0006��>E�\u0001b�M.Q��"��\u0000�=Q���\u0015
�\u001b\u0007qiq�U0ߘ;�%Ꮨ�]�$�QU\u000b\u001d\u0001�\u0004�4�R��\u000f�\u000c\u0003�$�4Z�n�~|�\u000e��q�\u001fe��~Pd�k\u000e9%`\u0014\u0000X����E
8\ud997\udd2f\u0006s^�f�\u001c��Zq��ţ=�k��1�\u001e��\u001b���_Ɗ�?\u0000\u0001�\u0006�L������L�y��|�)�-)m([Q��j��;w����ق \u0008���\u0001aq�\u0013\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
�Ի
�0\u0014\u0006��>E�\u0003�9!7�\u000e��\u0015���*�\u0006��*m��/o:�K�K/����@N\u0012������F'�(1� \u0002��F,�X�z\u0003�D �\u0008"�s[�սw��QV����q�\u000f���U��\u0010$\u0003\u0000E\u0004�
��s5�{�=�{w]]�4OL���-oʳ���t���pO�-��2dg�\u0000�9p���������?��ӏ��r\u001b�N��.�\u0017���S��8��\u000c�\u0005\u001dÇ�\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
��K
�0\u0010\u0006�=EO��_3I7�w�\u0015�\u0016|�T���xwӅ��Mm\u0005�-3\u000c�d�e��}^�CQ7�\u0013�X�����\u001a=\u001f�!`^H�ae����'\u0019�5���(K����4���,2\u0018\u0005 %
I[E~\u0003\u001b_�O�\u0010]m{�:wq���sS����jX������}�>�(\u0011PFC3���\u001f�}�\u0017�����X{� \u0008�`
O#��I\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�\�4���Ep�\u0001b{b���V(��n:�K�K?\u0004�[\u0002��\\u0008���޴[4)V5\u000b��׌��[�\u0010��\u001d\u0010��z�+)m7mG��ǽnLeG��\u001f�G�4Y�1(\u0001\u0000J��\u0000"���֒�\u001ahZ��\u001cgE�-�Է�kχڗ��3��~ӝ�-�<\u0010��\u0001!�Rr	��U��ϒ�?���z�\u0002�\u0012�\u0006�\u001d�G��
=�k�ϥgs\u001c�q��\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��K
�0\u0010\u0006�=EO���i\u0016ݻ�
A\u000b>h*mJ\u000b��M\u0016��\u00167�\u0015̷�0̄���\u000e��\u001e˦�\u001c\u000c�)�\u001b\u0004J���\u0008%\u0012�/@@K�	Ɇ�7\u0019ѵ�6a�%f� �ͬ?We�Z �6�Q��\u001b�6�v��av��Tt�����K[��PM5���d����5�S�\u0001\u0018A�\u0015*)A��#��_$�����c�
�$I�5<\u0001�C\u0017\u0015\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��\u000fH��HMLI-*�36�4��c�60\u0000\u00023\u0013\u0013�� `hb�`h\u000e\u0003\u0006\u000c\u0006榦@�
\u0015Tw	\u0016PZ\�X\u0004t
=�\u001a���B!�$37�����������H������В\u000b(��K��R� �$�63/%�B/�8?\u000f�<\u0017����(�\u0001\u0010�G;;\u0008��\u0003#\u0013\u0006`\u0019`fhfjj`
��@�\u0018���'Gx��V��\u000bs��t��
��S�R\u0000��\u0003��Q0
F�(\u0018\u0005�\u0007\u0000p!��\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")
…

♻️ This comment has been updated with latest results.

@kalbert312 kalbert312 force-pushed the kylea/stacks-ext-configs branch from c449227 to 4f5c360 Compare February 18, 2025 22:36
@kalbert312 kalbert312 force-pushed the kylea/stacks-ext-configs branch from 4f5c360 to 277d7d9 Compare March 3, 2025 19:26
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.

1 participant