Skip to content

Commit

Permalink
Merge pull request #866 from rstudio/dev
Browse files Browse the repository at this point in the history
Merge dev -> main
  • Loading branch information
bschwedler authored Nov 6, 2024
2 parents 03894c4 + c9f1c14 commit 48f5432
Show file tree
Hide file tree
Showing 41 changed files with 307 additions and 30 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build-bake-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -421,3 +421,43 @@ jobs:
dockerhub-token: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
snyk-org: ${{ secrets.SNYK_ORG }}
snyk-token: '${{ secrets.SNYK_TOKEN }}'

workbench-session-init-daily:
needs: [versions]
name: Workbench Session Init - Daily
runs-on: ubuntu-latest-4x

env:
target: "workbench-session-init-daily"
WORKBENCH_DAILY_VERSION: ${{ needs.versions.outputs.WORKBENCH_DAILY_VERSION }}
WORKBENCH_PREVIEW_VERSION: ${{ needs.versions.outputs.WORKBENCH_PREVIEW_VERSION }}
PACKAGE_MANAGER_DAILY_VERSION: ${{ needs.versions.outputs.PACKAGE_MANAGER_DAILY_VERSION }}
PACKAGE_MANAGER_PREVIEW_VERSION: ${{ needs.versions.outputs.PACKAGE_MANAGER_PREVIEW_VERSION }}
CONNECT_DAILY_VERSION: ${{ needs.versions.outputs.CONNECT_DAILY_VERSION }}
BRANCH: ${{ github.head_ref || github.ref_name }}

concurrency:
group: bake-workbench-session-init-daily-${{ github.ref }}
cancel-in-progress: true

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
id: setup-buildx
with:
buildkitd-config: ./share/buildkitd.toml

- name: Build, Test, and Push
uses: ./.github/actions/bake-test-push
with:
target: ${{ env.target }}
bakefile: docker-bake.preview.hcl
push-image: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/dev-rspm' }}
ghcr-token: ${{ secrets.GITHUB_TOKEN }}
dockerhub-username: ${{ secrets.DOCKER_HUB_USERNAME }}
dockerhub-token: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
snyk-org: ${{ secrets.SNYK_ORG }}
snyk-token: '${{ secrets.SNYK_TOKEN }}'
43 changes: 42 additions & 1 deletion .github/workflows/build-bake.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- main
- dev
pull_request:

name: Release - Build, Test, and Push
jobs:
setup:
Expand Down Expand Up @@ -374,3 +374,44 @@ jobs:
snyk-org: ${{ secrets.SNYK_ORG }}
snyk-token: '${{ secrets.SNYK_TOKEN }}'

workbench-for-microsoft-azure-ml:
needs: [setup]
name: Workbench for Microsoft Azure ML
runs-on: ubuntu-latest-8x

concurrency:
group: bake-waml-${{ github.ref }}
cancel-in-progress: true

env:
target: workbench-for-microsoft-azure-ml
GIT_SHA: ${{ needs.setup.outputs.GIT_SHA }}

steps:
- name: Checkout
if: github.event_name == 'schedule'
uses: actions/checkout@v4
with:
ref: 'main'

- name: Checkout
if: github.event_name != 'schedule'
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
id: setup-buildx
with:
buildkitd-config: ./share/buildkitd.toml

- name: Build, Test, and Push
uses: ./.github/actions/bake-test-push
with:
target: ${{ env.target }}
push-image: ${{ github.ref == 'refs/heads/main' || github.event_name == 'schedule' }}
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 }}'
snyk-org: ${{ secrets.SNYK_ORG }}
snyk-token: '${{ secrets.SNYK_TOKEN }}'
7 changes: 4 additions & 3 deletions .github/workflows/build-manual.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ on:
- workbench
- workbench-for-google-cloud-workstations
- workbench-for-microsoft-azure-ml
- workbench-session-init
type:
description: "The type of image being built."
required: false
Expand Down Expand Up @@ -126,15 +127,15 @@ jobs:
else
VERSION="${{ inputs.version }}"
fi
# Set the appropriate env var
suffix="_VERSION"
if [[ "${{ inputs.type }}" == "preview" ]]; then
suffix="_PREVIEW_VERSION"
elif [[ "${{ inputs.type }}" == "daily" ]]; then
suffix="_DAILY_VERSION"
fi
product="${{ inputs.product }}"
if [[ "$product" == "connect" ]] || [[ "$product" == "connect-content-init" ]] || [[ "$product" == "content-images" ]]; then
product="CONNECT"
Expand All @@ -143,7 +144,7 @@ jobs:
else
product="WORKBENCH"
fi
echo "Setting $product$suffix=$VERSION"
echo "$product$suffix=$VERSION" >> $GITHUB_ENV
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
- {product: 'connect-content-init', os: 'ubuntu2204'}
- {product: 'package-manager', os: 'ubuntu2204'}
- {product: 'r-session-complete', os: 'ubuntu2204'}
- {product: 'workbench-session-init', os: 'ubuntu2204'}
- {product: 'workbench-for-microsoft-azure-ml', os: 'ubuntu2204'}
- {product: 'content/base', os: 'ubuntu1804'}
- {product: 'content/base', os: 'ubuntu2204'}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/update-readme.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:
- {prefix: '', repository: 'content-pro', readme_path: './content/pro/README.md'}
- {prefix: 'rstudio-', repository: 'package-manager', readme_path: './package-manager/README.md'}
- {prefix: '', repository: 'r-session-complete', readme_path: './r-session-complete/README.md'}
- {prefix: 'rstudio-', repository: 'workbench-for-microsoft-azure-ml', readme_path: './workbench-for-microsoft-azure-ml/README.md'}
- {prefix: '', repository: 'workbench-session-init', readme_path: './workbench-session-init/README.md'}

