Repository navigation
Use CodeArtifact mirrors for virtual-browser AWS apps - #491
Merged
Merged
Conversation
1. Airlocked apps cannot reach public PyPI or npm. The virtual-browser Jupyter and RStudio templates now opt in to the account's CodeArtifact mirrors when the instance has the vwbusr:codeartifact-domain-name tag. 2. virtual-browser-jupyter also gains the AWS CLI feature that the AWS startup scripts need. 3. configure-codeartifact.sh reads the account and region from instance metadata, writes them to /etc/workbench-codeartifact.conf, and installs refresh-codeartifact-login.sh. It runs regardless of LOG_IN, and a failed login logs a warning instead of failing app creation. 4. refresh-codeartifact-login.sh logs pip and npm in to pypi-mirror and npm-mirror with 12-hour tokens. It uses only the EC2 instance role, ignoring workspace AWS profiles and other credential sources, and keeps both config files at mode 600. It attempts both logins even if one fails, and a lock serializes concurrent refreshes. --start refreshes once, then ensures a single background worker that refreshes every six hours, or after five minutes if the last refresh failed. remount-on-restart.sh runs --start on every container restart. 5. Document the behavior and log location in the startupscript README, and add a CI job for tests/test-codeartifact.bats. PHP-180400
yonghaoy
approved these changes
Sep 25, 2026
pantherman594
approved these changes
Sep 25, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
PHP-180400