-
Notifications
You must be signed in to change notification settings - Fork 757
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
Initial bicep restore
of Bicep extensibility modules fails
#15696
Comments
It looks like this might be a race condition, but I haven't been able to reproduce it locally. @maskati - are you encountering this error consistently? |
@shenglol yes I am encountering the issue consistently. You can reproduce e.g. using Docker: docker run --rm -it alpine /bin/sh -c "apk add -q --no-progress libstdc++ && wget -qO bicep https://github.com/Azure/bicep/releases/download/v0.31.92/bicep-linux-musl-x64 && chmod +x ./bicep && echo '{\"experimentalFeaturesEnabled\":{\"extensibility\":true}}' > bicepconfig.json && echo \"extension 'br:mcr.microsoft.com/bicep/extensions/microsoftgraph/v1.0:0.1.8-preview'\" > test.bicep && DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 ./bicep restore test.bicep" Results in:
|
@shenglol note that this only occurs when the extensibility module is not already in the cache, so to reproduce you need an empty cache. This is however often the case when performing restore operations on a CI pipeline such as GitHub hosted actions or in the above example on a fresh container image. |
I did clear the cache. The only difference is that I tested the issue on my Windows machine. I'll give it a try using a container. |
The issue seems to occur on both Linux and Windows, see repro GitHub Actions run with both Linux and Windows jobs: Linux
Windows
|
Bicep version
0.31.92
Describe the bug
If an extensibility module is not restored, initial restore using
bicep restore
fails.The second
bicep restore
succeeds.If not restored, initial restore as part of
bicep build
succeeds.To Reproduce
bicepconfig.json
main.bicep
Restore first attempt fails
bicep restore main.bicep
first attempt failsbicep restore main.bicep
second attempt succeedsBuild first attempt succeeds
bicep build main.bicep
first attempt succeedsThe exception on initial restore failure:
The text was updated successfully, but these errors were encountered: