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

Revert "[universal] - Issue universal config change for non-root default codespace user and installing google chrome browser reuse sandbox to run puppeteer cli in universal image" #1315

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/push-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ jobs:
- name: Checkout
id: checkout
uses: actions/checkout@v3


- name: Build and push dev tags
id: build_and_push
Expand All @@ -41,7 +40,7 @@ jobs:
STUB_REGISTRY_BASE_PATH: ${{ secrets.STUB_REGISTRY_BASE_PATH }}
SECONDARY_REGISTRY_BASE_PATH: ${{ secrets.SECONDARY_REGISTRY_BASE_PATH }}
TOKEN_NAME: ${{ secrets.TOKEN_NAME }}
PASSWORD: ${{ secrets.PASSWORD }}
PASSWORD: ${{ secrets.PASSWORD }}
run: |
set -e

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push-manual-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
with:
path: 'release'
ref: ${{ github.event.inputs.release }}

- name: Build and push
id: build_and_push
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

- name: Checkout
id: checkout
uses: actions/checkout@v3
uses: actions/checkout@v3

- name: Get tag name
run: echo "TAG=$(echo "${{ github.ref }}" | grep -oP 'refs/tags/\K(.+)')" >> $GITHUB_ENV
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/smoke-universal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ jobs:
- name: Checkout
id: checkout
uses: actions/checkout@v3

- name: Smoke test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
id: smoke_test
uses: ./.github/actions/smoke-test
with:
Expand Down
3 changes: 1 addition & 2 deletions src/universal/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,8 @@ RUN apt-get update \
# Install tools and shells not in common script
&& apt-get install -yq vim vim-doc xtail software-properties-common libsecret-1-dev \
# Install additional tools (useful for 'puppeteer' project)
# Also added three new libraries to ensure google chrome sucessful installation
&& apt-get install -y --no-install-recommends libnss3 libnspr4 libatk-bridge2.0-0 libatk1.0-0 libx11-6 libpangocairo-1.0-0 \
libx11-xcb1 libcups2 libxcomposite1 libxdamage1 libxfixes3 libpango-1.0-0 libgbm1 libgtk-3-0 fonts-liberation libvulkan1 xdg-utils \
libx11-xcb1 libcups2 libxcomposite1 libxdamage1 libxfixes3 libpango-1.0-0 libgbm1 libgtk-3-0 \
# Clean up
&& apt-get autoremove -y && apt-get clean -y \
# Move first run notice to right spot
Expand Down
8 changes: 2 additions & 6 deletions src/universal/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"ghcr.io/devcontainers/features/common-utils:2": {
"username": "codespace",
"userUid": "1000",
"userGid": "1000"
"userGid": "1000"
},
"ghcr.io/devcontainers/features/dotnet:2": {
"version": "8.0",
Expand Down Expand Up @@ -103,11 +103,7 @@
],
"remoteUser": "codespace",
"containerUser": "codespace",
// This variable is set to ensure puppeteer library gets the sandbox location by default.
// Ref:- https://github.com/devcontainers/internal/issues/249
"containerEnv": {
"CHROME_DEVEL_SANDBOX": "/usr/local/sbin/chrome-devel-sandbox"
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,4 @@ bash -c ". /usr/local/share/nvm/nvm.sh && nvm use 18"
bash -c "npm -g install -g [email protected]"
bash -c ". /usr/local/share/nvm/nvm.sh && nvm use stable"

# Installing google chrome to use the sandbox for launching browser using puppeteer library in nodejs.
# Ref:- https://github.com/devcontainers/internal/issues/249
cd /
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
dpkg -i google-chrome-stable_current_amd64.deb
cd /opt/google/chrome/
chown root:root chrome-sandbox
chmod 4755 chrome-sandbox
cp -p chrome-sandbox /usr/local/sbin/chrome-devel-sandbox
cd /
rm -f google-chrome-stable_current_amd64.deb

echo "Done!"
6 changes: 1 addition & 5 deletions src/universal/test-project/test.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,6 @@ check "zsh" zsh --version
# Check env variable
check "RAILS_DEVELOPMENT_HOSTS is set correctly" echo $RAILS_DEVELOPMENT_HOSTS | grep ".githubpreview.dev,.preview.app.github.dev,.app.github.dev"

# Check that we can run a puppeteer node app.
yarn
check "run-puppeteer" node puppeteer.js

# Check Oryx
check "oryx" oryx --version

Expand Down Expand Up @@ -204,4 +200,4 @@ check "conda-install-tensorflow" bash -c "conda create --name test-env -c conda-
check "conda-install-pytorch" bash -c "conda create --name test-env -c conda-forge --yes pytorch"

# Report result
reportResults
reportResults