Skip to content

Conversation

@polatengin
Copy link
Member

@polatengin polatengin commented Dec 9, 2025

Description

Closes #18272

Added a new integration test for build-params that covers extendable parameter files where the base file contains interpolated values.

The test provisions base.bicepparam, main.bicepparam, main.bicep under the extendable params feature flag and runs build-params --stdout.

Checklist

Microsoft Reviewers: Open in CodeFlow

@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2025

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

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2025

Dotnet Test Results

   102 files   -     51     102 suites   - 51   41m 42s ⏱️ - 20m 56s
12 573 tests  -     12  12 573 ✅  -     11  0 💤 ±0  0 ❌  - 1 
28 891 runs   - 14 436  28 891 ✅  - 14 435  0 💤 ±0  0 ❌  - 1 

Results for commit c95f1a2. ± Comparison against base commit 50ca350.

This pull request removes 1949 and adds 662 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.BuildParamsCommandTests ‑ BuildParams_Extends_BaseParamsWithInterpolation_ShouldSucceed
Bicep.Cli.UnitTests.Services.ReplEnvironmentTests ‑ ShouldSubmitBuffer_terminates_at_expected_point ("var foo = {
")
Bicep.Cli.UnitTests.Services.ReplEnvironmentTests ‑ ShouldSubmitBuffer_terminates_at_expected_point ("var multilineString = '''
Line 1
Line 2
Line 3
'''")
Bicep.Cli.UnitTests.Services.ReplEnvironmentTests ‑ ShouldSubmitBuffer_terminates_at_expected_point ("var outRoleAssignments object[] = union(map(
  filter(varMockedEntraGroupIds, item => !contains(item.uniqueName, 'DevOps')),
  group => {
    principalId: group.groupId
    definition: group.roleToAssign
    relativeScope: ''
    principalType: 'Group'
  }
),[
  {
    principalId: '22222222-2222-2222-2222-222222222222'
    definition: 'Reader'
    relativeScope: ''
    principalType: 'ServicePrincipal'
  }
])")
Bicep.Cli.UnitTests.Services.ReplEnvironmentTests ‑ ShouldSubmitBuffer_terminates_at_expected_point ("var test = {
  abc: 'def' // boo
}")
Bicep.Cli.UnitTests.Services.ReplEnvironmentTests ‑ ShouldSubmitBuffer_terminates_at_expected_point ("var varMockedEntraGroupIds = [
  {
    uniqueName: 'Reader-Group'
    roleToAssign: 'Reader'
    groupId: '11111111-1111-1111-1111-111111111111'
  }
  {
    uniqueName: 'Contributor-Group'
    roleToAssign: 'Contributor'
    groupId: '22222222-2222-2222-2222-222222222222'
  }
  {
    uniqueName: 'DevOps-Group'
    groupId: '33333333-3333-3333-3333-333333333333'
  }
]")
Bicep.Core.IntegrationTests.AzTypesViaRegistryTests ‑ Bicep_compiler_handles_corrupted_extension_package_gracefully (\u001f�\u0008\u0000\u0000\u0000\u0000\u0000\u0000
��=
�@\u0010\u0005�=�'X߬�LRا�\u0015\u0016"�\u0007��\u000f\u0011B�\u001eH\u0015l�\u0018-ܯy�\u0014\u000f�g��\u001f\u000f�?UmgD��\u000c�
\u0000ĹO\u0002�& <�Wќґ\u00160t�o	�m���}�.�p\u000b�#�kׄ��Һ��U�*E���ƪ��퓵\u000bG���;�����\u0012\u0017���T���U)]d�ö��|�� ��(�\u0015�\u0001�\u0005+P\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
��=
�@\u0010\u0005�s�%\u0007��$�]#��\u0011l<�jFTL\u000c�\u0006\u0002��\u0005\u001b!�M~��׼f�\u0007Ó���;�\u00057��:V���!"j�����DL���\u0018D\u0010=̠k�m\u0000\u0011։2Q[w�oU�����*�7�t��s2:M�\u0010�L��\u0012R��u����\u000e����D\u0001�D�H\u0019m\u0000	�\u0014�Y6٭{�/\u0011\u001e+�k>;.�\��	��b\u001f-����y���d>��`�\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
���
�@\u0010\u0006�9�\u0014K\u000f����\u0006\u001d�\u000e\u0015aA�5\u0004�
�H\u0003��\u000f�D^�XA�w�/s\u0018\u0018���u���4�/���7CM]\u0003\u0000k�#\u0001�\u0013\u0008�5/\u0002�j�\u000b�U�^\u0008�~�X��z?>�Y��cu*=?RE}(�1�
\u0003\u0016f�\u0001��D����NǞw��y���\u0010�̖و\u0015\u0002\u0003\u001c��J'����m0O���|�[lV�`�D^���8�C��\u000e�su�\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�Խ
�@\u000c\u0007��}��\u000fpM�ڜ
\u001d\u0004\u0007+R\u0005�U
=�B��\u0003
���Etq�
z�%C2\u0004�?2�f��f��\u001b�IO\u0002	�a8TD|���y�7l"\u0010=��kڬ\u0006D�O4\u0015��=�E��^��s婉(ۢ�1\u0019�4\u0019D%Y+��޷�u��~w����W!PD�D!�\u0002��-F�d�����I�����a�ۤ�L\u0018���\u001d�q\u001c�E7
\u0018k\u0003\u0000\u000c\u0000\u0000,"'7' is an invalid end of a number. Expected a delimiter. Path: $.INVALID_JSON | LineNumber: 0 | BytePositionInLine: 20.")
…

var result = await Bicep(CreateDefaultSettings(), "build-params", mainParamsPath, "--stdout");

result.Should().Succeed();
result.Stdout.Should().NotBeEmpty();
Copy link
Member

Choose a reason for hiding this comment

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

Should there be an assertion about the content of the compiled params file? I think we would want to explicitly validate that bar compiles to "my-value-foo"

Copy link
Member Author

Choose a reason for hiding this comment

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

I added the assertion in this commit; da85efa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

Extended param file can not be built when base contains params using variable substitution

3 participants