steps:
- name: Check Out Repo
Expand Down
9 changes: 5 additions & 4 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ BUILDX_PATH := ""

RSC_VERSION := "2024.09.0"
RSPM_VERSION := "2024.08.2-9"
RSW_VERSION := "2024.09.0+375.pro3"
RSW_VERSION := "2024.09.1+394.pro7"

DRIVERS_VERSION := "2023.05.0"
DRIVERS_VERSION_RHEL := DRIVERS_VERSION + "-1"
Expand Down Expand Up @@ -295,16 +295,17 @@ update-rsw-versions:
r-session-complete/.env \
workbench-for-microsoft-azure-ml/.env \
r-session-complete/Dockerfile.ubuntu2204 \
r-session-complete/Dockerfile.centos7 \
workbench/Dockerfile.ubuntu2204 \
workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204
workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 \
workbench-session-init/Dockerfile.ubuntu2204
sed {{ sed_vars }} "s/RSW_VERSION:.*/RSW_VERSION: {{ RSW_VERSION }}/g" docker-compose.yml
sed {{ sed_vars }} "s/rstudio\/rstudio-workbench:.*/rstudio\/rstudio-workbench:$(just _get-clean-version {{ RSW_VERSION }})/g" docker-compose.yml
sed {{ sed_vars }} "s/^RSW_VERSION := .*/RSW_VERSION := \"{{ RSW_VERSION }}\"/g" \
Justfile
sed {{ sed_vars }} "s/[0-9]\{4\}\.[0-9]\{1,2\}\.[0-9]\{1,2\}/`just _get-clean-version {{ RSW_VERSION }}`/g" \
workbench/README.md \
r-session-complete/README.md
r-session-complete/README.md \
workbench-session-init/README.md
awk -v new_version="{{ RSW_VERSION }}" '
/variable WORKBENCH_VERSION/ { print; getline; print " default = \"" new_version "\""; next }
{ print }
Expand Down
4 changes: 2 additions & 2 deletions ci.Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ get-product-args $PRODUCT $OS $VERSION $USE_S3="false" $BRANCH=`git branch --sho
RSW_DOWNLOAD_URL=$(just -f ci.Justfile _get-rsw-download-url preview $OS)
fi

if [[ $PRODUCT == "workbench" || $PRODUCT == "r-session-complete" || $PRODUCT == "workbench-for-microsoft-azure-ml" ]]; then
if [[ $PRODUCT == "workbench" || $PRODUCT == "workbench-session-init" || $PRODUCT == "r-session-complete" || $PRODUCT == "workbench-for-microsoft-azure-ml" ]]; then
SHORT_NAME="RSW"
elif [[ $PRODUCT == "connect" || $PRODUCT == "connect-content-init" ]]; then
SHORT_NAME="RSC"
Expand Down Expand Up @@ -158,7 +158,7 @@ get-prerelease-args $TYPE $PRODUCT $OS $VERSION $BRANCH=`git branch --show`:

RSW_DOWNLOAD_URL=$(just -f ci.Justfile _get-rsw-download-url $TYPE $OS)

if [[ $PRODUCT == "workbench" || $PRODUCT == "r-session-complete" || $PRODUCT == "workbench-for-microsoft-azure-ml" ]]; then
if [[ $PRODUCT == "workbench" || $PRODUCT == "workbench-session-init" || $PRODUCT == "r-session-complete" || $PRODUCT == "workbench-for-microsoft-azure-ml" ]]; then
SHORT_NAME="RSW"
elif [[ $PRODUCT == "connect" || $PRODUCT == "connect-content-init" ]]; then
SHORT_NAME="RSC"
Expand Down
5 changes: 3 additions & 2 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ variable PACKAGE_MANAGER_VERSION {
}

variable WORKBENCH_VERSION {
default = "2024.09.0+375.pro3"
default = "2024.09.1+394.pro7"
}

variable DRIVERS_VERSION {
Expand Down Expand Up @@ -96,6 +96,7 @@ function get_tags {
variable BASE_BUILD_MATRIX {
default = {
builds = [
{os = "ubuntu2204", r_primary = "4.4.1", r_alternate = "4.3.3", py_primary = "3.11.10", py_alternate = "3.10.15"},
{os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.12.1", py_alternate = "3.11.7"},
{os = "ubuntu2204", r_primary = "4.4.1", r_alternate = "4.3.3", py_primary = "3.12.6", py_alternate = "3.11.10"},
]
Expand Down Expand Up @@ -191,7 +192,7 @@ variable WORKBENCH_GOOGLE_CLOUD_WORKSTATION_BUILD_MATRIX {
variable WORKBENCH_MICROSOFT_AZURE_ML_BUILD_MATRIX {
default = {
builds = [
{os = "ubuntu2204", r_primary = "4.4.1", r_alternate = "4.3.3", py_primary = "3.12.6", py_alternate = "3.11.10"},
{os = "ubuntu2204", r_primary = "4.4.1", r_alternate = "4.3.3", py_primary = "3.11.10", py_alternate = "3.10.15"},
]
}
}
Expand Down
26 changes: 26 additions & 0 deletions docker-bake.preview.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,14 @@ variable WORKBENCH_BUILD_MATRIX {
}
}

variable WORKBENCH_SESSION_INIT_BUILD_MATRIX {
default = {
builds = [
{os = "ubuntu2204"},
]
}
}

### Group definitions ###
group "default" {
targets = [
Expand All @@ -175,6 +183,7 @@ group "default" {
"r-session-complete-daily",
"workbench-preview",
"workbench-daily",
"workbench-session-init-daily",
]
}

Expand Down Expand Up @@ -450,3 +459,20 @@ target "workbench-preview" {
RSW_DOWNLOAD_URL = get_rsw_download_url(builds.os)
}
}

target "workbench-session-init-daily" {
inherits = ["base"]
target = "build"

name = "workbench-session-init-daily-${builds.os}-${replace(tag_safe_version(WORKBENCH_DAILY_VERSION), ".", "-")}"
tags = get_tags(builds.os, "workbench-session-init-preview", WORKBENCH_DAILY_VERSION, "daily")

dockerfile = "Dockerfile.${builds.os}"
context = "workbench-session-init"

matrix = WORKBENCH_SESSION_INIT_BUILD_MATRIX

args = {
RSW_VERSION = WORKBENCH_DAILY_VERSION
}
}
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=2024.09.0+375.pro3
RSW_VERSION=2024.09.1+394.pro7
DRIVERS_VERSION=2024.03.0-1
2 changes: 1 addition & 1 deletion r-session-complete/Dockerfile.ubuntu2204
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ARG R_VERSION_ALT=4.3.3
ARG PYTHON_VERSION=3.9.17
ARG PYTHON_VERSION_ALT=3.8.17
ARG JUPYTERLAB_VERSION=3.6.5
ARG RSW_VERSION=2024.09.0+375.pro3
ARG RSW_VERSION=2024.09.1+394.pro7
ARG RSW_NAME=rstudio-workbench
ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64
ARG SCRIPTS_DIR=/opt/positscripts
Expand Down
2 changes: 1 addition & 1 deletion r-session-complete/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

# Supported tags and respective Dockerfile links

* [`jammy`, `ubuntu2204`, `jammy-2024.09.0`, `ubuntu2204-2024.09.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/r-session-complete/Dockerfile.ubuntu2204)
* [`jammy`, `ubuntu2204`, `jammy-2024.09.1`, `ubuntu2204-2024.09.1`](https://github.com/rstudio/rstudio-docker-products/blob/main/r-session-complete/Dockerfile.ubuntu2204)

# What are the r-session-complete images?

Expand Down
2 changes: 2 additions & 0 deletions r-session-complete/positron.extensions.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
posit.shiny
posit.publisher
1 change: 1 addition & 0 deletions tools/dockerhub_clean.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"rstudio-workbench",
"rstudio-workbench-for-microsoft-azure-ml",
"rstudio-workbench-preview",
"workbench-session-init-preview",
]


