Skip to content

Commit

Permalink
Merge pull request #709 from rstudio/dev
Browse files Browse the repository at this point in the history
Merge dev to main
  • Loading branch information
bschwedler authored Mar 25, 2024
2 parents b57617d + d075a3c commit 14fa6a9
Show file tree
Hide file tree
Showing 20 changed files with 193 additions and 53 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# format per https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#about-code-owners
* @colearendt @ianpittwood @bschwedler
* @colearendt @ianpittwood @bschwedler @costrouc

/connect/* @rstudio/connect
/connect-content-init/* @rstudio/connect
Expand Down
15 changes: 10 additions & 5 deletions .github/actions/build-test-scan-push/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,16 @@ runs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Free Disk space
shell: bash
run: |
sudo rm -rf /usr/local/lib/android # will release about 10 GB
sudo rm -rf /usr/share/dotnet # will release about 20GB
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/[email protected]
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: false

- name: Login to ghcr.io
uses: docker/login-action@v3
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/build-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ jobs:
- {product: 'package-manager', os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.12.1", py-alternate: "3.11.7"}
- {product: 'r-session-complete', os: 'centos7', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.14", py-alternate: "3.8.15"}
- {product: 'r-session-complete', os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.14", py-alternate: "3.8.15"}
- {product: 'workbench-for-microsoft-azure-ml', os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.14", py-alternate: "3.8.15"}

concurrency:
group: build-products-${{ matrix.config.product }}-${{ matrix.config.os }}-${{ github.ref }}
Expand Down Expand Up @@ -316,7 +315,7 @@ jobs:
)
echo "IMAGE_TAGS=$IMAGE_TAGS" >> $GITHUB_OUTPUT
- name: Build/Test/Scan/Push base pro image
- name: Build/Test/Scan/Push product image
id: build1
uses: ./.github/actions/build-test-scan-push
continue-on-error: true
Expand All @@ -340,7 +339,7 @@ jobs:
if: steps.build1.outcome == 'failure'
run: sleep 60

- name: Retry - Build/Test/Scan/Push base pro image
- name: Retry - Build/Test/Scan/Push product image
id: build2
if: steps.build1.outcome == 'failure'
uses: ./.github/actions/build-test-scan-push
Expand Down
127 changes: 127 additions & 0 deletions .github/workflows/build-workbench-aml.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
on:
schedule:
- cron: '0 14 * * 1' # If updating this value, be sure to update logic for all `push-image` arguments!
push:
branches:
- main
- dev
pull_request:

name: Workbench for Azure ML - Build, Test, Scan, and Push
jobs:
build-workbench-for-azure-ml:
env:
product: workbench-for-microsoft-azure-ml
os: ubuntu2204
r-primary: 4.2.3
r-alternate: 4.1.3
py-primary: 3.9.14
py-alternate: 3.8.15
runs-on: ubuntu-latest-4x
name: build-workbench-for-azure-ml

permissions:
contents: read
packages: write

steps:

- name: Check Out Repo - cron main
if: github.event.schedule == '0 14 * * 1'
uses: actions/checkout@v3
with:
ref: main

- name: Check Out Repo
if: github.event.schedule != '0 14 * * 1'
uses: actions/checkout@v3

- name: Set up Just
uses: extractions/setup-just@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Get Version
id: get-version
run: |
VERSION=$(just -f ci.Justfile get-version ${{ env.product }} --type=release --local)
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
- name: Get build args
id: get-build-args
run: |
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
BUILD_ARGS=$( \
just -f ci.Justfile \
R_VERSION=${{ env.r-primary }} \
R_VERSION_ALT=${{ env.r-alternate }} \
PYTHON_VERSION=${{ env.py-primary }} \
PYTHON_VERSION_ALT=${{ env.py-alternate }} \
get-product-args \
${{ env.product }} \
${{ env.os }} \
${{ steps.get-version.outputs.VERSION }} \
)
echo "BUILD_ARGS<<$EOF" >> $GITHUB_OUTPUT
echo "$BUILD_ARGS" >> $GITHUB_OUTPUT
echo "$EOF" >> $GITHUB_OUTPUT
- name: Get tags
id: get-tags
run: |
IMAGE_TAGS=$( \
just -f ci.Justfile \
R_VERSION=${{ env.r-primary }} \
R_VERSION_ALT=${{ env.r-alternate }} \
PYTHON_VERSION=${{ env.py-primary }} \
PYTHON_VERSION_ALT=${{ env.py-alternate }} \
get-product-tags \
${{ env.product }} \
${{ env.os }} \
${{ steps.get-version.outputs.VERSION }} \
)
echo "IMAGE_TAGS=$IMAGE_TAGS" >> $GITHUB_OUTPUT
- name: Build/Test/Scan/Push product image
id: build1
uses: ./.github/actions/build-test-scan-push
continue-on-error: true
with:
context: ./${{ env.product }}
os: ${{ env.os }}
product: ${{ env.product }}
image-tags: ${{ steps.get-tags.outputs.IMAGE_TAGS }}
build-args: ${{ steps.get-build-args.outputs.BUILD_ARGS }}
push-image: ${{ github.ref == 'refs/heads/main' || github.event.schedule == '0 14 * * 1' }}
snyk-token: ${{ secrets.SNYK_TOKEN }}
snyk-org-id: ${{ secrets.SNYK_ORG_ID }}
ghcr-token: ${{ secrets.GITHUB_TOKEN }}
dockerhub-username: ${{ secrets.DOCKER_HUB_USERNAME }}
dockerhub-token: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
gcp-json: '${{ secrets.GCP_ARTIFACT_REGISTRY_JSON }}'

# Begin retry logic

- name: Wait 60s on failure before retrying
if: steps.build1.outcome == 'failure'
run: sleep 60

- name: Retry - Build/Test/Scan/Push product image
id: build2
if: steps.build1.outcome == 'failure'
uses: ./.github/actions/build-test-scan-push
with:
context: ./${{ env.product }}
os: ${{ env.os }}
product: ${{ env.product }}
image-tags: ${{ steps.get-tags.outputs.IMAGE_TAGS }}
build-args: ${{ steps.get-build-args.outputs.BUILD_ARGS }}
push-image: ${{ github.ref == 'refs/heads/main' || github.event.schedule == '0 14 * * 1' }}
snyk-token: ${{ secrets.SNYK_TOKEN }}
snyk-org-id: ${{ secrets.SNYK_ORG_ID }}
ghcr-token: ${{ secrets.GITHUB_TOKEN }}
dockerhub-username: ${{ secrets.DOCKER_HUB_USERNAME }}
dockerhub-token: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
gcp-json: '${{ secrets.GCP_ARTIFACT_REGISTRY_JSON }}'

# End retry logic
6 changes: 1 addition & 5 deletions .github/workflows/build-workbench-gcw.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,13 @@ on:
name: Workbench for GCW - Build, Test, Scan, and Push
jobs:
build-workbench-for-google-cloud-workstations:
runs-on: ubuntu-latest
runs-on: ubuntu-latest-4x
name: build-workbench-for-google-cloud-workstations

permissions:
contents: read
packages: write

concurrency:
group: build-products-${{ matrix.config.product }}-${{ matrix.config.os }}-${{ github.ref }}
cancel-in-progress: true

steps:
- name: Check Out Repo - cron main
if: github.event.schedule == '0 14 * * 1'
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ changed in each image.

This file only captures pervasive, repository-wide changes.

# 2024-03-14

- Update Professional Drivers to 2024.03.0

# 2024-02-01

- Update Pro Drivers to 2023.12.1
Expand Down
2 changes: 1 addition & 1 deletion ci.Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ R_VERSION_ALT := "4.1.3"
PYTHON_VERSION := "3.9.17"
PYTHON_VERSION_ALT := "3.8.17"

DRIVERS_VERSION := "2023.12.1"
DRIVERS_VERSION := "2024.03.0"
DRIVERS_VERSION_RHEL := DRIVERS_VERSION + "-1"

QUARTO_VERSION := "1.3.340"
Expand Down
42 changes: 21 additions & 21 deletions content/matrix.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
[
{"r": "3.1.3", "py": "2.7.18", "drivers": "2023.12.1", "os": "ubuntu1804", "os_alt": "bionic"},
{"r": "3.2.5", "py": "2.7.18", "drivers": "2023.12.1", "os": "ubuntu1804", "os_alt": "bionic"},
{"r": "3.3.3", "py": "3.6.13", "drivers": "2023.12.1", "os": "ubuntu1804", "os_alt": "bionic"},
{"r": "3.4.4", "py": "3.6.13", "drivers": "2023.12.1", "os": "ubuntu1804", "os_alt": "bionic"},
{"r": "3.4.4", "py": "3.7.10", "drivers": "2023.12.1", "os": "ubuntu1804", "os_alt": "bionic"},
{"r": "3.5.3", "py": "2.7.18", "drivers": "2023.12.1", "os": "ubuntu1804", "os_alt": "bionic"},
{"r": "3.5.3", "py": "3.7.10", "drivers": "2023.12.1", "os": "ubuntu1804", "os_alt": "bionic"},
{"r": "3.6.3", "py": "2.7.18", "drivers": "2023.12.1", "os": "ubuntu1804", "os_alt": "bionic"},
{"r": "3.6.3", "py": "3.6.13", "drivers": "2023.12.1", "os": "ubuntu1804", "os_alt": "bionic"},
{"r": "3.6.3", "py": "3.8.8", "drivers": "2023.12.1", "os": "ubuntu1804", "os_alt": "bionic"},
{"r": "4.0.5", "py": "3.6.13", "drivers": "2023.12.1", "os": "ubuntu1804", "os_alt": "bionic"},
{"r": "4.0.5", "py": "3.7.10", "drivers": "2023.12.1", "os": "ubuntu1804", "os_alt": "bionic"},
{"r": "4.0.5", "py": "3.8.8", "drivers": "2023.12.1", "os": "ubuntu1804", "os_alt": "bionic"},
{"r": "4.0.5", "py": "3.9.2", "drivers": "2023.12.1", "os": "ubuntu1804", "os_alt": "bionic"},
{"r": "4.1.0", "py": "3.8.8", "drivers": "2023.12.1", "os": "ubuntu1804", "os_alt": "bionic"},
{"r": "4.1.0", "py": "3.9.2", "drivers": "2023.12.1", "os": "ubuntu1804", "os_alt": "bionic"},
{"r": "4.1.3", "py": "3.10.4", "drivers": "2023.12.1", "os": "ubuntu1804", "os_alt": "bionic"},
{"r": "3.6.3", "py": "3.8.16", "drivers": "2023.12.1", "os": "ubuntu2204", "os_alt": "jammy"},
{"r": "4.0.5", "py": "3.9.16", "drivers": "2023.12.1", "os": "ubuntu2204", "os_alt": "jammy"},
{"r": "4.1.3", "py": "3.10.11", "drivers": "2023.12.1", "os": "ubuntu2204", "os_alt": "jammy"},
{"r": "4.2.2", "py": "3.11.3", "drivers": "2023.12.1", "os": "ubuntu2204", "os_alt": "jammy"}
{"r": "3.1.3", "py": "2.7.18", "drivers": "2024.03.0", "os": "ubuntu1804", "os_alt": "bionic"},
{"r": "3.2.5", "py": "2.7.18", "drivers": "2024.03.0", "os": "ubuntu1804", "os_alt": "bionic"},
{"r": "3.3.3", "py": "3.6.13", "drivers": "2024.03.0", "os": "ubuntu1804", "os_alt": "bionic"},
{"r": "3.4.4", "py": "3.6.13", "drivers": "2024.03.0", "os": "ubuntu1804", "os_alt": "bionic"},
{"r": "3.4.4", "py": "3.7.10", "drivers": "2024.03.0", "os": "ubuntu1804", "os_alt": "bionic"},
{"r": "3.5.3", "py": "2.7.18", "drivers": "2024.03.0", "os": "ubuntu1804", "os_alt": "bionic"},
{"r": "3.5.3", "py": "3.7.10", "drivers": "2024.03.0", "os": "ubuntu1804", "os_alt": "bionic"},
{"r": "3.6.3", "py": "2.7.18", "drivers": "2024.03.0", "os": "ubuntu1804", "os_alt": "bionic"},
{"r": "3.6.3", "py": "3.6.13", "drivers": "2024.03.0", "os": "ubuntu1804", "os_alt": "bionic"},
{"r": "3.6.3", "py": "3.8.8", "drivers": "2024.03.0", "os": "ubuntu1804", "os_alt": "bionic"},
{"r": "4.0.5", "py": "3.6.13", "drivers": "2024.03.0", "os": "ubuntu1804", "os_alt": "bionic"},
{"r": "4.0.5", "py": "3.7.10", "drivers": "2024.03.0", "os": "ubuntu1804", "os_alt": "bionic"},
{"r": "4.0.5", "py": "3.8.8", "drivers": "2024.03.0", "os": "ubuntu1804", "os_alt": "bionic"},
{"r": "4.0.5", "py": "3.9.2", "drivers": "2024.03.0", "os": "ubuntu1804", "os_alt": "bionic"},
{"r": "4.1.0", "py": "3.8.8", "drivers": "2024.03.0", "os": "ubuntu1804", "os_alt": "bionic"},
{"r": "4.1.0", "py": "3.9.2", "drivers": "2024.03.0", "os": "ubuntu1804", "os_alt": "bionic"},
{"r": "4.1.3", "py": "3.10.4", "drivers": "2024.03.0", "os": "ubuntu1804", "os_alt": "bionic"},
{"r": "3.6.3", "py": "3.8.16", "drivers": "2024.03.0", "os": "ubuntu2204", "os_alt": "jammy"},
{"r": "4.0.5", "py": "3.9.16", "drivers": "2024.03.0", "os": "ubuntu2204", "os_alt": "jammy"},
{"r": "4.1.3", "py": "3.10.11", "drivers": "2024.03.0", "os": "ubuntu2204", "os_alt": "jammy"},
{"r": "4.2.2", "py": "3.11.3", "drivers": "2024.03.0", "os": "ubuntu2204", "os_alt": "jammy"}
]
2 changes: 1 addition & 1 deletion content/pro/Dockerfile.ubuntu1804
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ FROM ${REGISTRY}/rstudio/content-base:r${R_VERSION}-py${PYTHON_VERSION}-ubuntu18
LABEL maintainer="RStudio Docker <[email protected]>"

# Install RStudio Professional Drivers ----------------------------------------#
ARG DRIVERS_VERSION=2023.12.1
ARG DRIVERS_VERSION=2024.03.0
ARG R_VERSION
ARG DEBIAN_FRONTEND=noninteractive

Expand Down
2 changes: 1 addition & 1 deletion content/pro/Dockerfile.ubuntu2204
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ FROM ${REGISTRY}/rstudio/content-base:r${R_VERSION}-py${PYTHON_VERSION}-ubuntu22
LABEL maintainer="RStudio Docker <[email protected]>"

# Install RStudio Professional Drivers ----------------------------------------#
ARG DRIVERS_VERSION=2023.12.1
ARG DRIVERS_VERSION=2024.03.0
ARG R_VERSION
ARG DEBIAN_FRONTEND=noninteractive

Expand Down
2 changes: 1 addition & 1 deletion content/pro/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ R_VERSION := "3.6.3"

PYTHON_VERSION := "3.9.5"

DRIVERS_VERSION := "2023.12.1"
DRIVERS_VERSION := "2024.03.0"
DRIVERS_VERSION_RHEL := DRIVERS_VERSION + "-1"

DEFAULT_TAG := IMAGE_PREFIX + PRODUCT + ":r" + R_VERSION + "-py" + PYTHON_VERSION + "-" + IMAGE_OS
Expand Down
8 changes: 4 additions & 4 deletions product/pro/Dockerfile.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ ARG R_VERSION=4.2.0
ARG R_VERSION_ALT=3.6.2
ARG PYTHON_VERSION=3.9.14
ARG PYTHON_VERSION_ALT=3.8.15
ARG DRIVERS_VERSION=2023.12.1-1
ARG DRIVERS_VERSION=2024.03.0-1

RUN yum update -y \
&& yum install -y unixODBC unixODBC-devel \
&& curl -O https://cdn.rstudio.com/drivers/7C152C12/installer/rstudio-drivers-${DRIVERS_VERSION}.el7.x86_64.rpm \
&& yum install -y ./rstudio-drivers-${DRIVERS_VERSION}.el7.x86_64.rpm \
&& curl -O https://cdn.rstudio.com/drivers/7C152C12/installer/rstudio-drivers-${DRIVERS_VERSION}.el.x86_64.rpm \
&& yum install -y ./rstudio-drivers-${DRIVERS_VERSION}.el.x86_64.rpm \
&& yum clean all \
&& rm -f rstudio-drivers-${DRIVERS_VERSION}.el7.x86_64.rpm \
&& rm -f rstudio-drivers-${DRIVERS_VERSION}.el.x86_64.rpm \
&& cp /opt/rstudio-drivers/odbcinst.ini.sample /etc/odbcinst.ini \
&& "/opt/R/${R_VERSION}/bin/R" -e 'install.packages("odbc", repos="https://packagemanager.rstudio.com/cran/__linux__/centos7/latest")'

Expand Down
2 changes: 1 addition & 1 deletion product/pro/Dockerfile.ubuntu2204
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ARG R_VERSION=4.2.3
ARG R_VERSION_ALT=4.1.3
ARG PYTHON_VERSION=3.9.17
ARG PYTHON_VERSION_ALT=3.8.17
ARG DRIVERS_VERSION=2023.12.1
ARG DRIVERS_VERSION=2024.03.0

RUN apt-get update \
&& apt-get install -yq --no-install-recommends unixodbc unixodbc-dev \
Expand Down
2 changes: 1 addition & 1 deletion product/pro/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ PYTHON_VERSION_ALT := "3.8.17"
TINI_VERSION := "0.19.0"
QUARTO_VERSION := "1.3.340"

DRIVERS_VERSION := "2023.12.1"
DRIVERS_VERSION := "2024.03.0"
DRIVERS_VERSION_RHEL := DRIVERS_VERSION + "-1"

_make-default-tag OS=IMAGE_OS:
Expand Down
2 changes: 1 addition & 1 deletion r-session-complete/.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
R_VERSION=4.1.0
PYTHON_VERSION=3.9.5
RSW_VERSION=2023.12.1+402.pro1
DRIVERS_VERSION=2023.12.1-1
DRIVERS_VERSION=2024.03.0-1
2 changes: 1 addition & 1 deletion r-session-complete/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ IMAGE_OS := "ubuntu2204"
RSW_VERSION := "2023.12.1+402.pro1"
RSW_LICENSE := ""

DRIVERS_VERSION := "2023.12.1"
DRIVERS_VERSION := "2024.03.0"
DRIVERS_VERSION_RHEL := DRIVERS_VERSION + "-1"

R_VERSION := "4.2.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ ENV WORKBENCH_JUPYTER_PATH=/usr/local/bin/jupyter
COPY deps/* /

### Update/upgrade system packages ###
RUN apt-get update --fix-missing \
RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - \
&& apt-get update --fix-missing \
&& apt-get upgrade -yq \
&& xargs -a /apt_packages.txt apt-get install -yq --no-install-recommends \
&& rm /apt_packages.txt \
Expand Down
16 changes: 13 additions & 3 deletions workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,19 @@ RUN grep -v "DatabaseMirror" /etc/clamav/freshclam.conf > /etc/clamav/freshclam.
# Update ClamAV
RUN freshclam --log="/var/log/clamav/clamupdate.log"

# Scan all but /sys for viruses. If this fails, the Docker build will
# fail.
RUN clamscan --recursive --infected --exclude-dir="^/sys" --log "/var/log/clamav/clamscan.log" /
# Scan all but /sys for viruses. If this fails, the Docker build will fail.
#
# --exclude options are false positives per rstudio/rstudio-docker-products#704.
# They can likely be removed in the future after ClamAV's database is updated.
RUN clamscan \
--recursive \
--infected \
--exclude-dir="^/sys" \
--exclude="/opt/az/lib/python3.11/ensurepip/_bundled/pip-23.2.1-py3-none-any.whl" \
--exclude="/opt/az/lib/python3.11/site-packages/pip/_vendor/distlib/w32.exe" \
--exclude="/opt/az/lib/python3.11/site-packages/pip/_vendor/distlib/w64-arm.exe" \
--exclude="/opt/az/lib/python3.11/site-packages/pip/_vendor/distlib/t64-arm.exe" \
--log "/var/log/clamav/clamscan.log" /


# Ignore the intermediate 'clamav' multi-stage build step so we don't distribute
Expand Down
1 change: 0 additions & 1 deletion workbench-for-microsoft-azure-ml/test/goss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ command:
]

# test all R versions and packages
# "/opt/R/3.3.3/bin/R" "/opt/R/3.4.4/bin/R"
{{ $rvers := mkSlice "/opt/R/4.0.5/bin/R" "/opt/R/4.1.3/bin/R" "/opt/R/4.2.3/bin/R" "/opt/R/4.3.2/bin/R"}}
{{ $pkgs := .Vars.packages}}
# loops the library command for each R version to ensure expected libraries exist for all.
Expand Down
1 change: 0 additions & 1 deletion workbench-for-microsoft-azure-ml/test/goss_vars.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
packages:
- rgdal
- ggplot2
- mlflow
- odbc
Expand Down

0 comments on commit 14fa6a9

Please sign in to comment.