-
Notifications
You must be signed in to change notification settings - Fork 212
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
install latest azd version on containers #1766
Closed
vhvb1989
wants to merge
9
commits into
Azure:main
from
vhvb1989:install-latest-azd-version-on-containers
Closed
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
c4a7e72
resolve default after looking at azure.yaml
vhvb1989 7d17634
cl
vhvb1989 0ae2822
fix tests
vhvb1989 01d5a3d
Merge branch 'main' of github.com:Azure/azure-dev
vhvb1989 4fc950d
Merge branch 'main' of github.com:Azure/azure-dev
vhvb1989 adb7229
Merge branch 'main' of github.com:Azure/azure-dev
vhvb1989 4182c62
Merge branch 'main' of github.com:Azure/azure-dev
vhvb1989 c0be074
Merge branch 'main' of github.com:Azure/azure-dev
vhvb1989 8c032b1
use sudo to install azd
vhvb1989 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does adding
sudo
change which version is installed? Or are you saying that a different version was installed in another CI step and this was failing previously?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I tried locally and this
curl .... | bash
just fails during docker build, leaving just a previous azd version installed within the container.I tried in WSL2. As soon as I add the
sudo
there, I get latest versionThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vhvb1989 Do you recall what output you got from
install-azd.sh
when you ran it withoutsudo
? I am surprised that this is required. I would have expected that the inside the container the step was running at root (note, for example, how we are able to run a bunch ofapt-get
commands that should require root as well).I don't doubt we have an issue here - but I'm trying to better understand what it was and why this ends up fixing it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, I tried again and of course it is working fine now.
So, my new hypothesis is that docker is just skipping the re-build of a layer that it previously build, because it has no changes. So, I built the container some time ago, before azd-release, and now, even thought there's a new release, docker is using the same pre-built layer for me, as I haven't changed the
dockerfile
.I think this is not an azd issue, or installer.
The fact that adding
sudo
was working, was only because I was updating the dockerfile, forcing docker to re-compile the layer.What we could do to help
devcontiners
not to fall into this issue is to remove theazd-installation
as a docker-layer and instead support adding config todevcontainer.json
to request azd to be installed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue created: #1776