Expand Down
2 changes: 1 addition & 1 deletion tools/get-version.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def clean_product_selection(product: str) -> str:


def rstudio_workbench_daily():
version_json = download_json("https://dailies.rstudio.com/rstudio/cranberry-hibiscus/index.json")
version_json = download_json("https://dailies.rstudio.com/rstudio/kousa-dogwood/index.json")
return version_json['workbench']['platforms']['jammy-amd64']['version']


Expand Down
4 changes: 2 additions & 2 deletions workbench-for-google-cloud-workstations/.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
RSW_VERSION=2024.09.0+375.pro3
RSW_TAG_VERSION=2024.09.0-375.pro3
RSW_VERSION=2024.09.1+394.pro7
RSW_TAG_VERSION=2024.09.1-394.pro7
RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64
RSW_NAME=rstudio-workbench
PYTHON_VERSION=3.11.9
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ARG PYTHON_VERSION_ALT=3.10.14
ARG PYTHON_VERSION_JUPYTER=3.10.14
ARG JUPYTERLAB_VERSION=3.6.7
ARG DRIVERS_VERSION=2023.05.0
ARG RSW_VERSION=2024.09.0+375.pro3
ARG RSW_VERSION=2024.09.1+394.pro7
ARG RSW_NAME=rstudio-workbench
ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64
ARG SCRIPTS_DIR=/opt/positscripts
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"terminal.integrated.defaultProfile.linux": "bash",
"extensions.autoUpdate": false,
"extensions.autoCheckUpdates": false,
"quarto.path": "/usr/lib/rstudio-server/bin/quarto/bin/quarto"
}
2 changes: 2 additions & 0 deletions workbench-for-google-cloud-workstations/conf/positron.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
enabled=1
exe=/usr/lib/rstudio-server/bin/positron-server/bin/positron-server
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
posit.shiny
posit.publisher
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"terminal.integrated.shell.linux": "/bin/bash",
"terminal.integrated.defaultProfile.linux": "bash",
"extensions.autoUpdate": false,
"extensions.autoCheckUpdates": false
}
2 changes: 1 addition & 1 deletion workbench-for-microsoft-azure-ml/.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
RSW_VERSION=2024.09.0+375.pro3
RSW_VERSION=2024.09.1+394.pro7
RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/bionic/amd64
RSW_NAME=rstudio-workbench
PYTHON_VERSION=3.9.14
Expand Down
8 changes: 5 additions & 3 deletions workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ARG PYTHON_VERSION=3.9.17
ARG PYTHON_VERSION_ALT=3.8.17
ARG PYTHON_VERSION_JUPYTER=3.8.17
ARG JUPYTERLAB_VERSION=3.6.7
ARG RSW_VERSION=2024.09.0+375.pro3
ARG RSW_VERSION=2024.09.1+394.pro7
ARG RSW_NAME=rstudio-workbench
ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64
ARG SCRIPTS_DIR=/opt/positscripts
Expand Down Expand Up @@ -103,8 +103,10 @@ RUN /opt/python/"${PYTHON_VERSION_JUPYTER}"/bin/python -m venv /opt/python/jupyt

