devonfw / ide

Tool to automate setup and update of development environment (esp. for Java projects).
Apache License 2.0
33 stars 102 forks source link

Azure's Integration-Test fails #1353

Open alfeilex opened 9 months ago

alfeilex commented 9 months ago

The integration-test for Azure fails on Windows.

Log:

Checksum b410e4fbd8602d46df54c77644209887c9f6bf87df08f062d590cdcd8a96d3b6 is correct
Successfully extracted archive az-2.52.0-windows.msi to /d/a/ide/ide/scripts/target/integration-test/test-setup/updates/extracted/az
Success: run command mv
Successfully installed az
The software az has been added. You need to rerun 'devon' command without arguments or restart your terminal to update your PATH so the newly installed software will be found.
grep: /d/a/ide/ide/scripts/target/integration-test/test-setup/conf/devon.properties: No such file or directory
Success: run command export
Location of Azure's configuration file is set to /d/a/ide/ide/scripts/target/integration-test/test-setup/conf/.azure
Junction created for D:\a\ide\ide\scripts\target\integration-test\test-setup\software\az\bin <<===>> D:\a\ide\ide\scripts\target\integration-test\test-setup\software\az\wbin
Success: run command cmd
/d/a/ide/ide/scripts/target/integration-test/test-setup/scripts/command/../functions: line 84: /d/a/ide/ide/scripts/target/integration-test/test-setup/software/az/bin/az: No such file or directory

******** ATTENTION ********
Failed to verify installation of az (/d/a/ide/ide/scripts/target/integration-test/test-setup/software/az/bin/az)
We are sorry for the inconvenience. Please check the above errors, resolve them and try again.
Exit code was 127
[ERROR] Failed running test #8: integration-test-az - exit code 127

It seems that the bug is caused by the new version 2.52.

hohwille commented 9 months ago

When I run this locally it installs the same version without error:

$ devon az setup
Success: run command mkdir
Starting installation of az in version 2.52.0 to /d/projects/salog/software/az
Trying to download az-2.52.0-windows.msi from https://azcliprod.blob.core.windows.net/msi/azure-cli-2.52.0.msi
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 49.8M  100 49.8M    0     0  1468k      0  0:00:34  0:00:34 --:--:-- 1501k
Download of az-2.52.0-windows.msi from https://azcliprod.blob.core.windows.net/msi/azure-cli-2.52.0.msi succeeded.
Checksum b410e4fbd8602d46df54c77644209887c9f6bf87df08f062d590cdcd8a96d3b6 is correct
Successfully extracted archive az-2.52.0-windows.msi to /d/projects/salog/updates/extracted/az
Success: run command mv
Successfully installed az
The software az has been added. You need to rerun 'devon' command without arguments or restart your terminal to update your PATH so the newly installed software will be found.
Success: run command export
Location of Azure's configuration file is set to /d/projects/salog/conf/.azure
Junction created for D:\projects\salog\software\az\bin <<===>> D:\projects\salog\software\az\wbin
Success: run command cmd
azure-cli                         2.52.0

core                              2.52.0
telemetry                          1.1.0

Dependencies:
msal                            1.24.0b1
azure-mgmt-resource             23.1.0b2

Python location 'D:\projects\salog\software\az\python.exe'
Extensions directory 'D:/projects/salog/conf/.azure\cliextensions'

Python (Windows) 3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:05:00) [MSC v.1929 32 bit (Intel)]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.
alfeilex commented 9 months ago

In my local test the wbin folder is empty and this cause the error

What kind of shell did you use in your test?

MattesMrzik commented 5 months ago

I did some more testing and am pretty sure it is due to the path being too long, as Windows has MAX_PATH limit of ~256 characters. I moved my installation of devon to a shorter path and that fixed the problem.

The file which caused the error was: ...\Microsoft SDKs\Azure\CLI2\Lib\site-packages\azure\cli\command_modules\dla\vendored_sdks\azure_mgmt_datalake_analytics\account\models\data_lake_analytics_account_management_client_enums.pyc

There is a workaround on Windows to enable long paths.