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

Add Azure Developer CLI to CloudShell #248

Closed
wants to merge 5 commits into from

Conversation

danieljurek
Copy link
Member

@danieljurek danieljurek commented Sep 26, 2022

I noticed a couple of failures when running ./test.ps1 locally:

Running tests.
[-] Various programs installed with expected versions.Static Versions 42ms (41ms|1ms)
 Expected strings to be the same, but they were different.
 String lengths are both 7.
 Strings differ at index 4.
 Expected: '16.14.2'
 But was:  '16.16.0'
            ----^
 at $script:pmap["Node.JS"].Version | Should -Be '16.14.2', /tests/PSinLinuxCloudShellImage.Tests.ps1:21
 at <ScriptBlock>, /tests/PSinLinuxCloudShellImage.Tests.ps1:21
[-] Various programs installed with expected versions.Compare bash commands to baseline 59ms (58ms|1ms)
 Expected strings to be the same, because Commands 'aserver,fc-cache,fc-cat,fc-conflist,fc-list,fc-match,fc-pattern,fc-query,fc-scan,fc-validate,pngfix,png-fix-itxt' should be installed on the path but were not found. No commands should have been removed unexpectedly. If one really should be deleted, remove it from command_list, but they were different.
 Expected length: 0
 Actual length:   112
 Strings differ at index 0.
 Expected: ''
 But was:  'aserver,fc-cache,fc-cat,fc-conflist,fc-list,fc-match,fc-patt...'
            ^
 at $missing | Should -Be "" -Because "Commands '$missing' should be installed on the path but were not found. No commands should have been removed unexpectedly. If one really should be deleted, remove it from command_list", /tests/PSinLinuxCloudShellImage.Tests.ps1:68
 at <ScriptBlock>, /tests/PSinLinuxCloudShellImage.Tests.ps1:68
Tests completed in 47.24s
Tests Passed: 34, Failed: 2, Skipped: 0 NotRun: 0

Looks like more than a few commands are categorized as "missing" and the expected version of NodeJS is out of date.

Also, I didn't see an error when I left azd out of command_list... Digging into that more deeply now. This appears to be caused by multiple Should assertions in a single It block where the first Should fails and the second Should does not run.

@danieljurek danieljurek marked this pull request as draft September 26, 2022 22:55
@danieljurek
Copy link
Member Author

Upon closer inspection, pinning nodejs does not work as it is upgraded in a subsequent step:


#11 [ 7/35] RUN tdnf update -y && bash ./tdnfinstall.sh   autoconf   ansible   bash-completion   build-essential   binutils   ca-certificates   ca-certificates-legacy   chkconfig   cifs-utils   curl   bind-utils   dos2unix   dotnet-runtime-6.0   dotnet-sdk-6.0   e2fsprogs   emacs   gawk   glibc-lang   glibc-i18n   grep   gzip   initscripts   iptables   iputils   msopenjdk-11   jq   less   libffi   libffi-devel   libtool   lz4   openssl   openssl-libs   openssl-devel   man-db   moby-cli   moby-engine   msodbcsql17   mssql-tools   mysql   nano   net-tools   parallel   patch   pkg-config   postgresql-libs   postgresql   powershell   python3   python3-pip   python3-virtualenv   python3-libs   python3-devel   puppet   rpm   rsync   sed   sudo   tar   tmux   unixODBC   unzip   util-linux   vim   wget   which   zip   zsh
#11 sha256:f9575fe5b84a1ae316cac20b7ebd094d73b48f1d93e0035c1f75f40ba1548288
#11 3.679 Loaded plugin: tdnfrepogpgcheck
#11 3.679
#11 3.679 Upgrading:
#11 3.679 nodejs                   x86_64       16.16.0-2.cm2    mariner-official-base  47.44M 49747072
#11 3.679
#11 3.679 Total installed size:  47.44M 49747072
#11 3.679
#11 3.679 Downloading:
#11 3.679
#11 3.679 Testing transaction
#11 3.679 Running transaction
#11 3.679 Installing/Updating: nodejs-16.16.0-2.cm2.x86_64
#11 4.338 Removing: nodejs-16.14.2-2.cm2.x86_64
#11 4.608

Couple of possible solutions:

  • Accept upgrade to nodejs 16.16
  • Pin other dependencies such that the expected version of nodejs is installed.

@darrentu
Copy link
Contributor

darrentu commented Oct 19, 2022

Hi @danieljurek, can you please pull the latest master into this branch. We updated the command list in our tests.

@danieljurek
Copy link
Member Author

@darrentu -- we're getting closer... looks like pip3.10 is not expected

 Expected strings to be the same, because Commands 'pip3.10' were unexpectedly found on the path. Probably this is good, in which case add them to command_list, but they were different.
 Expected length: 0
 Actual length:   7
 Strings differ at index 0.
 Expected: ''
 But was:  'pip3.10'
            ^
 at $added | Should -Be "" -Because "Commands '$added' were unexpectedly found on the path. Probably this is good, in which case add them to command_list", /tests/PSinLinuxCloudShellImage.Tests.ps1:72

@danieljurek
Copy link
Member Author

@darrentu -- I've got additional failures after rebasing and running CI again. Looks like command_list needs an update.

https://github.com/Azure/CloudShell/actions/runs/5469682124/jobs/9958891497?pr=248

 Expected: ''
 But was:  'm365_chili,tdnf-config,tdnfj'

@danieljurek
Copy link
Member Author

The supported release of azd is now out. This can merge when ready @darrentu

@danieljurek
Copy link
Member Author

This is handled in #341

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