### Install basic data science packages for Python and R ###
COPY deps/* /
RUN /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install -r /tmp/py_packages.txt \
RUN /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install -U pip setuptools wheel \
&& /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install -r /tmp/py_packages.txt \
&& /opt/python/${PYTHON_VERSION}/bin/python3 -m pip cache purge \
&& /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install -U pip setuptools wheel \
&& /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install -r /tmp/py_packages.txt \
&& /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip cache purge \
&& rm /tmp/py_packages.txt
Expand Down Expand Up @@ -176,5 +178,5 @@ LABEL \
azure.ii.endpoints='[{"label":"connect","target":8787,"protocol":"http"}]' \
org.opencontainers.image.description='A professional integrated development environment for data science teams using R and Python' \
org.opencontainers.image.title='RStudio Workbench' \
org.opencontainers.image.version='2024.09.0+375.pro3' \
org.opencontainers.image.version='2024.09.1+394.pro7' \
org.opencontainers.image.url='https://www.rstudio.com/products/workbench/'
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"terminal.integrated.defaultProfile.linux": "bash",
"extensions.autoUpdate": false,
"extensions.autoCheckUpdates": false,
"quarto.path": "/usr/lib/rstudio-server/bin/quarto/bin/quarto"
}
2 changes: 2 additions & 0 deletions workbench-for-microsoft-azure-ml/conf/positron.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
enabled=1
exe=/usr/lib/rstudio-server/bin/positron-server/bin/positron-server
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
posit.shiny
posit.publisher
Loading

0 comments on commit 48f5432

Please sign in to comment.