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 new option to install azure-cli extensions #165

Merged
merged 5 commits into from
Nov 14, 2022

Conversation

pauldotyu
Copy link
Contributor

@jkeech and @asaikali - I have the code working which would resolve #149 but my solution for obtaining the remoteUser is a bit of a hack (for now). Will keep this as a draft PR until devcontainers/spec#91 is sorted out.

@pauldotyu pauldotyu changed the title Add new option for azure-cli extensions to resolve #149 Add new option to install azure-cli extensions Sep 16, 2022
@pauldotyu pauldotyu marked this pull request as ready for review October 28, 2022 01:27
@pauldotyu pauldotyu requested a review from a team as a code owner October 28, 2022 01:27
@pauldotyu
Copy link
Contributor Author

With devcontainers/spec/issues/91 closed and env variable for user tested on vscode-remote-release/issues/7404, code has been updated to use the new env variable _REMOTE_USER when installing extensions.

This relies on Dev Containers extension v0.261.0 or higher and this will be ready merge once the latest extension goes into general release.

@pauldotyu
Copy link
Contributor Author

@jkeech, would you be able to review this and let me know if I am missing anything?

Copy link
Member

@joshspicer joshspicer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you taken a stab at writing a scenario test for this change? I think it would be really useful.

We have some documentation on the concept here, as well as plenty of examples in this repo (one such example)

@joshspicer
Copy link
Member

@pauldotyu - Also I am excited to share that with the newest build to the devcontainer CLI, we are injecting variables into Feature install.sh scripts with the effective remoteUser

We have some docs here - I think it will be really useful for what you're trying to accomplish with the su statement: https://containers.dev/implementors/features/#user-env-var

@pauldotyu
Copy link
Contributor Author

Have you taken a stab at writing a scenario test for this change? I think it would be really useful.

We have some documentation on the concept here, as well as plenty of examples in this repo (one such example)

Thanks for pointing me to this. I've just added test scenario for some specific azure cli extensions

@pauldotyu
Copy link
Contributor Author

@pauldotyu - Also I am excited to share that with the newest build to the devcontainer CLI, we are injecting variables into Feature install.sh scripts with the effective remoteUser

We have some docs here - I think it will be really useful for what you're trying to accomplish with the su statement: https://containers.dev/implementors/features/#user-env-var

Yes, I noticed the change was made to include the _REMOTE_USER environment variable and I am using that in my install script 😊

This PR should be ready for another review. Just let me know if I am missing anything else. Thanks!

Copy link
Member

@joshspicer joshspicer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for the delay, the Codespaces side of the team has been a busy few weeks leading up to GitHub Universe :)

Thanks for the contribution - this looks great :)

@joshspicer joshspicer merged commit eafa282 into devcontainers:main Nov 14, 2022
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.

Provide a feature that can install azure cli extensions
2 participants