Open hensou opened 9 months ago
Hi @hensou How did you install bicep ?
It is possible to install it by running az bicep install
and then install it under $HOME/.azure/bin
or $AZURE_CONFIG_DIR
(if defined in your shell configuration file) which is clearly out of the store. Hence it's very unlikely to work as mentioned here : https://nix.dev/permalink/stub-ld
This bug I'd say is due to two current issues which are more general that we have the CLI :
azure-cli
is outside the nix store and the CLI can download binaries in $HOME/.azure/bin
or in $AZURE_CONFIG_DIR/bin
if it is defined.upstream code defines the config directory here and the bicep subcommand seems to use it here
A quick workaround if bicep was packaged in nixpkgs, would be to configure the CLI to always use Bicep from the PATH, setting it to bicep.use_binary_from_path=True
(output of az bicep --help
) :
az config set bicep.use_binary_from_path=True/False/if_found_in_ci
Specify whether to use Bicep CLI from PATH or not. The default value is if_found_in_ci.
But that is not possible since bicep is not packaged in Nixpkgs.
Hi @AkechiShiro, thanks and sorry for my late reply.
I don't remember installing bicep
specifically, at first I thought it was installed together with the azure-cli
, but since I also installed vscode
and the azure bicep extensions
there is a chance that vscode
executed az bicep install
.
It is interesting that from within vscode
it does work properly, it just when I try to use it from the cli that provokes this error.
I guess for now the only option is to wait right?
Wait or contribute, until we can get to this issue (right now, the azure-cli fails to build in Master and tests are failing for version 2.56.0, we're focusing our efforts on fixing those issue first), see #281213 #281183
The vscode bicep
must be statically built, if you can find the path to the file and run file
on it or check the ldd
output if it is not statically compiled.
@katexochen any input on this issue ?
A quick workaround if bicep was packaged in nixpkgs, would be to configure the CLI to always use Bicep from the PATH, setting it to bicep.use_binary_from_path=True
I think packaging bicep and consuming it from PATH is likely the best solution. @hensou could you open a separate packaging request for bicep? I haven't package a dotnet app yet. https://github.com/Azure/bicep
@katexochen, done, I created the package request in https://github.com/NixOS/nixpkgs/issues/282826 .
Is there anything I can do to help on https://github.com/NixOS/nixpkgs/pull/281183?
Thanks!
Is there anything I can do to help on https://github.com/NixOS/nixpkgs/pull/281183?
Sure! Tests currently fail, see https://github.com/NixOS/nixpkgs/pull/281183#issuecomment-1902070852 and we need to understand why.
Was creating the package in https://github.com/NixOS/nixpkgs/pull/285440 but didn't know how you wanted to join it to azure-cli. Is this something we can provide in path and it picks up or does it require a config setting in azure-cli to even bother looking for it?
EDIT: bicep was merged so the binary will be available in nixpkgs.
So now that we have bicep packaged, should we add it to the azure-cli closure? Would add another 150+ MB. I'm not sure it's worth it. One the one hand I like if things work out of the box, but this doesn't seem something hit by many users (no thumbs up on this issue). Wdyt?
I think there should be a flag to override by default let's not include bicep in the closure
So azure-cli-full
it is.. :smiling_face_with_tear: Might be an opportunity to check for other things that might not be often required, current size is just awful.
Describe the bug
The
azure-cli
package includes a binarybicep
that compiles and analyses.bicep
files.Steps To Reproduce
Steps to reproduce the behavior:
azure-cli
// Resource creation resource newResourceGroup 'Microsoft.Resources/resourceGroups@2023-07-01' = { name: 'test' location: 'germanywestcentral' properties: {} }
Expected behavior
It should not fail.
Additional context
I get the following log:
Notify maintainers
@AkechiShiro @jonringer
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Add a :+1: reaction to issues you find important.