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

Allow duplicated resources (by name) if at most one is unconditional #15909

Merged
merged 7 commits into from
Feb 21, 2025

Conversation

jeskew
Copy link
Member

@jeskew jeskew commented Dec 20, 2024

Resolves #1410

There are a couple of updates to this check included as well:

  • The check is also applied to existing resources (since duplicates are not allowed in symbolic name templates)
  • The check is based on the type of the name rather than the syntax, so it will catch duplicates that use a reference or expression
Microsoft Reviewers: Open in CodeFlow

Copy link
Contributor

github-actions bot commented Dec 20, 2024

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

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

Copy link
Contributor

github-actions bot commented Dec 20, 2024

Dotnet Test Results

 0 tests  ± 0   0 ✅ ±0   0s ⏱️ ±0s
78 suites  - 39   0 💤 ±0 
78 files    - 39   0 ❌ ±0 

Results for commit e8b014c. ± Comparison against base commit 7141454.

♻️ This comment has been updated with latest results.

# Conflicts:
#	src/Bicep.Core.IntegrationTests/ScenarioTests.cs
#	src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.json
#	src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.symbolicnames.json
@jeskew jeskew requested a review from Copilot December 24, 2024 19:19

Choose a reason for hiding this comment

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

Copilot reviewed 18 out of 34 changed files in this pull request and generated no comments.

Files not reviewed (16)
  • src/Bicep.Core.Samples/Files/baselines/Dependencies_LF/main.bicep: Language not supported
  • src/Bicep.Core.Samples/Files/baselines/Dependencies_LF/main.diagnostics.bicep: Language not supported
  • src/Bicep.Core.Samples/Files/baselines/Dependencies_LF/main.formatted.bicep: Language not supported
  • src/Bicep.Core.Samples/Files/baselines/Dependencies_LF/main.ir.bicep: Language not supported
  • src/Bicep.Core.Samples/Files/baselines/Dependencies_LF/main.json: Language not supported
  • src/Bicep.Core.Samples/Files/baselines/Dependencies_LF/main.sourcemap.bicep: Language not supported
  • src/Bicep.Core.Samples/Files/baselines/Dependencies_LF/main.symbolicnames.json: Language not supported
  • src/Bicep.Core.Samples/Files/baselines/Dependencies_LF/main.symbols.bicep: Language not supported
  • src/Bicep.Core.Samples/Files/baselines/Dependencies_LF/main.syntax.bicep: Language not supported
  • src/Bicep.Core.Samples/Files/baselines/Dependencies_LF/main.tokens.bicep: Language not supported
  • src/Bicep.Core.Samples/Files/baselines/InvalidModules_LF/main.diagnostics.bicep: Language not supported
  • src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/main.diagnostics.bicep: Language not supported
  • src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.bicep: Language not supported
  • src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.diagnostics.bicep: Language not supported
  • src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.formatted.bicep: Language not supported
  • src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.ir.bicep: Language not supported
jeskew added 2 commits January 8, 2025 10:12
# Conflicts:
#	src/Bicep.Core.IntegrationTests/ScenarioTests.cs
# Conflicts:
#	src/Bicep.Core.IntegrationTests/ScenarioTests.cs
@jeskew jeskew requested a review from a team February 21, 2025 18:08
Copy link
Contributor

@shenglol shenglol left a comment

Choose a reason for hiding this comment

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

:shipit:

@jeskew jeskew merged commit 5e5c91b into main Feb 21, 2025
43 checks passed
@jeskew jeskew deleted the jeskew/1410 branch February 21, 2025 21:52
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.

Two mutually-exclusive conditional resources with the same type and name will throw name validation error
2 participants