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

Handle single-member unions imported from JSON templates #13464

Merged
merged 1 commit into from
Feb 27, 2024
Merged

Conversation

jeskew
Copy link
Contributor

@jeskew jeskew commented Feb 27, 2024

Potentially a resolution to #13462

When importing a type from an ARM template, we convert the ARM schema into a Bicep IR representation so that it can be injected into the importing template. This conversion process didn't account for scenarios where the ARM allowedValues constraint was present but only allows a single value, which the Bicep type system converts to a singular literal type rather than a union.

Microsoft Reviewers: Open in CodeFlow

Copy link
Contributor

github-actions bot commented Feb 27, 2024

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

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

Copy link
Contributor

github-actions bot commented Feb 27, 2024

Test Results

    65 files   -     34      65 suites   - 34   22m 51s ⏱️ - 20m 43s
10 646 tests  -     19  10 645 ✅  -     19  1 💤 ±0  0 ❌ ±0 
25 182 runs   - 12 584  25 180 ✅  - 12 583  2 💤  - 1  0 ❌ ±0 

Results for commit d3269f8. ± Comparison against base commit f316152.

♻️ This comment has been updated with latest results.

@jeskew jeskew merged commit f545e83 into main Feb 27, 2024
44 checks passed
@jeskew jeskew deleted the jeskew/13462 branch February 27, 2024 16:33
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.

None yet

2 participants