Skip to content

Conversation

kalbert312
Copy link
Member

@kalbert312 kalbert312 commented Aug 22, 2025

Description

  • Fix incorrect flagging of various cases with the linter rule.
  • Fix diagnostic gap for module extension config assignments. The extensionConfigs property must be assigned an object literal. The properties of that object, which are extension aliases, must also be assigned object literals or use extension config inheritance expressions. This is so the language expressions result in the right structure expected by the API. This is needed because of the extra object layer of "value" vs "keyVaultReference".
  • Add duplicate config assignment test to invalid extension bicepparam baseline.
  • Add more cases to baselines.

Example Usage

Checklist

Microsoft Reviewers: Open in CodeFlow

Copy link
Contributor

github-actions bot commented Aug 22, 2025

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

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

Copy link
Contributor

github-actions bot commented Aug 22, 2025

Dotnet Test Results

    90 files   -     45      90 suites   - 45   37m 36s ⏱️ - 24m 51s
12 294 tests +     9  12 294 ✅ +     9  0 💤 ±0  0 ❌ ±0 
28 333 runs   - 14 114  28 333 ✅  - 14 114  0 💤 ±0  0 ❌ ±0 

Results for commit 21c59df. ± Comparison against base commit 034413c.

This pull request removes 1912 and adds 679 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\u0007��>E�\u0003���Ҩ��Ep�\u0001b{�bki+\u0014�w�\u001dĥť\u001f�����\.������lBE)\u000c��\u0017lh�\u0008\u0011;�[\u0012
��
\u0018\u0018�\u0003�x=�$\u001d�ee�f�)��A����R$�\u000e\u0003�
�\u0000@#Q/�Z�W�+���\u0014���jq)oY۞����L�����[ѷ��B&5h��\u000c6�\u000fu��'������}FuNqEɖ�\u0003\u0015ޚ\u001f����ܳ9��8�y\u0001o�Ch\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
�ӽ\u000e�0\u0010\u0007��>E����z\u0014\u0007vG_�Q\u0012?B1\u0002������\u0001�`b�c/�^{��d�M��ŵV\u0016H'JL
�Ԙ��\u001e2
�/ ��a!d7�$\u0003ںq�0�\u001cw� �I�\u001c�"G˩&���u�\u0005�W��\u001b����搷�쫛W���}C9ְ�C�A����\u0017}�?�\u0016��d�,����G9K&�<����\u0013DQ\u0014EKx\u0002�\u0011vd\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�>
<\u0004\u001d2��k�\u001cd��\u001a\u0008}��!�(]Ԃ�;�y`�6�C�N7+�SSVHaF}\u0004��-�y�z�p\u0005�z�\u0000+!(\u0000�\u0019|�\u000e��֥\u001de��~\u0010
����DD	I�P,D,�R�`fk��\u001a	�M��(+RӠKu-�������tz��o�+���L9 \u0002\u000b�1S�\u0001,\u0005\u00176��d�����������z�M�9�?�gr\u001c�q��\u0004v�v�\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\u0010\u0007��>E�\u0001���\u0012+��\u0008.>@lO��*m�����A\Z\�
�7�\u000e���\u0017��o\u0017�3�j��S\u0013��
\u0002kL���4�I�\u0000\u000c\u001cb����7�p�\u001b_�U�1�\u0007�)�M^�\:�J��D\u0000�Dk7
���&\u0013~��n��\u0019�b_\u001f�{{��>�7�\u001e��}nƫ��6L"�6�QK\u0006\u0016�
��J&�<�\u0017>^�Ԟ(m([R��j<�[���:�nQ\u0014E���\u0000z���\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�=EN��L2M7ݻ�
A\u000b>h*}`A���Bp�⦶����\u000c3!�*ٹ~[�CQ7J��D��A�\u001a3z>@F��\u0005\u0004X6V\u0008�ϾɈ�i]\u001dVYb�\u000f�L��T\u00169ZNIs
�\u00024��ބ�~�����c����n^���\u000f
�T��\u000f�F��߷f|�?\u0000	d`m@�\u001e�\u0014n�E2����?�� ��(Z�\u0013\u0016,\u000c�\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��M\u000b�0\u0018\u0007��\u0014�\u000f0�>
<\u0004\u001d2��k�\u001cd��\u001a\u0008}��!�(]Ԃ�;n\u000f<���C�N7+�SSV�QE}\u0004��-�y�z�p\u0005�z�\u0000+!l5l\u0006��ý�uiG���\u000f�\u0001�u���(!)\u0013\u0012�\u0008S\u001e\u0004��ٽS�\u001e	�M��(+RӠKu-�����tz��o�\u001e��o\u001f	 \u0002\u000b�1\u0013�\u0000,\u0005'6��d�����������z�M�9�?�gr\u001c�q��\u0004(}�V\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.DirectResourceCollectionTests ‑ DirectResourceCollectionAccess_NotAllowedWithinLoops ("output loopOutput array = [for i in range(0, 2): {
  prop: map(containerWorkers, (w) => w.properties.ipAddress.ip)
}]")
Bicep.Core.IntegrationTests.DirectResourceCollectionTests ‑ DirectResourceCollectionAccess_NotAllowedWithinLoops ("resource propertyLoop 'Microsoft.ContainerInstance/containerGroups@2022-09-01' = {
  name: 'gh9440-loop'
  location: 'westus'
  properties: {
    containers: [for i in range(0, 2): {
      name: 'gh9440-w1c-${i}'
      properties: {
        command: [
          'echo "${join(map(containerWorkers, (w) => w.properties.ipAddress.ip), ',')}"'
        ]
      }
    }]
  }
}")
Bicep.Core.IntegrationTests.DirectResourceCollectionTests ‑ DirectResourceCollectionAccess_NotAllowedWithinLoops ("var loopVar = [for i in range(0, 2): {
  prop: map(containerWorkers, (w) => w.properties.ipAddress.ip)
}]")
Bicep.Core.IntegrationTests.Emit.ParamsFileWriterTests ‑ Params_file_with_no_errors_should_compile_correctly ("
using 'main.bicep'

// involves all syntax
param myParam = {
  arr: [
    {
      a : 'b'
    }
    {
      c : true
    }
  ]
  name: 'complex object!'
  priority: 3
  val: null
  obj: {
      a: 'b'
      c: [
          'd'
           1
      ]
  }
}","
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "myParam": {
      "value": {
        "arr" : [
          {
            "a" : "b"
          },
          {
            "c" : true
          }
        ],
        "name" : "complex object!",
        "priority" : 3,
        "val" : null,
        "obj" : {
          "a" : "b",
          "c" : [
            "d",
            1
          ]
        }
      }
    }
  }
}","
param myParam object
")
…

♻️ This comment has been updated with latest results.

@kalbert312 kalbert312 changed the title Bug fixes for moduleExtensionsConfigs experimental feature. Bug fixes for moduleExtensionConfigs experimental feature. Aug 25, 2025
@kalbert312 kalbert312 marked this pull request as ready for review August 25, 2025 18:14
@kalbert312 kalbert312 merged commit 9206267 into main Aug 26, 2025
44 checks passed
@kalbert312 kalbert312 deleted the kylea/module-ext-configs-bug-fixes branch August 26, 2025 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants