You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the feed URL is an Azure Artifacts feed pip will use the keyring helper to provide the credentials needed
39
39
to download the package.
40
40
41
+
## Authentication Helper Wait Behavior
42
+
43
+
The shim scripts (e.g., `dotnet`, `npm`, `nuget`) now include a wait mechanism for the Azure DevOps authentication helper. When invoked, these scripts will:
44
+
45
+
1. Wait up to 3 minutes for the `ado-auth-helper` to become available (configurable via `MAX_WAIT` environment variable)
46
+
2. Display progress indicators every 20 seconds while waiting
47
+
3. Continue execution once authentication is successful
48
+
4.**Continue with the underlying command even if authentication is not available** after the timeout
49
+
50
+
This ensures that package restore operations can proceed even if there's a slight delay in the authentication helper installation, which can occur in some codespace initialization scenarios. Commands will still execute without authentication, though they may fail to access private Azure Artifacts feeds.
51
+
52
+
The scripts are designed to be sourced safely, meaning they won't terminate the calling shell if authentication fails - they will simply return an error code and allow the underlying tool to execute. This allows you to work with public packages or other package sources even when Azure Artifacts authentication is unavailable.
53
+
41
54
## OS Support
42
55
43
-
This feature is tested to work on Debian/Ubuntu and Mariner CBL 2.0
56
+
This feature is tested to work on Debian/Ubuntu and Mariner CBL 2.0
57
+
58
+
## Testing
59
+
60
+
To test this feature locally, you can use the devcontainer CLI:
61
+
62
+
```bash
63
+
# Test all scenarios
64
+
devcontainer features test -f artifacts-helper
65
+
66
+
# Test specific scenario
67
+
devcontainer features test -f artifacts-helper --scenario test_auth_wait
68
+
```
69
+
70
+
## Changing where functions are configured
71
+
72
+
By default, the functions are defined in `/etc/bash.bashrc` and `/etc/zsh/zshrc` if the container user is `root`, otherwise `~/.bashrc` and `~/.zshrc`.
73
+
This default configuration ensures that the functions are always available for any interactive shells.
74
+
75
+
In some cases it can be useful to have the functions written to a non-default location. For example:
76
+
- the configuration file of a shell other than `bash` and `zsh`
77
+
- a custom file which is not a shell configuration script (so that it can be `source`d in non-interactive shells and scripts)
78
+
79
+
To do this, set the `targetFiles` option to the path script path where the functions should be written. Note that the default paths WILL NOT be used
80
+
if the `targetFiles` option is provided, so you may want to include them in the overridden value, or add `source` the custom script in those configurations:
0 commit comments