From b53c0bc7a434bce5d72d8bef54405cf0188047a7 Mon Sep 17 00:00:00 2001 From: Neal Richardson Date: Mon, 30 Oct 2023 09:32:21 -0400 Subject: [PATCH 001/165] Update language in connect readme to say Posit --- connect/README.md | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/connect/README.md b/connect/README.md index 6b847f85c..ccc7e44c6 100644 --- a/connect/README.md +++ b/connect/README.md @@ -2,16 +2,16 @@ * Maintained by: [the Posit Docker team](https://github.com/rstudio/rstudio-docker-products) * Where to get help: [our Github Issues page](https://github.com/rstudio/rstudio-docker-products/issues) -* RStudio Connect image: [Docker Hub](https://hub.docker.com/r/rstudio/rstudio-connect) -* RStudio Connect Content Init image: [Docker Hub](https://hub.docker.com/r/rstudio/rstudio-connect-content-init) +* Posit Connect image: [Docker Hub](https://hub.docker.com/r/rstudio/rstudio-connect) +* Posit Connect Content Init image: [Docker Hub](https://hub.docker.com/r/rstudio/rstudio-connect-content-init) # Supported tags and respective Dockerfile links * [`jammy`, `ubuntu2204`, `jammy-2023.09.0`, `ubuntu2204-2023.09.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) -# What is RStudio Connect? +# What is Posit Connect? -RStudio Connect connects you and the work you do with others as never before. Only RStudio Connect provides: +Posit Connect connects you and the work you do with others as never before. Only Posit Connect provides: * "One button" deployment into a single environment for Shiny applications, R Markdown documents, Plumber APIs, Python Jupyter notebooks, Quarto documents and projects, or any static R plot or graph. @@ -21,8 +21,8 @@ RStudio Connect connects you and the work you do with others as never before. On with you. * "Hands free" scheduling of updates to your documents and automatic email distribution. -For more information on running RStudio Connect in your organization please visit -https://www.rstudio.com/products/connect/. +For more information on running Posit Connect in your organization please visit +https://posit.co/products/enterprise/connect/. # Notice for support @@ -57,8 +57,8 @@ Once running, open [http://localhost:3939](http://localhost:3939) to access RStu ## Overview This Docker container is built following -the [RStudio Connect admin guide](https://docs.rstudio.com/connect/admin/index.html), please -see [Server Guide/Docker](https://docs.rstudio.com/connect/admin/server-management/#docker) for more details on the +the [Posit Connect admin guide](https://docs.posit.co/connect/admin/index.html), please +see [Server Guide/Docker](https://docs.posit.co/connect/admin/server-management/#docker) for more details on the requirements and how to extend this image. This container includes: @@ -66,19 +66,19 @@ This container includes: 1. Two versions of R 2. Two versions of Python 3. Posit Professional Drivers -4. RStudio Connect +4. Posit Connect -Note that running the RStudio Connect Docker image requires the container to run using the `--privileged` flag and a -valid RStudio Connect license. +Note that running the Posit Connect Docker image requires the container to run using the `--privileged` flag and a +valid Posit Connect license. -> IMPORTANT: to use RStudio Connect with more than one user, you will need to +> IMPORTANT: to use Posit Connect with more than one user, you will need to > define `Server.Address` in the `rstudio-connect.gcfg` file. To do so, update > your configuration file with the URL that users will use to visit Connect. > Then start or restart the container. ## Configuration -The configuration of RStudio Connect is made on the `/etc/rstudio-connect/rstudio-connect.gcfg` file, mount this file as +The configuration of Posit Connect is made on the `/etc/rstudio-connect/rstudio-connect.gcfg` file, mount this file as volume with an external file on the host machine to change the configuration and restart the container for changes to take effect. @@ -103,11 +103,11 @@ orchestration system to be available at `/data`. Should you wish to move this to ### Licensing -Using the RStudio Connect docker image requires to have a valid License. You can set the RSC license in three ways: +Using the Posit Connect docker image requires to have a valid License. You can set the license in three ways: 1. Setting the `RSC_LICENSE` environment variable to a valid license key inside the container 2. Setting the `RSC_LICENSE_SERVER` environment variable to a valid license server / port inside the container -3. Mounting a `/etc/rstudio-connect/license.lic` single file that contains a valid license for RStudio Connect +3. Mounting a `/etc/rstudio-connect/license.lic` single file that contains a valid license for Posit Connect **NOTE:** the "offline activation process" is not supported by this image today. Offline installations will need to explore using a license server, license file, or custom image with manual intervention. @@ -116,14 +116,14 @@ to explore using a license server, license file, or custom image with manual int | Variable | Description | Default | |-----|---|---| -| `RSC_LICENSE` | License key for RStudio Connect, format should be: `XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX` | None | +| `RSC_LICENSE` | License key for Posit Connect, format should be: `XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX` | None | | `RSC_LICENSE_SERVER` | Floating license server, format should be: `my.url.com:port` | None | ### Ports | Variable | Description | |-----|---| -| `3939` | Default HTTP Port for RStudio Connect | +| `3939` | Default HTTP Port for Posit Connect | ### Example usage @@ -147,7 +147,7 @@ docker run -it --privileged \ rstudio/rstudio-connect:ubuntu2204 ``` -Open [http://localhost:3939](http://localhost:3939) to access RStudio Connect. +Open [http://localhost:3939](http://localhost:3939) to access Posit Connect. ## Caveats of product licensing in containers @@ -187,7 +187,7 @@ While neither of these solutions will eliminate the problem, they should help mi long-term solution. # Licensing -The license associated with the RStudio Docker Products repository is located +The license associated with the Posit Docker Products repository is located [in LICENSE.md](https://github.com/rstudio/rstudio-docker-products/blob/main/LICENSE.md). As is the case with all container images, the images themselves also contain other software which may be under other From 4231a43127f02df83a04e266fce847868c9bc707 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Wed, 8 Nov 2023 14:06:18 -0800 Subject: [PATCH 002/165] Updates for Workbench 2022.07.4 backwards compatibility (#658) * Add backwards compatibility for VS Code installation in RSW versions <=2022.07 * Add option to force using S3 for binary downloads (workbench) * Fix default tags in workbench/justfile Use shared get rsw download url target --- .github/workflows/build-manual.yaml | 10 ++++++++++ ci.Justfile | 6 +++++- workbench/Dockerfile.ubuntu2204 | 4 ++++ workbench/Justfile | 12 +++++------- workbench/maybe_install_vs_code.sh | 13 +++++++++++++ workbench/test/goss.yaml | 6 ++++++ 6 files changed, 43 insertions(+), 8 deletions(-) create mode 100755 workbench/maybe_install_vs_code.sh diff --git a/.github/workflows/build-manual.yaml b/.github/workflows/build-manual.yaml index 5525f6778..e22dbb7dd 100644 --- a/.github/workflows/build-manual.yaml +++ b/.github/workflows/build-manual.yaml @@ -42,6 +42,11 @@ on: - preview - daily - release + use_s3_download_url: + description: "Force build to download binaries directly from S3 where applicable." + required: false + default: false + type: boolean version: description: "The version to build. Use 'auto' to target the latest build." required: false @@ -89,8 +94,12 @@ jobs: run: | EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) ARGS_CMD="" + USE_S3_DOWNLOAD_URL="" if [[ "${{ inputs.type }}" == "release" ]]; then ARGS_CMD="get-product-args" + if [[ "${{ inputs.use_s3_download_url }}" == "true" ]]; then + USE_S3_DOWNLOAD_URL="${{ inputs.use_s3_download_url }}" + fi else ARGS_CMD="get-prerelease-args ${{inputs.type}}" fi @@ -100,6 +109,7 @@ jobs: ${{ inputs.product }} \ ${{ inputs.os }} \ ${{ steps.get-version.outputs.VERSION }} \ + ${USE_S3_DOWNLOAD_URL} \ ) echo "BUILD_ARGS<<$EOF" >> $GITHUB_OUTPUT echo "$BUILD_ARGS" >> $GITHUB_OUTPUT diff --git a/ci.Justfile b/ci.Justfile index e6906ab77..68bc739bf 100644 --- a/ci.Justfile +++ b/ci.Justfile @@ -109,10 +109,14 @@ get-base-tags $OS $TYPE="base" $BRANCH=`git branch --show`: ghcr.io/rstudio/${IMAGE_NAME}:${OS} # just get-product-args connect ubuntu2204 2023.05.0 -get-product-args $PRODUCT $OS $VERSION $BRANCH=`git branch --show` $SHA_SHORT=`git rev-parse --short HEAD`: +get-product-args $PRODUCT $OS $VERSION $USE_S3="false" $BRANCH=`git branch --show` $SHA_SHORT=`git rev-parse --short HEAD`: #!/usr/bin/env bash set -euxo pipefail + RSW_DOWNLOAD_URL=$(just -f ci.Justfile _get-rsw-download-url release $OS) + if [[ "${USE_S3}" == "true" ]]; then + 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 SHORT_NAME="RSW" diff --git a/workbench/Dockerfile.ubuntu2204 b/workbench/Dockerfile.ubuntu2204 index 5446fdb10..419177cff 100644 --- a/workbench/Dockerfile.ubuntu2204 +++ b/workbench/Dockerfile.ubuntu2204 @@ -67,6 +67,10 @@ RUN apt-get update \ && rm -rf /var/lib/rstudio-server/r-versions \ && rm -rf /var/lib/rstudio-launcher/Local/jobs/buildkitsandbox +COPY maybe_install_vs_code.sh /tmp/maybe_install_vs_code.sh +RUN /tmp/maybe_install_vs_code.sh \ + && rm /tmp/maybe_install_vs_code.sh + COPY --chmod=0775 startup.sh /usr/local/bin/startup.sh COPY startup-launcher/* /startup/launcher/ COPY startup-user-provisioning/* /startup/user-provisioning/ diff --git a/workbench/Justfile b/workbench/Justfile index 392f823fe..415dff00c 100644 --- a/workbench/Justfile +++ b/workbench/Justfile @@ -7,6 +7,7 @@ PRODUCT := "workbench" IMAGE_OS := "ubuntu2204" RSW_VERSION := "2023.09.1+494.pro2" +RSW_RELEASE_TYPE := "release" RSW_LICENSE := "" RSW_LICENSE_SERVER := "" @@ -19,11 +20,8 @@ PYTHON_VERSION_ALT := "3.8.17" PERSIST_LICENSE := "false" PERSIST_LICENSE_DIR := join(justfile_directory(), "tmp-lic") -_get-download-url OS=IMAGE_OS: - echo "https://download2.rstudio.org/server/$(just -f ../Justfile _rev-parse-os {{OS}})/amd64" - -_make-default-tag OS=IMAGE_OS: - echo "{{IMAGE_PREFIX}}{{PRODUCT}}:{{OS}}-$(just -f ../Justfile _get-tag-safe-version {{RSW_VERSION}})" +_make-default-tag OS=IMAGE_OS VERSION=RSW_VERSION: + echo "{{IMAGE_PREFIX}}{{PRODUCT}}:{{OS}}-$(just -f ../Justfile _get-tag-safe-version {{VERSION}})" # Build Workbench image - just build ubuntu2204 2022.07.2+576.pro12 rstudio/rstudio-workbench:ubuntu2204-2022.07.2-576.pro12 build OS=IMAGE_OS VERSION=RSW_VERSION *TAGS="": @@ -35,7 +33,7 @@ build OS=IMAGE_OS VERSION=RSW_VERSION *TAGS="": fi if [[ "{{TAGS}}" == "" ]]; then - raw_tag_array=($(just _make-default-tag {{OS}})) + raw_tag_array=($(just _make-default-tag {{OS}} {{VERSION}})) else raw_tag_array=("{{TAGS}}") fi @@ -53,7 +51,7 @@ build OS=IMAGE_OS VERSION=RSW_VERSION *TAGS="": --build-arg R_VERSION_ALT="{{ R_VERSION_ALT }}" \ --build-arg PYTHON_VERSION="{{ PYTHON_VERSION }}" \ --build-arg PYTHON_VERSION_ALT="{{ PYTHON_VERSION_ALT }}" \ - --build-arg RSW_DOWNLOAD_URL="$(just _get-download-url {{OS}})" \ + --build-arg RSW_DOWNLOAD_URL="$(just -f ../ci.Justfile _get-rsw-download-url {{RSW_RELEASE_TYPE}} {{OS}})" \ --file=./Dockerfile.$(just -f ../Justfile _parse-os {{OS}}) . # Test Workbench image - just test rstudio/rstudio-workbench:ubuntu2204-2022.07.2-576.pro12 2022.07.2+576.pro12 diff --git a/workbench/maybe_install_vs_code.sh b/workbench/maybe_install_vs_code.sh new file mode 100755 index 000000000..949f744f7 --- /dev/null +++ b/workbench/maybe_install_vs_code.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -ex + +major=$(echo ${RSW_VERSION} | cut -d. -f1) +minor=$(echo ${RSW_VERSION} | cut -d. -f2) +if [ ${major} -lt 2022 ] || [ ${major} -eq 2022 ] && [ ${minor} -lt 12 ]; then + echo "Installing VS Code" + rstudio-server install-vs-code /opt/code-server/ + ln -s /opt/code-server/bin/code-server /usr/local/bin/code-server +else + echo "VS Code is already installed" +fi diff --git a/workbench/test/goss.yaml b/workbench/test/goss.yaml index eb8fa5d78..0a9a78c70 100644 --- a/workbench/test/goss.yaml +++ b/workbench/test/goss.yaml @@ -69,8 +69,14 @@ file: exists: true owner: rstudio-server group: rstudio-server + {{ $version_split := split "." .Env.RSW_VERSION }} + {{ if or (lt ($version_split._0 | atoi) 2022) (and (eq ($version_split._0 | atoi) 2022) (lt ($version_split._1 | atoi) 12)) }} + /opt/code-server/bin/code-server: + exists: true + {{ else }} /usr/lib/rstudio-server/bin/code-server/bin/code-server: exists: true + {{ end }} /var/lib/rstudio-launcher/Local/jobs/buildkitsandbox: exists: false /etc/rstudio/vscode.conf: From a801a937d308aceeb451990900ead7eb335d7f76 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Wed, 8 Nov 2023 15:28:30 -0800 Subject: [PATCH 003/165] Add backwards compatibility script for 2022.07.4 to r-session-complete (#660) * Add backwards compatibility script for 2022.07.4 to r-session-complete * Update Goss version --- r-session-complete/Dockerfile.ubuntu2204 | 4 ++++ r-session-complete/maybe_install_vs_code.sh | 13 +++++++++++++ r-session-complete/test/goss.yaml | 9 +++++++-- r-session-complete/test/run_tests.sh | 2 +- 4 files changed, 25 insertions(+), 3 deletions(-) create mode 100755 r-session-complete/maybe_install_vs_code.sh diff --git a/r-session-complete/Dockerfile.ubuntu2204 b/r-session-complete/Dockerfile.ubuntu2204 index e992844b0..9809f2bed 100644 --- a/r-session-complete/Dockerfile.ubuntu2204 +++ b/r-session-complete/Dockerfile.ubuntu2204 @@ -43,6 +43,10 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/rstudio-server/r-versions +COPY maybe_install_vs_code.sh /tmp/maybe_install_vs_code.sh +RUN /tmp/maybe_install_vs_code.sh \ + && rm /tmp/maybe_install_vs_code.sh + RUN /opt/python/"${PYTHON_VERSION}"/bin/pip install \ jupyter \ jupyterlab=="${JUPYTERLAB_VERSION}" \ diff --git a/r-session-complete/maybe_install_vs_code.sh b/r-session-complete/maybe_install_vs_code.sh new file mode 100755 index 000000000..949f744f7 --- /dev/null +++ b/r-session-complete/maybe_install_vs_code.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -ex + +major=$(echo ${RSW_VERSION} | cut -d. -f1) +minor=$(echo ${RSW_VERSION} | cut -d. -f2) +if [ ${major} -lt 2022 ] || [ ${major} -eq 2022 ] && [ ${minor} -lt 12 ]; then + echo "Installing VS Code" + rstudio-server install-vs-code /opt/code-server/ + ln -s /opt/code-server/bin/code-server /usr/local/bin/code-server +else + echo "VS Code is already installed" +fi diff --git a/r-session-complete/test/goss.yaml b/r-session-complete/test/goss.yaml index d92f983a1..94637931e 100644 --- a/r-session-complete/test/goss.yaml +++ b/r-session-complete/test/goss.yaml @@ -5,9 +5,14 @@ file: exists: true /usr/local/bin/jupyter: exists: true - /usr/lib/rstudio-server/bin/code-server: + {{ $version_split := split "." .Env.RSW_VERSION }} + {{ if or (lt ($version_split._0 | atoi) 2022) (and (eq ($version_split._0 | atoi) 2022) (lt ($version_split._1 | atoi) 12)) }} + /opt/code-server/bin/code-server: exists: true - filetype: directory + {{ else }} + /usr/lib/rstudio-server/bin/code-server/bin/code-server: + exists: true + {{ end }} /opt/rstudio-drivers: exists: true filetype: directory diff --git a/r-session-complete/test/run_tests.sh b/r-session-complete/test/run_tests.sh index 0aefb5d8a..16568e9c0 100755 --- a/r-session-complete/test/run_tests.sh +++ b/r-session-complete/test/run_tests.sh @@ -3,7 +3,7 @@ # install goss GOSS_FILE=${GOSS_FILE:-/tmp/goss.yaml} -GOSS_VERSION=${GOSS_VERSION:-0.3.8} +GOSS_VERSION=${GOSS_VERSION:-0.3.16} GOSS_MAX_CONCURRENT=${GOSS_MAX_CONCURRENT:-50} # default to empty var file (since vars are not necessary) From ac51353a7a705cf76a93cd8bd00ce2c65b0a6275 Mon Sep 17 00:00:00 2001 From: Melissa Barca Date: Fri, 3 Nov 2023 13:16:04 -0400 Subject: [PATCH 004/165] update daily workbench branch --- tools/get-version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/get-version.py b/tools/get-version.py index 188057fee..a6a8652f0 100755 --- a/tools/get-version.py +++ b/tools/get-version.py @@ -97,7 +97,7 @@ def clean_product_selection(product: str) -> str: def rstudio_workbench_daily(): - version_json = download_json("https://dailies.rstudio.com/rstudio/desert-sunflower/index.json") + version_json = download_json("https://dailies.rstudio.com/rstudio/ocean-storm/index.json") return version_json['workbench']['platforms']['jammy-amd64']['version'] From 12ffdc6c54437ac74620a27ce2cf27c93f18930b Mon Sep 17 00:00:00 2001 From: Jerred Shepherd Date: Thu, 9 Nov 2023 10:29:38 -0800 Subject: [PATCH 005/165] add Python to Package Manager images --- .github/workflows/build-prerelease.yaml | 1 - .github/workflows/build-release.yaml | 3 +- .github/workflows/lint.yaml | 1 - ci.Justfile | 12 ++++ docker-compose.yml | 2 +- hadolint.yaml | 2 + matrix-preview.json | 2 +- package-manager/.env | 2 + package-manager/Dockerfile.ubuntu1804 | 94 ------------------------- package-manager/Dockerfile.ubuntu2204 | 59 ++++------------ package-manager/Justfile | 4 ++ package-manager/NEWS.md | 5 ++ package-manager/README.md | 12 ++-- package-manager/docker-compose.test.yml | 2 + package-manager/test/goss.yaml | 21 +++++- 15 files changed, 68 insertions(+), 154 deletions(-) delete mode 100644 package-manager/Dockerfile.ubuntu1804 diff --git a/.github/workflows/build-prerelease.yaml b/.github/workflows/build-prerelease.yaml index fed12d32e..ef895605d 100644 --- a/.github/workflows/build-prerelease.yaml +++ b/.github/workflows/build-prerelease.yaml @@ -30,7 +30,6 @@ jobs: - {product: "workbench", type: "preview", os: "ubuntu2204", r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"} - {product: "connect", type: "daily", os: "ubuntu2204", r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"} - {product: "connect-content-init", type: "daily", os: "ubuntu2204", r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"} - - {product: "package-manager", type: "daily", os: "ubuntu1804", r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"} - {product: "package-manager", type: "daily", os: "ubuntu2204", r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"} - {product: "r-session-complete", type: "daily", os: "ubuntu2204", r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"} - {product: "r-session-complete", type: "daily", os: 'centos7', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.14", py-alternate: "3.8.15"} diff --git a/.github/workflows/build-release.yaml b/.github/workflows/build-release.yaml index d48dbc990..7146c69ba 100644 --- a/.github/workflows/build-release.yaml +++ b/.github/workflows/build-release.yaml @@ -248,8 +248,7 @@ jobs: - {product: 'workbench', os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.14", py-alternate: "3.8.15"} - {product: 'connect', os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"} - {product: 'connect-content-init', os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"} - - {product: 'package-manager', os: 'ubuntu1804', r-primary: "4.2.0", r-alternate: "3.6.2", py-primary: "3.9.5", py-alternate: "3.8.10"} - - {product: 'package-manager', os: 'ubuntu2204', r-primary: "4.2.0", r-alternate: "3.6.2", py-primary: "3.9.5", py-alternate: "3.8.10"} + - {product: 'package-manager', os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"} - {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"} diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 7877099c8..c00fa3ff8 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -23,7 +23,6 @@ jobs: - {product: 'workbench', os: 'ubuntu2204'} - {product: 'connect', os: 'ubuntu2204'} - {product: 'connect-content-init', os: 'ubuntu2204'} - - {product: 'package-manager', os: 'ubuntu1804'} - {product: 'package-manager', os: 'ubuntu2204'} - {product: 'r-session-complete', os: 'centos7'} - {product: 'r-session-complete', os: 'ubuntu2204'} diff --git a/ci.Justfile b/ci.Justfile index 68bc739bf..ebcbdd3b2 100644 --- a/ci.Justfile +++ b/ci.Justfile @@ -134,6 +134,12 @@ get-product-args $PRODUCT $OS $VERSION $USE_S3="false" $BRANCH=`git branch --sho else SRC_IMAGE_NAME="product-base-pro-dev" fi + elif [[ $PRODUCT == "package-manager" ]]; then + if [[ $BRANCH == "main" ]]; then + SRC_IMAGE_NAME="product-base" + else + SRC_IMAGE_NAME="product-base-dev" + fi fi if [[ "${OS}" == "centos7" ]]; then @@ -217,6 +223,12 @@ get-prerelease-args $TYPE $PRODUCT $OS $VERSION $BRANCH=`git branch --show`: else SRC_IMAGE_NAME="product-base-pro-dev" fi + elif [[ $PRODUCT == "package-manager" ]]; then + if [[ $BRANCH == "main" ]]; then + SRC_IMAGE_NAME="product-base" + else + SRC_IMAGE_NAME="product-base-dev" + fi fi if [[ "${OS}" == "centos7" ]]; then diff --git a/docker-compose.yml b/docker-compose.yml index 2a8098ebb..398dfc6f0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -41,7 +41,7 @@ services: container_name: rstudio-package-manager build: context: ./package-manager - dockerfile: "Dockerfile.${IMAGE_OS:-ubuntu1804}" + dockerfile: "Dockerfile.${IMAGE_OS:-ubuntu2204}" args: RSPM_VERSION: 2023.08.4-20 image: rstudio/rstudio-package-manager:2023.08.4 diff --git a/hadolint.yaml b/hadolint.yaml index 10066a69a..bf071e06c 100644 --- a/hadolint.yaml +++ b/hadolint.yaml @@ -4,6 +4,8 @@ ignored: - DL3008 # Suppresses warning for version pinning on yum installs. We currently do not practice this approach. - DL3033 + # Suppresses warning for version pinning on pip installs. We currently do not practice this approach. + - DL3013 # Suppresses info for too many consecutive RUN statements. Multiple consecutive RUN statements are often a conscious # design choice in our Dockerfiles, but we could consider condensing them in the future. - DL3059 diff --git a/matrix-preview.json b/matrix-preview.json index a639fa92a..a1040b6e4 100644 --- a/matrix-preview.json +++ b/matrix-preview.json @@ -3,7 +3,7 @@ {"product": "rstudio-workbench-preview", "dir": "workbench", "prefix": "RSW", "os": "bionic", "arch": "amd64", "version": "preview"}, {"product": "rstudio-connect-preview", "dir": "connect", "prefix": "RSC", "os": "bionic", "arch": "amd64", "version": "daily"}, {"product": "rstudio-connect-content-init-preview", "dir": "connect-content-init", "prefix": "RSC", "os": "bionic", "arch": "amd64", "version": "daily"}, - {"product": "rstudio-package-manager-preview", "dir": "package-manager", "prefix": "RSPM", "os": "bionic", "arch": "amd64", "version": "daily"}, + {"product": "rstudio-package-manager-preview", "dir": "package-manager", "prefix": "RSPM", "os": "jammy", "arch": "amd64", "version": "daily"}, {"product": "r-session-complete-preview", "tag_prefix": "bionic-", "dir": "r-session-complete", "os": "bionic", "arch": "amd64", "prefix": "RSW", "version": "daily"}, {"product": "r-session-complete-preview", "tag_prefix": "centos7-", "dir": "r-session-complete", "os": "centos7", "arch": "x86_64", "prefix": "RSW", "version": "daily"}, {"product": "r-session-complete-preview", "tag_prefix": "bionic-", "dir": "r-session-complete", "os": "bionic", "arch": "amd64", "prefix": "RSW", "version": "preview"}, diff --git a/package-manager/.env b/package-manager/.env index 0cd44ebc1..b41ed04fb 100644 --- a/package-manager/.env +++ b/package-manager/.env @@ -1,3 +1,5 @@ RSPM_VERSION=2023.08.4-20 R_VERSION=4.2.3 R_VERSION_ALT=4.1.3 +PYTHON_VERSION=3.9.17 +PYTHON_VERSION_ALT=3.8.17 diff --git a/package-manager/Dockerfile.ubuntu1804 b/package-manager/Dockerfile.ubuntu1804 deleted file mode 100644 index 448c3f80c..000000000 --- a/package-manager/Dockerfile.ubuntu1804 +++ /dev/null @@ -1,94 +0,0 @@ -ARG R_VERSION=4.2.3 -FROM rstudio/r-base:${R_VERSION}-bionic -LABEL maintainer="RStudio Docker " - -ARG R_VERSION=4.2.3 - -# Locale configuration --------------------------------------------------------# -RUN localedef -i en_US -f UTF-8 en_US.UTF-8 -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 -ENV STARTUP_DEBUG_MODE 0 -ARG DEBIAN_FRONTEND=noninteractive -ARG TINI_VERSION=0.19.0 - -ENV PATH /opt/rstudio-pm/bin:$PATH - -# Upgrade/install packages ----------------------------------------------------# -RUN apt-get update --fix-missing \ - && apt-get upgrade -yq \ - && apt-get install -yq --no-install-recommends \ - ca-certificates \ - curl \ - dirmngr \ - gpg \ - gpg-agent \ - && rm -rf /var/lib/apt/lists/* - -# Runtime settings ------------------------------------------------------------# -ADD https://cdn.rstudio.com/platform/tini/v${TINI_VERSION}/tini-amd64 /tini -ADD https://cdn.rstudio.com/platform/tini/v${TINI_VERSION}/tini-amd64.asc /tini.asc -# Keys must be pulled using curl, gpg calls intermittently fail on 18.04 with "gpg: keyserver receive failed: Cannot assign requested address" -RUN gpg --update-trustdb \ - && curl -sL -o /tmp/tini-key.asc "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x6380dc428747f6c393feaca59a84159d7001a4e5" \ - && gpg --import /tmp/tini-key.asc \ - && rm /tmp/tini-key.asc \ - && gpg --batch --verify /tini.asc /tini \ - && chmod +x /tini \ - && ln -s /tini /usr/local/bin/tini - -# Add another R version -------------------------------------------------------# -ARG R_VERSION_ALT=4.1.3 -RUN apt-get update -qq && \ - curl -O https://cdn.rstudio.com/r/ubuntu-1804/pkgs/r-${R_VERSION_ALT}_1_amd64.deb && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y ./r-${R_VERSION_ALT}_1_amd64.deb && \ - rm -f ./r-${R_VERSION_ALT}_1_amd64.deb \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -# Download RStudio Package Manager ---------------------------------------------# -ARG RSPM_VERSION=2023.08.4-20 -ARG RSPM_DOWNLOAD_URL=https://cdn.rstudio.com/package-manager/deb/amd64 -# Keys must be pulled using curl, gpg calls intermittently fail on 18.04 with "gpg: keyserver receive failed: Cannot assign requested address" -RUN apt-get update --fix-missing \ - && apt-get install -y --no-install-recommends gdebi-core gpg dpkg-sig \ - && curl -O ${RSPM_DOWNLOAD_URL}/rstudio-pm_${RSPM_VERSION}_amd64.deb \ - # Pre 7/25/23 packages - && curl -sL -o /tmp/rstudio-key.asc "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xfe8564cff1ab93f1728645193f32ee77e331692f" \ - && gpg --import /tmp/rstudio-key.asc \ - && rm /tmp/rstudio-key.asc \ - # Post 7/25 packages - && curl -sL -o /tmp/posit-key.asc "https://keys.openpgp.org/vks/v1/by-fingerprint/8B65E5A107BBEFE3BA99C59751C0B5BB19F92D60" \ - && gpg --import /tmp/posit-key.asc \ - && rm /tmp/posit-key.asc \ - && dpkg-sig --verify rstudio-pm_${RSPM_VERSION}_amd64.deb \ - && RSTUDIO_INSTALL_NO_LICENSE_INITIALIZATION=1 gdebi -n rstudio-pm_${RSPM_VERSION}_amd64.deb \ - && rm rstudio-pm_${RSPM_VERSION}_amd64.deb \ - && apt-get purge -y gdebi-core dpkg-sig gpg gpg-agent \ - && apt-get autoremove -y \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* \ - && (ln -s /opt/rstudio-pm/bin/rspm /usr/local/bin/rspm || echo "/usr/local/bin/rspm symlink already exists") - -# Set default R version symlink -RUN ln -s /opt/R/${R_VERSION} /opt/R/default - -# Add run script and set permissions -------------------------------------------# -COPY --chmod=0775 startup.sh /usr/local/bin/startup.sh -RUN mkdir -p /var/run/rstudio-pm \ - && chmod +x /usr/local/bin/startup.sh \ - && chown rstudio-pm:rstudio-pm /usr/local/bin/startup.sh \ - && chown -R rstudio-pm:rstudio-pm /var/run/rstudio-pm - -USER rstudio-pm -COPY rstudio-pm.gcfg /etc/rstudio-pm/rstudio-pm.gcfg - -# Set up licensing to work in userspace mode. This will not prevent activating a -# license as root, but it is required to activate one as the non-root user at -# runtime. It's possible for this to fail and the trail will be considered over, -# in which case we can ignore it anyway. -RUN license-manager initialize --userspace || true - -ENTRYPOINT ["tini", "--"] -CMD ["/usr/local/bin/startup.sh"] diff --git a/package-manager/Dockerfile.ubuntu2204 b/package-manager/Dockerfile.ubuntu2204 index a6fc4966c..75571e6df 100644 --- a/package-manager/Dockerfile.ubuntu2204 +++ b/package-manager/Dockerfile.ubuntu2204 @@ -1,70 +1,37 @@ ARG R_VERSION=4.2.3 -FROM rstudio/r-base:${R_VERSION}-jammy +ARG R_VERSION_ALT=4.1.3 +ARG PYTHON_VERSION=3.9.17 +ARG PYTHON_VERSION_ALT=3.8.17 +ARG SRC_IMAGE_NAME=product-base +ARG REGISTRY=ghcr.io +FROM ${REGISTRY}/rstudio/${SRC_IMAGE_NAME}:ubuntu2204-r${R_VERSION}_${R_VERSION_ALT}-py${PYTHON_VERSION}_${PYTHON_VERSION_ALT} LABEL maintainer="RStudio Docker " -ARG R_VERSION=4.2.3 +ARG PYTHON_VERSION=3.9.17 +ARG PYTHON_VERSION_ALT=3.8.17 # Locale configuration --------------------------------------------------------# -RUN localedef -i en_US -f UTF-8 en_US.UTF-8 -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 ENV STARTUP_DEBUG_MODE 0 -ARG DEBIAN_FRONTEND=noninteractive -ARG TINI_VERSION=0.19.0 ENV PATH /opt/rstudio-pm/bin:$PATH -# Upgrade/install packages ----------------------------------------------------# -RUN apt-get update --fix-missing \ - && apt-get upgrade -yq \ - && apt-get install -yq --no-install-recommends \ - ca-certificates \ - dirmngr \ - gpg \ - gpg-agent \ - && rm -rf /var/lib/apt/lists/* - -# Runtime settings ------------------------------------------------------------# -ADD https://cdn.rstudio.com/platform/tini/v${TINI_VERSION}/tini-amd64 /tini -ADD https://cdn.rstudio.com/platform/tini/v${TINI_VERSION}/tini-amd64.asc /tini.asc -RUN gpg --update-trustdb \ - && gpg --batch --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 595E85A6B1B4779EA4DAAEC70B588DFF0527A9B7 \ - && gpg --batch --verify /tini.asc /tini \ - && chmod +x /tini \ - && ln -s /tini /usr/local/bin/tini - -# Add another R version -------------------------------------------------------# -ARG R_VERSION_ALT=4.1.3 -RUN apt-get update -qq && \ - curl -O https://cdn.rstudio.com/r/ubuntu-2204/pkgs/r-${R_VERSION_ALT}_1_amd64.deb && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y ./r-${R_VERSION_ALT}_1_amd64.deb && \ - rm -f ./r-${R_VERSION_ALT}_1_amd64.deb \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* +# Required Python packages ----------------------------------------------------# +RUN /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install --no-cache-dir build virtualenv +RUN /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install --no-cache-dir build virtualenv # Download RStudio Package Manager ---------------------------------------------# ARG RSPM_VERSION=2023.08.4-20 ARG RSPM_DOWNLOAD_URL=https://cdn.rstudio.com/package-manager/deb/amd64 -RUN apt-get update --fix-missing \ - && apt-get install -y --no-install-recommends ca-certificates gdebi-core gpg dpkg-sig \ - && curl -O ${RSPM_DOWNLOAD_URL}/rstudio-pm_${RSPM_VERSION}_amd64.deb \ +RUN curl -O ${RSPM_DOWNLOAD_URL}/rstudio-pm_${RSPM_VERSION}_amd64.deb \ # Pre 7/25/23 packages && gpg --keyserver keyserver.ubuntu.com --recv-keys 3F32EE77E331692F \ # Post 7/25 packages && gpg --keyserver keys.openpgp.org --recv-keys 51C0B5BB19F92D60 \ && dpkg-sig --verify rstudio-pm_${RSPM_VERSION}_amd64.deb \ - && RSTUDIO_INSTALL_NO_LICENSE_INITIALIZATION=1 gdebi -n rstudio-pm_${RSPM_VERSION}_amd64.deb \ + && RSTUDIO_INSTALL_NO_LICENSE_INITIALIZATION=1 apt-get install -y ./rstudio-pm_${RSPM_VERSION}_amd64.deb \ && rm rstudio-pm_${RSPM_VERSION}_amd64.deb \ - && apt-get purge -y gdebi-core dpkg-sig gpg gpg-agent \ - && apt-get autoremove -y \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* \ && (ln -s /opt/rstudio-pm/bin/rspm /usr/local/bin/rspm || echo "/usr/local/bin/rspm symlink already exists") -# Set default R version symlink -RUN ln -s /opt/R/${R_VERSION} /opt/R/default - # Add run script and set permissions -------------------------------------------# COPY --chmod=0775 startup.sh /usr/local/bin/startup.sh RUN mkdir -p /var/run/rstudio-pm \ diff --git a/package-manager/Justfile b/package-manager/Justfile index 7f99e5fc8..5e2f692a8 100644 --- a/package-manager/Justfile +++ b/package-manager/Justfile @@ -48,6 +48,8 @@ build OS=IMAGE_OS VERSION=RSPM_VERSION *TAGS="": --build-arg RSPM_VERSION="{{ VERSION }}" \ --build-arg R_VERSION="{{ R_VERSION }}" \ --build-arg R_VERSION_ALT="{{ R_VERSION_ALT }}" \ + --build-arg PYTHON_VERSION="{{ PYTHON_VERSION }}" \ + --build-arg PYTHON_VERSION_ALT="{{ PYTHON_VERSION_ALT }}" \ --file=./Dockerfile.$(just -f ../Justfile _parse-os {{OS}}) . # Test Package Manager image - just test rstudio/rstudio-package-manager:ubuntu2204-2022.07.2-11 2022.07.2-11 @@ -60,6 +62,8 @@ test TAG=`just _make-default-tag` VERSION=RSPM_VERSION CMD="": RSPM_LICENSE_SERVER="{{ RSPM_LICENSE_SERVER }}" \ R_VERSION="{{ R_VERSION }}" \ R_VERSION_ALT="{{ R_VERSION_ALT }}" \ + PYTHON_VERSION="{{ PYTHON_VERSION }}" \ + PYTHON_VERSION_ALT="{{ PYTHON_VERSION_ALT }}" \ docker-compose -f ./docker-compose.test.yml run sut {{ CMD }} # Test Package Manager image interactively - just test-i rstudio/rstudio-package-manager:ubuntu2204-2022.07.2-11 2022.07.2-11 diff --git a/package-manager/NEWS.md b/package-manager/NEWS.md index 419b0847b..5a5ce1446 100644 --- a/package-manager/NEWS.md +++ b/package-manager/NEWS.md @@ -1,3 +1,8 @@ +# 2023-11-13 +- Add Python +- Update R to 4.2.3 +- Deprecate Ubuntu 18.04 + # 2023-07-25 - Changed `rstudio-pm.gcfg` R version number behavior from statically defined to dynamically filled on build. diff --git a/package-manager/README.md b/package-manager/README.md index e396b11fb..7b900e58e 100644 --- a/package-manager/README.md +++ b/package-manager/README.md @@ -6,7 +6,6 @@ # Supported tags and respective Dockerfile links -* [`2023.08.4`, `bionic`, `ubuntu1804`, `bionic-2023.08.4`, `ubuntu1804-2023.08.4`](https://github.com/rstudio/rstudio-docker-products/blob/main/package-manager/Dockerfile.ubuntu1804) * [`jammy`, `ubuntu2204`, `jammy-2023.08.4`, `ubuntu2204-2023.08.4`](https://github.com/rstudio/rstudio-docker-products/blob/main/package-manager/Dockerfile.ubuntu2204) # What is RStudio Package Manager? @@ -50,7 +49,7 @@ export RSPM_LICENSE=XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX docker run -it \ -p 4242:4242 \ -e RSPM_LICENSE=$RSPM_LICENSE \ - rstudio/rstudio-package-manager:ubuntu1804 + rstudio/rstudio-package-manager:ubuntu2204 ``` Open [http://localhost:4242](http://localhost:4242) to access RStudio Package Manager UI. @@ -60,8 +59,9 @@ Note that running the RStudio Package Manager Docker image requires a valid RStu This container includes: -1. One version of R -2. RStudio Package Manager +1. Two versions of R +2. Two versions of Python +3. RStudio Package Manager > NOTE: Package Manager is currently not very particular about R version. Changing the R version is rarely necessary. @@ -128,7 +128,7 @@ docker run -it \ -p 4242:4242 \ -v $PWD/package-manager/rstudio-pm.gcfg:/etc/rstudio-pm/rstudio-pm.gcfg \ -e RSPM_LICENSE=$RSPM_LICENSE \ - rstudio/rstudio-package-manager:ubuntu1804 + rstudio/rstudio-package-manager:ubuntu2204 # Run with persistent data and using an external configuration docker run -it \ @@ -136,7 +136,7 @@ docker run -it \ -v $PWD/data/rspm:/data \ -v $PWD/package-manager/rstudio-pm.gcfg:/etc/rstudio-pm/rstudio-pm.gcfg \ -e RSPM_LICENSE=$RSPM_LICENSE \ - rstudio/rstudio-package-manager:ubuntu1804 + rstudio/rstudio-package-manager:ubuntu2204 ``` Open [http://localhost:4242](http://localhost:4242) to access RStudio Package Manager UI. diff --git a/package-manager/docker-compose.test.yml b/package-manager/docker-compose.test.yml index 9d1b0bf1a..d1279b981 100644 --- a/package-manager/docker-compose.test.yml +++ b/package-manager/docker-compose.test.yml @@ -10,6 +10,8 @@ services: - RSPM_VERSION - R_VERSION - R_VERSION_ALT + - PYTHON_VERSION + - PYTHON_VERSION_ALT - RSPM_LICENSE - RSPM_LICENSE_SERVER volumes: diff --git a/package-manager/test/goss.yaml b/package-manager/test/goss.yaml index 7b36cec27..f97cb4f0b 100644 --- a/package-manager/test/goss.yaml +++ b/package-manager/test/goss.yaml @@ -32,6 +32,10 @@ file: exists: true contains: - "!Unable to initialize the configuration" + /opt/python/{{.Env.PYTHON_VERSION}}/bin/python: + exists: true + /opt/python/{{.Env.PYTHON_VERSION_ALT}}/bin/python: + exists: true # TODO: Ensure that this does _not_ exist in the future # /var/log/rstudio-pm.log: # exists: true @@ -49,7 +53,7 @@ command: "pgrep rstudio-pm": title: rspm_running exit-status: 0 - + # Ensure correct R version "/opt/R/{{ .Env.R_VERSION }}/bin/R --version": title: r_version_match @@ -57,10 +61,23 @@ command: stdout: [ "{{ .Env.R_VERSION }}" ] - "/opt/R/{{ .Env.R_VERSION_ALT }}/bin/R --version": title: r_version_alt_match exit-status: 0 stdout: [ "{{ .Env.R_VERSION_ALT }}" ] + + # Ensure correct python version + "/opt/python/{{ .Env.PYTHON_VERSION }}/bin/python --version": + title: python_version_matches + exit-status: 0 + stdout: [ + "{{ .Env.PYTHON_VERSION }}" + ] + "/opt/python/{{ .Env.PYTHON_VERSION_ALT }}/bin/python --version": + title: python_version_alt_matches + exit-status: 0 + stdout: [ + "{{ .Env.PYTHON_VERSION_ALT }}" + ] From 0ae2c4d7737e781633210780a1fcfcaf1a9a814e Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 13 Nov 2023 12:51:25 -0800 Subject: [PATCH 006/165] Add inputs for manual Python/R version configuration --- .github/workflows/build-manual.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/build-manual.yaml b/.github/workflows/build-manual.yaml index e22dbb7dd..3c74ec876 100644 --- a/.github/workflows/build-manual.yaml +++ b/.github/workflows/build-manual.yaml @@ -42,6 +42,22 @@ on: - preview - daily - release + r_version: + description: "Primary R version" + required: false + default: "4.2.3" + r_version_alt: + description: "Alternate R version" + required: false + default: "4.1.3" + python_version: + description: "Primary Python version" + required: false + default: "3.9.17" + python_version_alt: + description: "Alternate Python version" + required: false + default: "3.8.17" use_s3_download_url: description: "Force build to download binaries directly from S3 where applicable." required: false @@ -93,6 +109,7 @@ jobs: id: get-build-args run: | EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) + VERSION_INPUTS="R_VERSION=${{ inputs.r_version }} R_VERSION_ALT=${{ inputs.r_version_alt }} PYTHON_VERSION=${{ inputs.python_version }} PYTHON_VERSION_ALT=${{ inputs.python_version_alt }}" ARGS_CMD="" USE_S3_DOWNLOAD_URL="" if [[ "${{ inputs.type }}" == "release" ]]; then @@ -105,6 +122,7 @@ jobs: fi BUILD_ARGS=$( \ just -f ci.Justfile \ + ${VERSION_INPUTS} \ ${ARGS_CMD} \ ${{ inputs.product }} \ ${{ inputs.os }} \ From e09677aa7eafadc0e149c747435fad50324e663c Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 13 Nov 2023 13:01:26 -0800 Subject: [PATCH 007/165] Override Python versions in manual workflow for CentOS 7 builds --- .github/workflows/build-manual.yaml | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build-manual.yaml b/.github/workflows/build-manual.yaml index 3c74ec876..2f1137a09 100644 --- a/.github/workflows/build-manual.yaml +++ b/.github/workflows/build-manual.yaml @@ -42,22 +42,6 @@ on: - preview - daily - release - r_version: - description: "Primary R version" - required: false - default: "4.2.3" - r_version_alt: - description: "Alternate R version" - required: false - default: "4.1.3" - python_version: - description: "Primary Python version" - required: false - default: "3.9.17" - python_version_alt: - description: "Alternate Python version" - required: false - default: "3.8.17" use_s3_download_url: description: "Force build to download binaries directly from S3 where applicable." required: false @@ -109,9 +93,16 @@ jobs: id: get-build-args run: | EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) - VERSION_INPUTS="R_VERSION=${{ inputs.r_version }} R_VERSION_ALT=${{ inputs.r_version_alt }} PYTHON_VERSION=${{ inputs.python_version }} PYTHON_VERSION_ALT=${{ inputs.python_version_alt }}" ARGS_CMD="" USE_S3_DOWNLOAD_URL="" + VERSION_OVERRIDES="" + if [[ "${{inputs.os}}" == "centos7" ]]; then + # FIXME(ianpittwood): This is probably a silly way of doing this. We don't have CentOS builds for later + # Python versions so we need to override them. This is done via matrix in the release CI + # but we don't have that here. We're also limited by the 10 input cap so these can't be + # passed by the user alongside R versions as I would've liked to do. + VERSION_OVERRIDES="PYTHON_VERSION=3.9.14 PYTHON_VERSION_ALT=3.8.15" + fi if [[ "${{ inputs.type }}" == "release" ]]; then ARGS_CMD="get-product-args" if [[ "${{ inputs.use_s3_download_url }}" == "true" ]]; then @@ -122,7 +113,7 @@ jobs: fi BUILD_ARGS=$( \ just -f ci.Justfile \ - ${VERSION_INPUTS} \ + ${VERSION_OVERRIDES} \ ${ARGS_CMD} \ ${{ inputs.product }} \ ${{ inputs.os }} \ From f3a8787174fbbfe48b30a4b97d0cf1db40ed93ec Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 13 Nov 2023 13:15:55 -0800 Subject: [PATCH 008/165] Backwards compatibility in r-session-complete CentOS 7 --- r-session-complete/Dockerfile.centos7 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/r-session-complete/Dockerfile.centos7 b/r-session-complete/Dockerfile.centos7 index 37935d324..cf1d52371 100644 --- a/r-session-complete/Dockerfile.centos7 +++ b/r-session-complete/Dockerfile.centos7 @@ -34,6 +34,10 @@ RUN yum install -y subversion \ && yum clean all \ && rm -rf /var/lib/rstudio-server/r-versions +COPY maybe_install_vs_code.sh /tmp/maybe_install_vs_code.sh +RUN /tmp/maybe_install_vs_code.sh \ + && rm /tmp/maybe_install_vs_code.sh + RUN /opt/python/"${PYTHON_VERSION}"/bin/pip3 install \ jupyter \ jupyterlab=="${JUPYTERLAB_VERSION}" \ From 441d9e8a0317b1dac995c5b64cb50056907d479a Mon Sep 17 00:00:00 2001 From: Jonathan Yoder Date: Wed, 15 Nov 2023 07:42:02 -0500 Subject: [PATCH 009/165] Remove README Launcher References for PPM --- package-manager/README.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/package-manager/README.md b/package-manager/README.md index e396b11fb..a7d095ed9 100644 --- a/package-manager/README.md +++ b/package-manager/README.md @@ -80,17 +80,9 @@ a persistent volume. The included configuration file expects a persistent volume orchestration system to be available at `/var/lib/rstudio-pm`. Should you wish to move this to a different path, you can change the `Server.DataDir` option. -When changing `Server.DataDir` to a custom location, we also recommend setting `Server.LauncherDir` -to a consistent location within `Server.DataDir`, such as `{Server.DataDir}/launcher_internal`. -The default location of `Server.LauncherDir` depends on the container's hostname, which may be -different each time the container restarts. - ```ini [Server] DataDir = /mnt/rspm/data -; Use a consistent location for the Launcher directory. The default location -; is based on the hostname, and the hostname may be different in each container. -LauncherDir = /mnt/rspm/data/launcher_internal ``` ### Licensing From cbb324d6efdbcd15d99ca5e8545a5ccdf072685f Mon Sep 17 00:00:00 2001 From: Jonathan Yoder Date: Wed, 15 Nov 2023 07:44:00 -0500 Subject: [PATCH 010/165] Update NEWS.md --- package-manager/NEWS.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package-manager/NEWS.md b/package-manager/NEWS.md index 419b0847b..62ad94e12 100644 --- a/package-manager/NEWS.md +++ b/package-manager/NEWS.md @@ -1,3 +1,6 @@ +# 2023-11-15 +- Removed Launcher references. Package manager no longer uses the Job Launcher for building git packages. + # 2023-07-25 - Changed `rstudio-pm.gcfg` R version number behavior from statically defined to dynamically filled on build. From 641b44c1783e79aa8ddecd7a587fbe5d90a6b2d5 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Thu, 16 Nov 2023 12:21:05 -0800 Subject: [PATCH 011/165] Fix and separate Workbench for GCW builds (#669) * Move Workbench for GCW back into its own build file * Switch push order on regions * Fix region name * Add file end line --- .github/workflows/build-release.yaml | 94 ---------------- .github/workflows/build-workbench-gcw.yaml | 104 ++++++++++++++++++ .../Justfile | 2 +- 3 files changed, 105 insertions(+), 95 deletions(-) create mode 100644 .github/workflows/build-workbench-gcw.yaml diff --git a/.github/workflows/build-release.yaml b/.github/workflows/build-release.yaml index d48dbc990..a291eadad 100644 --- a/.github/workflows/build-release.yaml +++ b/.github/workflows/build-release.yaml @@ -358,97 +358,3 @@ jobs: gcp-json: '${{ secrets.GCP_ARTIFACT_REGISTRY_JSON }}' # End retry logic - - build-workbench-for-google-cloud-workstations: - needs: [ build-base, build-base-pro ] - runs-on: ubuntu-latest - 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 12 * * 1' - uses: actions/checkout@v3 - with: - ref: main - - - name: Check Out Repo - if: github.event.schedule != '0 12 * * 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 workbench-for-google-cloud-workstations/get-version) - 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 workbench-for-google-cloud-workstations/get-build-args) - 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 workbench-for-google-cloud-workstations/get-build-tags) - echo "IMAGE_TAGS=$IMAGE_TAGS" >> $GITHUB_OUTPUT - - - name: Build/Test/Scan/Push base pro image - id: build1 - uses: ./.github/actions/build-test-scan-push - continue-on-error: true - with: - context: ./workbench-for-google-cloud-workstations - os: ubuntu2004 - product: workbench-for-google-cloud-workstations - 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 12 * * 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 base pro image - id: build2 - if: steps.build1.outcome == 'failure' - uses: ./.github/actions/build-test-scan-push - with: - context: ./workbench-for-google-cloud-workstations - os: ubuntu2004 - product: workbench-for-google-cloud-workstations - 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 12 * * 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 diff --git a/.github/workflows/build-workbench-gcw.yaml b/.github/workflows/build-workbench-gcw.yaml new file mode 100644 index 000000000..a225b6fbf --- /dev/null +++ b/.github/workflows/build-workbench-gcw.yaml @@ -0,0 +1,104 @@ +on: + schedule: + - cron: '0 14 * * 1' # If updating this value, be sure to update logic for all `push-image` arguments! + push: + branches: + - main + - dev + - workbench-gcw-push-errors # TODO: remove this branch once we've fixed the push errors + pull_request: + +name: Workbench for GCW - Build, Test, Scan, and Push +jobs: + build-workbench-for-google-cloud-workstations: + runs-on: ubuntu-latest + 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' + 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 workbench-for-google-cloud-workstations/get-version) + 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 workbench-for-google-cloud-workstations/get-build-args) + 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 workbench-for-google-cloud-workstations/get-build-tags) + echo "IMAGE_TAGS=$IMAGE_TAGS" >> $GITHUB_OUTPUT + + - name: Build/Test/Scan/Push base pro image + id: build1 + uses: ./.github/actions/build-test-scan-push + continue-on-error: true + with: + context: ./workbench-for-google-cloud-workstations + os: ubuntu2004 + product: workbench-for-google-cloud-workstations + 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' || github.ref == 'refs/heads/workbench-gcw-push-errors' }} + 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 base pro image + id: build2 + if: steps.build1.outcome == 'failure' + uses: ./.github/actions/build-test-scan-push + with: + context: ./workbench-for-google-cloud-workstations + os: ubuntu2004 + product: workbench-for-google-cloud-workstations + 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' || github.ref == 'refs/heads/workbench-gcw-push-errors' }} + 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 diff --git a/workbench-for-google-cloud-workstations/Justfile b/workbench-for-google-cloud-workstations/Justfile index fc4fd6581..ce026a86f 100644 --- a/workbench-for-google-cloud-workstations/Justfile +++ b/workbench-for-google-cloud-workstations/Justfile @@ -31,7 +31,7 @@ get-build-args: get-build-tags: #!/usr/bin/env bash set -eu - regions=("us" "asia" "europe" "us-central-1") + regions=("us-central1" "asia" "europe" "us") tag_array=() for region in "${regions[@]}"; do tag_array+=("$region-docker.pkg.dev/posit-images/cloud-workstations/workbench:${RSW_TAG_VERSION}") From 5e6e11a731b722a5a3f3c99529def03b584dfe97 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 11 Dec 2023 10:26:43 -0800 Subject: [PATCH 012/165] Upgrade Workbench for GCW to 2023.09.1 (#671) * Upgrade Workbench for GCW to 2023.09.1 * Remove testing lines * Update Python fix versions for Workbench for GCW --- .github/workflows/build-workbench-gcw.yaml | 5 ++--- workbench-for-google-cloud-workstations/.env | 12 ++++++------ .../Dockerfile.ubuntu2004 | 7 +++++-- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-workbench-gcw.yaml b/.github/workflows/build-workbench-gcw.yaml index a225b6fbf..3ad22ff89 100644 --- a/.github/workflows/build-workbench-gcw.yaml +++ b/.github/workflows/build-workbench-gcw.yaml @@ -5,7 +5,6 @@ on: branches: - main - dev - - workbench-gcw-push-errors # TODO: remove this branch once we've fixed the push errors pull_request: name: Workbench for GCW - Build, Test, Scan, and Push @@ -69,7 +68,7 @@ jobs: product: workbench-for-google-cloud-workstations 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' || github.ref == 'refs/heads/workbench-gcw-push-errors' }} + 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 }} @@ -93,7 +92,7 @@ jobs: product: workbench-for-google-cloud-workstations 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' || github.ref == 'refs/heads/workbench-gcw-push-errors' }} + 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 }} diff --git a/workbench-for-google-cloud-workstations/.env b/workbench-for-google-cloud-workstations/.env index 1a28dfba7..fbc18f37d 100644 --- a/workbench-for-google-cloud-workstations/.env +++ b/workbench-for-google-cloud-workstations/.env @@ -1,10 +1,10 @@ -RSW_VERSION=2023.03.2+454.pro2 -RSW_TAG_VERSION=2023.03.2-454.pro2 -RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/bionic/amd64 +RSW_VERSION=2023.09.1+494.pro2 +RSW_TAG_VERSION=2023.09.1-494.pro2 +RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/focal/amd64 RSW_NAME=rstudio-workbench -PYTHON_VERSION=3.10.12 -PYTHON_VERSION_ALT=3.9.17 -PYTHON_VERSION_JUPYTER=3.10.12 +PYTHON_VERSION=3.10.13 +PYTHON_VERSION_ALT=3.9.18 +PYTHON_VERSION_JUPYTER=3.10.13 R_VERSION=4.2.3 R_VERSION_ALT=4.1.3 DRIVERS_VERSION=2023.05.0 diff --git a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 index e23e9a913..144e35780 100644 --- a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 +++ b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 @@ -10,9 +10,9 @@ ARG PYTHON_VERSION_JUPYTER=3.10.12 ARG JUPYTERLAB_VERSION=3.6.5 ARG QUARTO_VERSION=1.3.340 ARG DRIVERS_VERSION=2023.05.0 -ARG RSW_VERSION=2023.03.2+454.pro2 +ARG RSW_VERSION=2023.09.1+494.pro2 ARG RSW_NAME=rstudio-workbench -ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/bionic/amd64 +ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/focal/amd64 ENV STARTUP_DEBUG_MODE 0 ENV RSW_LICENSE "" @@ -103,7 +103,10 @@ RUN apt-get update \ ### Install Workbench ### SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN curl -o rstudio-workbench.deb "${RSW_DOWNLOAD_URL}/${RSW_NAME}-${RSW_VERSION//+/-}-amd64.deb" \ + # Pre 7/25/23 packages && gpg --keyserver keyserver.ubuntu.com --recv-keys 3F32EE77E331692F \ + # Post 7/25 packages + && gpg --keyserver keys.openpgp.org --recv-keys 51C0B5BB19F92D60 \ && dpkg-sig --verify ./rstudio-workbench.deb \ && apt-get update \ && apt-get install -y --no-install-recommends ./rstudio-workbench.deb \ From fee2306be58341cc406154d223a65c6f797efcb7 Mon Sep 17 00:00:00 2001 From: Jacob Woliver Date: Mon, 18 Dec 2023 14:13:30 -0500 Subject: [PATCH 013/165] update version to 2023.12.0-13 --- Justfile | 3 +-- docker-compose.yml | 4 ++-- package-manager/.env | 2 +- package-manager/Dockerfile.ubuntu2204 | 2 +- package-manager/Justfile | 2 +- package-manager/README.md | 2 +- 6 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Justfile b/Justfile index ddb03ddae..979fcec1e 100644 --- a/Justfile +++ b/Justfile @@ -7,7 +7,7 @@ sed_vars := if os() == "macos" { "-i ''" } else { "-i" } BUILDX_PATH := "" RSC_VERSION := "2023.10.0" -RSPM_VERSION := "2023.08.4-20" +RSPM_VERSION := "2023.12.0-13" RSW_VERSION := "2023.09.1+494.pro2" DRIVERS_VERSION := "2023.05.0" @@ -126,7 +126,6 @@ update-rspm-versions: set -euxo pipefail sed {{ sed_vars }} "s/RSPM_VERSION=.*/RSPM_VERSION={{ RSPM_VERSION }}/g" \ package-manager/.env \ - package-manager/Dockerfile.ubuntu1804 \ package-manager/Dockerfile.ubuntu2204 sed {{ sed_vars }} "s/RSPM_VERSION:.*/RSPM_VERSION: {{ RSPM_VERSION }}/g" docker-compose.yml sed {{ sed_vars }} "s/rstudio\/rstudio-package-manager:.*/rstudio\/rstudio-package-manager:$(just _get-clean-version {{ RSPM_VERSION }})/g" docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml index 398dfc6f0..d47a75f56 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -43,8 +43,8 @@ services: context: ./package-manager dockerfile: "Dockerfile.${IMAGE_OS:-ubuntu2204}" args: - RSPM_VERSION: 2023.08.4-20 - image: rstudio/rstudio-package-manager:2023.08.4 + RSPM_VERSION: 2023.12.0-13 + image: rstudio/rstudio-package-manager:2023.12.0 environment: RSPM_LICENSE: ${RSPM_LICENSE} LICENSE_SERVER: ${RSPM_LICENSE_SERVER} diff --git a/package-manager/.env b/package-manager/.env index b41ed04fb..c868272ff 100644 --- a/package-manager/.env +++ b/package-manager/.env @@ -1,4 +1,4 @@ -RSPM_VERSION=2023.08.4-20 +RSPM_VERSION=2023.12.0-13 R_VERSION=4.2.3 R_VERSION_ALT=4.1.3 PYTHON_VERSION=3.9.17 diff --git a/package-manager/Dockerfile.ubuntu2204 b/package-manager/Dockerfile.ubuntu2204 index 75571e6df..530f33173 100644 --- a/package-manager/Dockerfile.ubuntu2204 +++ b/package-manager/Dockerfile.ubuntu2204 @@ -20,7 +20,7 @@ RUN /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install --no-cache-dir buil RUN /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install --no-cache-dir build virtualenv # Download RStudio Package Manager ---------------------------------------------# -ARG RSPM_VERSION=2023.08.4-20 +ARG RSPM_VERSION=2023.12.0-13 ARG RSPM_DOWNLOAD_URL=https://cdn.rstudio.com/package-manager/deb/amd64 RUN curl -O ${RSPM_DOWNLOAD_URL}/rstudio-pm_${RSPM_VERSION}_amd64.deb \ # Pre 7/25/23 packages diff --git a/package-manager/Justfile b/package-manager/Justfile index 5e2f692a8..7277b485c 100644 --- a/package-manager/Justfile +++ b/package-manager/Justfile @@ -6,7 +6,7 @@ IMAGE_PREFIX := "rstudio-" PRODUCT := "package-manager" IMAGE_OS := "ubuntu2204" -RSPM_VERSION := "2023.08.4-20" +RSPM_VERSION := "2023.12.0-13" RSPM_LICENSE := "" RSPM_LICENSE_SERVER := "" diff --git a/package-manager/README.md b/package-manager/README.md index bb23f4794..824a9dd2e 100644 --- a/package-manager/README.md +++ b/package-manager/README.md @@ -6,7 +6,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2023.08.4`, `ubuntu2204-2023.08.4`](https://github.com/rstudio/rstudio-docker-products/blob/main/package-manager/Dockerfile.ubuntu2204) +* [`jammy`, `ubuntu2204`, `jammy-2023.12.0`, `ubuntu2204-2023.12.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/package-manager/Dockerfile.ubuntu2204) # What is RStudio Package Manager? From 7354f1967abb75067a6b7bc9619971c649eb4bf3 Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Mon, 18 Dec 2023 15:06:31 -0800 Subject: [PATCH 014/165] Bump Connect to version 2023.12.0 --- Justfile | 2 +- connect-content-init/Dockerfile.ubuntu2204 | 2 +- connect-content-init/Justfile | 2 +- connect-content-init/README.md | 6 +++--- connect/.env | 2 +- connect/Dockerfile.ubuntu2204 | 2 +- connect/Justfile | 2 +- connect/README.md | 2 +- docker-compose.yml | 4 ++-- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Justfile b/Justfile index 979fcec1e..410409534 100644 --- a/Justfile +++ b/Justfile @@ -6,7 +6,7 @@ sed_vars := if os() == "macos" { "-i ''" } else { "-i" } BUILDX_PATH := "" -RSC_VERSION := "2023.10.0" +RSC_VERSION := "2023.12.0" RSPM_VERSION := "2023.12.0-13" RSW_VERSION := "2023.09.1+494.pro2" diff --git a/connect-content-init/Dockerfile.ubuntu2204 b/connect-content-init/Dockerfile.ubuntu2204 index f06de9c98..ad8455398 100644 --- a/connect-content-init/Dockerfile.ubuntu2204 +++ b/connect-content-init/Dockerfile.ubuntu2204 @@ -10,7 +10,7 @@ RUN apt-get update && \ apt-get install -y --no-install-recommends ca-certificates curl && \ rm -rf /var/lib/apt/lists/* -ARG RSC_VERSION=2023.10.0 +ARG RSC_VERSION=2023.12.0 SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN mkdir -p /rsc-staging && \ RSC_VERSION_URL=$(echo -n "${RSC_VERSION}" | sed 's/+/%2B/g') && \ diff --git a/connect-content-init/Justfile b/connect-content-init/Justfile index 8b7f08e22..01bcf1717 100644 --- a/connect-content-init/Justfile +++ b/connect-content-init/Justfile @@ -6,7 +6,7 @@ IMAGE_PREFIX := "rstudio-" PRODUCT := "connect-content-init" IMAGE_OS := "ubuntu2204" -RSC_VERSION := "2023.10.0" +RSC_VERSION := "2023.12.0" RSC_TAG_SAFE_VERSION := replace(RSC_VERSION, "+", "-") RSC_LICENSE := "" diff --git a/connect-content-init/README.md b/connect-content-init/README.md index cdd69831f..60702b82f 100644 --- a/connect-content-init/README.md +++ b/connect-content-init/README.md @@ -9,7 +9,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2023.10.0`, `ubuntu2204-2023.10.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) +* [`jammy`, `ubuntu2204`, `jammy-2023.12.0`, `ubuntu2204-2023.12.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) # RStudio Connect Content Init Container @@ -31,7 +31,7 @@ The version of the release package to use can be overridden with the `RSC_VERSION` build arg. ```console -just build ubuntu2204 2023.10.0 +just build ubuntu2204 2023.12.0 ``` ## Testing @@ -56,7 +56,7 @@ just test You can see the different layers that make up the image: ```console -docker history rstudio/rstudio-connect-content-init-preview:2023.10.0-dev-326 +docker history rstudio/rstudio-connect-content-init-preview:2023.12.0-dev-326 ``` NOTE: almost all the image size is pandoc. diff --git a/connect/.env b/connect/.env index 084103b34..d5a833270 100644 --- a/connect/.env +++ b/connect/.env @@ -1,4 +1,4 @@ -RSC_VERSION=2023.10.0 +RSC_VERSION=2023.12.0 R_VERSION=4.2.3 R_VERSION_ALT=4.1.3 PYTHON_VERSION=3.9.17 diff --git a/connect/Dockerfile.ubuntu2204 b/connect/Dockerfile.ubuntu2204 index 6f6f39788..0bffaf227 100644 --- a/connect/Dockerfile.ubuntu2204 +++ b/connect/Dockerfile.ubuntu2204 @@ -13,7 +13,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 RSC_VERSION=2023.10.0 +ARG RSC_VERSION=2023.12.0 SHELL [ "/bin/bash", "-o", "pipefail", "-c"] RUN apt-get update --fix-missing \ && apt-get install -yq --no-install-recommends \ diff --git a/connect/Justfile b/connect/Justfile index a5cc999b1..4d30c08a1 100644 --- a/connect/Justfile +++ b/connect/Justfile @@ -6,7 +6,7 @@ IMAGE_PREFIX := "rstudio-" PRODUCT := "connect" IMAGE_OS := "ubuntu2204" -RSC_VERSION := "2023.10.0" +RSC_VERSION := "2023.12.0" RSC_LICENSE := "" RSC_LICENSE_SERVER := "" diff --git a/connect/README.md b/connect/README.md index 18d4ba009..75f8352be 100644 --- a/connect/README.md +++ b/connect/README.md @@ -7,7 +7,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2023.10.0`, `ubuntu2204-2023.10.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) +* [`jammy`, `ubuntu2204`, `jammy-2023.12.0`, `ubuntu2204-2023.12.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) # What is Posit Connect? diff --git a/docker-compose.yml b/docker-compose.yml index d47a75f56..8d7c66581 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -25,8 +25,8 @@ services: context: ./connect dockerfile: "Dockerfile.${IMAGE_OS:-ubuntu1804}" args: - RSC_VERSION: 2023.10.0 - image: rstudio/rstudio-connect:2023.10.0 + RSC_VERSION: 2023.12.0 + image: rstudio/rstudio-connect:2023.12.0 privileged: true environment: RSC_LICENSE: ${RSC_LICENSE} From a60eaf1cd4a425d0c5c0f4f7515fb5badb2b1173 Mon Sep 17 00:00:00 2001 From: David Kegley Date: Mon, 18 Dec 2023 19:07:03 -0500 Subject: [PATCH 015/165] Bump Connect to version 2023.12.0 --- Justfile | 2 +- connect-content-init/Dockerfile.ubuntu2204 | 2 +- connect-content-init/Justfile | 2 +- connect-content-init/README.md | 6 +++--- connect/.env | 2 +- connect/Dockerfile.ubuntu2204 | 2 +- connect/Justfile | 2 +- connect/README.md | 2 +- docker-compose.yml | 4 ++-- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Justfile b/Justfile index ddb03ddae..afdd79d83 100644 --- a/Justfile +++ b/Justfile @@ -6,7 +6,7 @@ sed_vars := if os() == "macos" { "-i ''" } else { "-i" } BUILDX_PATH := "" -RSC_VERSION := "2023.10.0" +RSC_VERSION := "2023.12.0" RSPM_VERSION := "2023.08.4-20" RSW_VERSION := "2023.09.1+494.pro2" diff --git a/connect-content-init/Dockerfile.ubuntu2204 b/connect-content-init/Dockerfile.ubuntu2204 index f06de9c98..ad8455398 100644 --- a/connect-content-init/Dockerfile.ubuntu2204 +++ b/connect-content-init/Dockerfile.ubuntu2204 @@ -10,7 +10,7 @@ RUN apt-get update && \ apt-get install -y --no-install-recommends ca-certificates curl && \ rm -rf /var/lib/apt/lists/* -ARG RSC_VERSION=2023.10.0 +ARG RSC_VERSION=2023.12.0 SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN mkdir -p /rsc-staging && \ RSC_VERSION_URL=$(echo -n "${RSC_VERSION}" | sed 's/+/%2B/g') && \ diff --git a/connect-content-init/Justfile b/connect-content-init/Justfile index 8b7f08e22..01bcf1717 100644 --- a/connect-content-init/Justfile +++ b/connect-content-init/Justfile @@ -6,7 +6,7 @@ IMAGE_PREFIX := "rstudio-" PRODUCT := "connect-content-init" IMAGE_OS := "ubuntu2204" -RSC_VERSION := "2023.10.0" +RSC_VERSION := "2023.12.0" RSC_TAG_SAFE_VERSION := replace(RSC_VERSION, "+", "-") RSC_LICENSE := "" diff --git a/connect-content-init/README.md b/connect-content-init/README.md index cdd69831f..60702b82f 100644 --- a/connect-content-init/README.md +++ b/connect-content-init/README.md @@ -9,7 +9,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2023.10.0`, `ubuntu2204-2023.10.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) +* [`jammy`, `ubuntu2204`, `jammy-2023.12.0`, `ubuntu2204-2023.12.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) # RStudio Connect Content Init Container @@ -31,7 +31,7 @@ The version of the release package to use can be overridden with the `RSC_VERSION` build arg. ```console -just build ubuntu2204 2023.10.0 +just build ubuntu2204 2023.12.0 ``` ## Testing @@ -56,7 +56,7 @@ just test You can see the different layers that make up the image: ```console -docker history rstudio/rstudio-connect-content-init-preview:2023.10.0-dev-326 +docker history rstudio/rstudio-connect-content-init-preview:2023.12.0-dev-326 ``` NOTE: almost all the image size is pandoc. diff --git a/connect/.env b/connect/.env index 084103b34..d5a833270 100644 --- a/connect/.env +++ b/connect/.env @@ -1,4 +1,4 @@ -RSC_VERSION=2023.10.0 +RSC_VERSION=2023.12.0 R_VERSION=4.2.3 R_VERSION_ALT=4.1.3 PYTHON_VERSION=3.9.17 diff --git a/connect/Dockerfile.ubuntu2204 b/connect/Dockerfile.ubuntu2204 index 6f6f39788..0bffaf227 100644 --- a/connect/Dockerfile.ubuntu2204 +++ b/connect/Dockerfile.ubuntu2204 @@ -13,7 +13,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 RSC_VERSION=2023.10.0 +ARG RSC_VERSION=2023.12.0 SHELL [ "/bin/bash", "-o", "pipefail", "-c"] RUN apt-get update --fix-missing \ && apt-get install -yq --no-install-recommends \ diff --git a/connect/Justfile b/connect/Justfile index a5cc999b1..4d30c08a1 100644 --- a/connect/Justfile +++ b/connect/Justfile @@ -6,7 +6,7 @@ IMAGE_PREFIX := "rstudio-" PRODUCT := "connect" IMAGE_OS := "ubuntu2204" -RSC_VERSION := "2023.10.0" +RSC_VERSION := "2023.12.0" RSC_LICENSE := "" RSC_LICENSE_SERVER := "" diff --git a/connect/README.md b/connect/README.md index 18d4ba009..75f8352be 100644 --- a/connect/README.md +++ b/connect/README.md @@ -7,7 +7,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2023.10.0`, `ubuntu2204-2023.10.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) +* [`jammy`, `ubuntu2204`, `jammy-2023.12.0`, `ubuntu2204-2023.12.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) # What is Posit Connect? diff --git a/docker-compose.yml b/docker-compose.yml index 2a8098ebb..489e4a35e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -25,8 +25,8 @@ services: context: ./connect dockerfile: "Dockerfile.${IMAGE_OS:-ubuntu1804}" args: - RSC_VERSION: 2023.10.0 - image: rstudio/rstudio-connect:2023.10.0 + RSC_VERSION: 2023.12.0 + image: rstudio/rstudio-connect:2023.12.0 privileged: true environment: RSC_LICENSE: ${RSC_LICENSE} From 1d65c5b38aec48f44bd57e5ffb4c3c3746888f9b Mon Sep 17 00:00:00 2001 From: Tim Mok Date: Wed, 20 Dec 2023 09:16:37 -0500 Subject: [PATCH 016/165] Bump Workbench and rsession images to 2023.12.0 (#678) --- Justfile | 4 ++-- docker-compose.yml | 4 ++-- r-session-complete/.env | 2 +- r-session-complete/Dockerfile.centos7 | 2 +- r-session-complete/Dockerfile.ubuntu2204 | 2 +- r-session-complete/Justfile | 2 +- r-session-complete/README.md | 2 +- tools/get-version.py | 2 +- workbench-for-google-cloud-workstations/.env | 4 ++-- workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 | 2 +- workbench-for-microsoft-azure-ml/.env | 2 +- workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 | 2 +- workbench-for-microsoft-azure-ml/Justfile | 2 +- workbench/.env | 2 +- workbench/Dockerfile.ubuntu2204 | 2 +- workbench/Justfile | 2 +- workbench/README.md | 2 +- 17 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Justfile b/Justfile index afdd79d83..64c5622ee 100644 --- a/Justfile +++ b/Justfile @@ -8,7 +8,7 @@ BUILDX_PATH := "" RSC_VERSION := "2023.12.0" RSPM_VERSION := "2023.08.4-20" -RSW_VERSION := "2023.09.1+494.pro2" +RSW_VERSION := "2023.12.0+369.pro3" DRIVERS_VERSION := "2023.05.0" DRIVERS_VERSION_RHEL := DRIVERS_VERSION + "-1" @@ -21,7 +21,7 @@ PYTHON_VERSION_ALT := "3.8.17" PYTHON_VERSION_RHEL := "3.9.14" PYTHON_VERSION_ALT_RHEL := "3.8.15" -QUARTO_VERSION := "1.3.340" +QUARTO_VERSION := "1.3.450" # just _get-tag-safe-version 2022.07.2+576.pro12 _get-tag-safe-version $VERSION: diff --git a/docker-compose.yml b/docker-compose.yml index 489e4a35e..12c53891d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,8 +7,8 @@ services: context: ./workbench dockerfile: "Dockerfile.${IMAGE_OS:-ubuntu2204}" args: - RSW_VERSION: 2023.09.1+494.pro2 - image: rstudio/rstudio-workbench:2023.09.1 + RSW_VERSION: 2023.12.0+369.pro3 + image: rstudio/rstudio-workbench:2023.12.0 environment: RSW_LICENSE: ${RSW_LICENSE} LICENSE_SERVER: ${RSW_LICENSE_SERVER} diff --git a/r-session-complete/.env b/r-session-complete/.env index 3dcca6257..346abb8b9 100644 --- a/r-session-complete/.env +++ b/r-session-complete/.env @@ -1,4 +1,4 @@ R_VERSION=4.1.0 PYTHON_VERSION=3.9.5 DRIVERS_VERSION=2023.05.0-1 -RSW_VERSION=2023.09.1+494.pro2 +RSW_VERSION=2023.12.0+369.pro3 diff --git a/r-session-complete/Dockerfile.centos7 b/r-session-complete/Dockerfile.centos7 index cf1d52371..5de5ee496 100644 --- a/r-session-complete/Dockerfile.centos7 +++ b/r-session-complete/Dockerfile.centos7 @@ -12,7 +12,7 @@ ARG R_VERSION_ALT=4.1.3 ARG PYTHON_VERSION=3.9.14 ARG PYTHON_VERSION_ALT=3.8.15 ARG JUPYTERLAB_VERSION=3.2.9 -ARG RSW_VERSION=2023.09.1+494.pro2 +ARG RSW_VERSION=2023.12.0+369.pro3 ARG RSW_NAME=rstudio-workbench-rhel ARG RSW_DOWNLOAD_URL=https://s3.amazonaws.com/rstudio-ide-build/server/centos7/x86_64 diff --git a/r-session-complete/Dockerfile.ubuntu2204 b/r-session-complete/Dockerfile.ubuntu2204 index 9809f2bed..519fb444c 100644 --- a/r-session-complete/Dockerfile.ubuntu2204 +++ b/r-session-complete/Dockerfile.ubuntu2204 @@ -13,7 +13,7 @@ ARG R_VERSION_ALT=4.1.3 ARG PYTHON_VERSION=3.9.17 ARG PYTHON_VERSION_ALT=3.8.17 ARG JUPYTERLAB_VERSION=3.6.5 -ARG RSW_VERSION=2023.09.1+494.pro2 +ARG RSW_VERSION=2023.12.0+369.pro3 ARG RSW_NAME=rstudio-workbench ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64 diff --git a/r-session-complete/Justfile b/r-session-complete/Justfile index c58b0cae7..f2214aea9 100755 --- a/r-session-complete/Justfile +++ b/r-session-complete/Justfile @@ -6,7 +6,7 @@ IMAGE_PREFIX := "" PRODUCT := "r-session-complete" IMAGE_OS := "ubuntu2204" -RSW_VERSION := "2023.09.1+494.pro2" +RSW_VERSION := "2023.12.0+369.pro3" RSW_LICENSE := "" DRIVERS_VERSION := "2023.05.0" diff --git a/r-session-complete/README.md b/r-session-complete/README.md index d33bcca5c..44a6ca582 100644 --- a/r-session-complete/README.md +++ b/r-session-complete/README.md @@ -7,7 +7,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2023.09.1`, `ubuntu2204-2023.09.1`](https://github.com/rstudio/rstudio-docker-products/blob/main/r-session-complete/Dockerfile.ubuntu2204) +* [`jammy`, `ubuntu2204`, `jammy-2023.12.0`, `ubuntu2204-2023.12.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/r-session-complete/Dockerfile.ubuntu2204) # What are the r-session-complete images? diff --git a/tools/get-version.py b/tools/get-version.py index a6a8652f0..6264910c3 100755 --- a/tools/get-version.py +++ b/tools/get-version.py @@ -97,7 +97,7 @@ def clean_product_selection(product: str) -> str: def rstudio_workbench_daily(): - version_json = download_json("https://dailies.rstudio.com/rstudio/ocean-storm/index.json") + version_json = download_json("https://dailies.rstudio.com/rstudio/chocolate-cosmos/index.json") return version_json['workbench']['platforms']['jammy-amd64']['version'] diff --git a/workbench-for-google-cloud-workstations/.env b/workbench-for-google-cloud-workstations/.env index 1a28dfba7..312eb1a91 100644 --- a/workbench-for-google-cloud-workstations/.env +++ b/workbench-for-google-cloud-workstations/.env @@ -1,5 +1,5 @@ -RSW_VERSION=2023.03.2+454.pro2 -RSW_TAG_VERSION=2023.03.2-454.pro2 +RSW_VERSION=2023.12.0+369.pro3 +RSW_TAG_VERSION=2023.12.0-369.pro3 RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/bionic/amd64 RSW_NAME=rstudio-workbench PYTHON_VERSION=3.10.12 diff --git a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 index e23e9a913..55c1430b2 100644 --- a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 +++ b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 @@ -10,7 +10,7 @@ ARG PYTHON_VERSION_JUPYTER=3.10.12 ARG JUPYTERLAB_VERSION=3.6.5 ARG QUARTO_VERSION=1.3.340 ARG DRIVERS_VERSION=2023.05.0 -ARG RSW_VERSION=2023.03.2+454.pro2 +ARG RSW_VERSION=2023.12.0+369.pro3 ARG RSW_NAME=rstudio-workbench ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/bionic/amd64 diff --git a/workbench-for-microsoft-azure-ml/.env b/workbench-for-microsoft-azure-ml/.env index b2f9743b9..afaf34958 100644 --- a/workbench-for-microsoft-azure-ml/.env +++ b/workbench-for-microsoft-azure-ml/.env @@ -1,4 +1,4 @@ -RSW_VERSION=2023.09.1+494.pro2 +RSW_VERSION=2023.12.0+369.pro3 RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/bionic/amd64 RSW_NAME=rstudio-workbench PYTHON_VERSION=3.9.14 diff --git a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 index 983e74aa2..deb148eed 100644 --- a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 +++ b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 @@ -14,7 +14,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.5 -ARG RSW_VERSION=2023.09.1+494.pro2 +ARG RSW_VERSION=2023.12.0+369.pro3 ARG RSW_NAME=rstudio-workbench ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64 ARG DEBIAN_FRONTEND=noninteractive diff --git a/workbench-for-microsoft-azure-ml/Justfile b/workbench-for-microsoft-azure-ml/Justfile index b2320fed4..6dc3242f7 100644 --- a/workbench-for-microsoft-azure-ml/Justfile +++ b/workbench-for-microsoft-azure-ml/Justfile @@ -6,7 +6,7 @@ IMAGE_PREFIX := "rstudio-" PRODUCT := "workbench" IMAGE_OS := "ubuntu2204" -RSW_VERSION := "2023.09.1+494.pro2" +RSW_VERSION := "2023.12.0+369.pro3" RSW_LICENSE := "" R_VERSION := "4.2.3" diff --git a/workbench/.env b/workbench/.env index 5fd835967..586074222 100644 --- a/workbench/.env +++ b/workbench/.env @@ -1,4 +1,4 @@ -RSW_VERSION=2023.09.1+494.pro2 +RSW_VERSION=2023.12.0+369.pro3 RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/bionic/amd64 RSW_NAME=rstudio-workbench PYTHON_VERSION=3.9.17 diff --git a/workbench/Dockerfile.ubuntu2204 b/workbench/Dockerfile.ubuntu2204 index 419177cff..8fd8f1d82 100644 --- a/workbench/Dockerfile.ubuntu2204 +++ b/workbench/Dockerfile.ubuntu2204 @@ -14,7 +14,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.5 -ARG RSW_VERSION=2023.09.1+494.pro2 +ARG RSW_VERSION=2023.12.0+369.pro3 ARG RSW_NAME=rstudio-workbench ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64 diff --git a/workbench/Justfile b/workbench/Justfile index 415dff00c..6202f6747 100644 --- a/workbench/Justfile +++ b/workbench/Justfile @@ -6,7 +6,7 @@ IMAGE_PREFIX := "rstudio-" PRODUCT := "workbench" IMAGE_OS := "ubuntu2204" -RSW_VERSION := "2023.09.1+494.pro2" +RSW_VERSION := "2023.12.0+369.pro3" RSW_RELEASE_TYPE := "release" RSW_LICENSE := "" RSW_LICENSE_SERVER := "" diff --git a/workbench/README.md b/workbench/README.md index c6e22c65a..e72c4b245 100644 --- a/workbench/README.md +++ b/workbench/README.md @@ -7,7 +7,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2023.09.1`, `ubuntu2204-2023.09.1`](https://github.com/rstudio/rstudio-docker-products/blob/main/workbench/Dockerfile.ubuntu2204) +* [`jammy`, `ubuntu2204`, `jammy-2023.12.0`, `ubuntu2204-2023.12.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/workbench/Dockerfile.ubuntu2204) # What is RStudio Workbench? From 950e145a7d1af543d78d701ea3087661bcdb3ca0 Mon Sep 17 00:00:00 2001 From: Jacob Woliver Date: Mon, 18 Dec 2023 14:13:30 -0500 Subject: [PATCH 017/165] update PPM version to 2023.12.0-13 --- Justfile | 3 +-- docker-compose.yml | 4 ++-- package-manager/.env | 2 +- package-manager/Dockerfile.ubuntu2204 | 2 +- package-manager/Justfile | 2 +- package-manager/README.md | 3 +-- 6 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Justfile b/Justfile index 64c5622ee..3740c7003 100644 --- a/Justfile +++ b/Justfile @@ -7,7 +7,7 @@ sed_vars := if os() == "macos" { "-i ''" } else { "-i" } BUILDX_PATH := "" RSC_VERSION := "2023.12.0" -RSPM_VERSION := "2023.08.4-20" +RSPM_VERSION := "2023.12.0-13" RSW_VERSION := "2023.12.0+369.pro3" DRIVERS_VERSION := "2023.05.0" @@ -126,7 +126,6 @@ update-rspm-versions: set -euxo pipefail sed {{ sed_vars }} "s/RSPM_VERSION=.*/RSPM_VERSION={{ RSPM_VERSION }}/g" \ package-manager/.env \ - package-manager/Dockerfile.ubuntu1804 \ package-manager/Dockerfile.ubuntu2204 sed {{ sed_vars }} "s/RSPM_VERSION:.*/RSPM_VERSION: {{ RSPM_VERSION }}/g" docker-compose.yml sed {{ sed_vars }} "s/rstudio\/rstudio-package-manager:.*/rstudio\/rstudio-package-manager:$(just _get-clean-version {{ RSPM_VERSION }})/g" docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml index 12c53891d..e656a904b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -43,8 +43,8 @@ services: context: ./package-manager dockerfile: "Dockerfile.${IMAGE_OS:-ubuntu1804}" args: - RSPM_VERSION: 2023.08.4-20 - image: rstudio/rstudio-package-manager:2023.08.4 + RSPM_VERSION: 2023.12.0-13 + image: rstudio/rstudio-package-manager:2023.12.0 environment: RSPM_LICENSE: ${RSPM_LICENSE} LICENSE_SERVER: ${RSPM_LICENSE_SERVER} diff --git a/package-manager/.env b/package-manager/.env index 0cd44ebc1..ce131756e 100644 --- a/package-manager/.env +++ b/package-manager/.env @@ -1,3 +1,3 @@ -RSPM_VERSION=2023.08.4-20 +RSPM_VERSION=2023.12.0-13 R_VERSION=4.2.3 R_VERSION_ALT=4.1.3 diff --git a/package-manager/Dockerfile.ubuntu2204 b/package-manager/Dockerfile.ubuntu2204 index a6fc4966c..f570f2856 100644 --- a/package-manager/Dockerfile.ubuntu2204 +++ b/package-manager/Dockerfile.ubuntu2204 @@ -44,7 +44,7 @@ RUN apt-get update -qq && \ && rm -rf /var/lib/apt/lists/* # Download RStudio Package Manager ---------------------------------------------# -ARG RSPM_VERSION=2023.08.4-20 +ARG RSPM_VERSION=2023.12.0-13 ARG RSPM_DOWNLOAD_URL=https://cdn.rstudio.com/package-manager/deb/amd64 RUN apt-get update --fix-missing \ && apt-get install -y --no-install-recommends ca-certificates gdebi-core gpg dpkg-sig \ diff --git a/package-manager/Justfile b/package-manager/Justfile index 7f99e5fc8..0aebeef1e 100644 --- a/package-manager/Justfile +++ b/package-manager/Justfile @@ -6,7 +6,7 @@ IMAGE_PREFIX := "rstudio-" PRODUCT := "package-manager" IMAGE_OS := "ubuntu2204" -RSPM_VERSION := "2023.08.4-20" +RSPM_VERSION := "2023.12.0-13" RSPM_LICENSE := "" RSPM_LICENSE_SERVER := "" diff --git a/package-manager/README.md b/package-manager/README.md index e396b11fb..e1e575182 100644 --- a/package-manager/README.md +++ b/package-manager/README.md @@ -6,8 +6,7 @@ # Supported tags and respective Dockerfile links -* [`2023.08.4`, `bionic`, `ubuntu1804`, `bionic-2023.08.4`, `ubuntu1804-2023.08.4`](https://github.com/rstudio/rstudio-docker-products/blob/main/package-manager/Dockerfile.ubuntu1804) -* [`jammy`, `ubuntu2204`, `jammy-2023.08.4`, `ubuntu2204-2023.08.4`](https://github.com/rstudio/rstudio-docker-products/blob/main/package-manager/Dockerfile.ubuntu2204) +* [`jammy`, `ubuntu2204`, `jammy-2023.12.0`, `ubuntu2204-2023.12.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/package-manager/Dockerfile.ubuntu2204) # What is RStudio Package Manager? From 64a810e2f6208e70cee60760d0cb2638b28ec551 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Wed, 10 Jan 2024 10:15:12 -0800 Subject: [PATCH 018/165] Upgrade WGCW to 2023.12.0 --- .../Dockerfile.ubuntu2004 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 index 144e35780..cb5e38c27 100644 --- a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 +++ b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 @@ -4,13 +4,13 @@ FROM us-central1-docker.pkg.dev/cloud-workstations-images/predefined/base:public ARG DEBIAN_FRONTEND=noninteractive ARG R_VERSION=4.2.3 ARG R_VERSION_ALT=4.1.3 -ARG PYTHON_VERSION=3.10.12 -ARG PYTHON_VERSION_ALT=3.9.17 -ARG PYTHON_VERSION_JUPYTER=3.10.12 +ARG PYTHON_VERSION=3.11.7 +ARG PYTHON_VERSION_ALT=3.10.13 +ARG PYTHON_VERSION_JUPYTER=3.10.13 ARG JUPYTERLAB_VERSION=3.6.5 -ARG QUARTO_VERSION=1.3.340 +ARG QUARTO_VERSION=1.3.450 ARG DRIVERS_VERSION=2023.05.0 -ARG RSW_VERSION=2023.09.1+494.pro2 +ARG RSW_VERSION=2023.12.0+369.pro3 ARG RSW_NAME=rstudio-workbench ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/focal/amd64 From 941d19611fa23ef8c3042c29f57d372e2d97b5af Mon Sep 17 00:00:00 2001 From: Jerred Shepherd Date: Wed, 13 Dec 2023 10:41:18 -0800 Subject: [PATCH 019/165] Update Package Manager's Python version --- .github/workflows/build-prerelease.yaml | 2 +- .github/workflows/build-release.yaml | 4 +++- package-manager/Dockerfile.ubuntu2204 | 4 ++-- package-manager/Justfile | 4 ++-- package-manager/NEWS.md | 5 ++++- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-prerelease.yaml b/.github/workflows/build-prerelease.yaml index ef895605d..470470bb9 100644 --- a/.github/workflows/build-prerelease.yaml +++ b/.github/workflows/build-prerelease.yaml @@ -30,7 +30,7 @@ jobs: - {product: "workbench", type: "preview", os: "ubuntu2204", r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"} - {product: "connect", type: "daily", os: "ubuntu2204", r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"} - {product: "connect-content-init", type: "daily", os: "ubuntu2204", r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"} - - {product: "package-manager", type: "daily", os: "ubuntu2204", r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"} + - {product: "package-manager", type: "daily", 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", type: "daily", os: "ubuntu2204", r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"} - {product: "r-session-complete", type: "daily", 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", type: "preview", os: "ubuntu2204", r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"} diff --git a/.github/workflows/build-release.yaml b/.github/workflows/build-release.yaml index 21f91930d..b199fef96 100644 --- a/.github/workflows/build-release.yaml +++ b/.github/workflows/build-release.yaml @@ -30,6 +30,7 @@ jobs: - {os: 'ubuntu2204', r-primary: "4.2.0", r-alternate: "3.6.2", py-primary: "3.9.5", py-alternate: "3.8.10"} - {os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.14", py-alternate: "3.8.15"} - {os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"} + - {os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.12.1", py-alternate: "3.11.7"} steps: - name: Check Out Repo - cron main @@ -138,6 +139,7 @@ jobs: - {os: 'ubuntu2204', r-primary: "4.2.0", r-alternate: "3.6.2", py-primary: "3.9.5", py-alternate: "3.8.10"} - {os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.14", py-alternate: "3.8.15"} - {os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"} + - {os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.12.1", py-alternate: "3.11.7"} concurrency: group: build-base-pro-${{ matrix.config.os }}-r${{ matrix.config.r-primary }}_${{ matrix.config.r-alternate }}-py${{ matrix.config.py-primary }}_${{ matrix.config.py-alternate }}-${{ github.ref }} @@ -248,7 +250,7 @@ jobs: - {product: 'workbench', os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.14", py-alternate: "3.8.15"} - {product: 'connect', os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"} - {product: 'connect-content-init', os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"} - - {product: 'package-manager', os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"} + - {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"} diff --git a/package-manager/Dockerfile.ubuntu2204 b/package-manager/Dockerfile.ubuntu2204 index 530f33173..06c052be2 100644 --- a/package-manager/Dockerfile.ubuntu2204 +++ b/package-manager/Dockerfile.ubuntu2204 @@ -1,7 +1,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 PYTHON_VERSION=3.12.1 +ARG PYTHON_VERSION_ALT=3.11.7 ARG SRC_IMAGE_NAME=product-base ARG REGISTRY=ghcr.io FROM ${REGISTRY}/rstudio/${SRC_IMAGE_NAME}:ubuntu2204-r${R_VERSION}_${R_VERSION_ALT}-py${PYTHON_VERSION}_${PYTHON_VERSION_ALT} diff --git a/package-manager/Justfile b/package-manager/Justfile index 7277b485c..cb03a2f40 100644 --- a/package-manager/Justfile +++ b/package-manager/Justfile @@ -13,8 +13,8 @@ RSPM_LICENSE_SERVER := "" R_VERSION := "4.2.3" R_VERSION_ALT := "4.1.3" -PYTHON_VERSION := "3.9.17" -PYTHON_VERSION_ALT := "3.8.17" +PYTHON_VERSION := "3.12.1" +PYTHON_VERSION_ALT := "3.11.7" PERSIST_LICENSE := "false" PERSIST_LICENSE_DIR := join(justfile_directory(), "tmp-lic") diff --git a/package-manager/NEWS.md b/package-manager/NEWS.md index 2e9349657..353efa22f 100644 --- a/package-manager/NEWS.md +++ b/package-manager/NEWS.md @@ -1,3 +1,6 @@ +# 2024-01-11 +- Update Python to 3.12.1 + # 2023-11-20 - Add Python - Update R to 4.2.3 @@ -7,7 +10,7 @@ - Removed Launcher references. Package manager no longer uses the Job Launcher for building git packages. # 2023-07-25 -- Changed `rstudio-pm.gcfg` R version number behavior from statically defined to dynamically filled on build. +- Changed `rstudio-pm.gcfg` R version number behavior from statically defined to dynamically filled on build. # 2022.11.4-20 From b093afcc64740c5d1e0d2b587fcca064f1188056 Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Thu, 25 Jan 2024 11:45:53 -0800 Subject: [PATCH 020/165] Bump Connect to version 2024.01.0 --- Justfile | 2 +- connect-content-init/Dockerfile.ubuntu2204 | 2 +- connect-content-init/Justfile | 2 +- connect-content-init/README.md | 6 +++--- connect/.env | 2 +- connect/Dockerfile.ubuntu2204 | 2 +- connect/Justfile | 2 +- connect/README.md | 2 +- docker-compose.yml | 4 ++-- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Justfile b/Justfile index 3740c7003..7caffa2dc 100644 --- a/Justfile +++ b/Justfile @@ -6,7 +6,7 @@ sed_vars := if os() == "macos" { "-i ''" } else { "-i" } BUILDX_PATH := "" -RSC_VERSION := "2023.12.0" +RSC_VERSION := "2024.01.0" RSPM_VERSION := "2023.12.0-13" RSW_VERSION := "2023.12.0+369.pro3" diff --git a/connect-content-init/Dockerfile.ubuntu2204 b/connect-content-init/Dockerfile.ubuntu2204 index ad8455398..9f58675b6 100644 --- a/connect-content-init/Dockerfile.ubuntu2204 +++ b/connect-content-init/Dockerfile.ubuntu2204 @@ -10,7 +10,7 @@ RUN apt-get update && \ apt-get install -y --no-install-recommends ca-certificates curl && \ rm -rf /var/lib/apt/lists/* -ARG RSC_VERSION=2023.12.0 +ARG RSC_VERSION=2024.01.0 SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN mkdir -p /rsc-staging && \ RSC_VERSION_URL=$(echo -n "${RSC_VERSION}" | sed 's/+/%2B/g') && \ diff --git a/connect-content-init/Justfile b/connect-content-init/Justfile index 01bcf1717..e2df1bae3 100644 --- a/connect-content-init/Justfile +++ b/connect-content-init/Justfile @@ -6,7 +6,7 @@ IMAGE_PREFIX := "rstudio-" PRODUCT := "connect-content-init" IMAGE_OS := "ubuntu2204" -RSC_VERSION := "2023.12.0" +RSC_VERSION := "2024.01.0" RSC_TAG_SAFE_VERSION := replace(RSC_VERSION, "+", "-") RSC_LICENSE := "" diff --git a/connect-content-init/README.md b/connect-content-init/README.md index 60702b82f..36373b58f 100644 --- a/connect-content-init/README.md +++ b/connect-content-init/README.md @@ -9,7 +9,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2023.12.0`, `ubuntu2204-2023.12.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.01.0`, `ubuntu2204-2024.01.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) # RStudio Connect Content Init Container @@ -31,7 +31,7 @@ The version of the release package to use can be overridden with the `RSC_VERSION` build arg. ```console -just build ubuntu2204 2023.12.0 +just build ubuntu2204 2024.01.0 ``` ## Testing @@ -56,7 +56,7 @@ just test You can see the different layers that make up the image: ```console -docker history rstudio/rstudio-connect-content-init-preview:2023.12.0-dev-326 +docker history rstudio/rstudio-connect-content-init-preview:2024.01.0-dev-326 ``` NOTE: almost all the image size is pandoc. diff --git a/connect/.env b/connect/.env index d5a833270..f936ca2ca 100644 --- a/connect/.env +++ b/connect/.env @@ -1,4 +1,4 @@ -RSC_VERSION=2023.12.0 +RSC_VERSION=2024.01.0 R_VERSION=4.2.3 R_VERSION_ALT=4.1.3 PYTHON_VERSION=3.9.17 diff --git a/connect/Dockerfile.ubuntu2204 b/connect/Dockerfile.ubuntu2204 index 0bffaf227..8d092a88c 100644 --- a/connect/Dockerfile.ubuntu2204 +++ b/connect/Dockerfile.ubuntu2204 @@ -13,7 +13,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 RSC_VERSION=2023.12.0 +ARG RSC_VERSION=2024.01.0 SHELL [ "/bin/bash", "-o", "pipefail", "-c"] RUN apt-get update --fix-missing \ && apt-get install -yq --no-install-recommends \ diff --git a/connect/Justfile b/connect/Justfile index 4d30c08a1..ccf4af8e7 100644 --- a/connect/Justfile +++ b/connect/Justfile @@ -6,7 +6,7 @@ IMAGE_PREFIX := "rstudio-" PRODUCT := "connect" IMAGE_OS := "ubuntu2204" -RSC_VERSION := "2023.12.0" +RSC_VERSION := "2024.01.0" RSC_LICENSE := "" RSC_LICENSE_SERVER := "" diff --git a/connect/README.md b/connect/README.md index 75f8352be..23add18a2 100644 --- a/connect/README.md +++ b/connect/README.md @@ -7,7 +7,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2023.12.0`, `ubuntu2204-2023.12.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.01.0`, `ubuntu2204-2024.01.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) # What is Posit Connect? diff --git a/docker-compose.yml b/docker-compose.yml index abf4c56be..36db571d3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -25,8 +25,8 @@ services: context: ./connect dockerfile: "Dockerfile.${IMAGE_OS:-ubuntu1804}" args: - RSC_VERSION: 2023.12.0 - image: rstudio/rstudio-connect:2023.12.0 + RSC_VERSION: 2024.01.0 + image: rstudio/rstudio-connect:2024.01.0 privileged: true environment: RSC_LICENSE: ${RSC_LICENSE} From 45ea3baef7778a4ae01b1f6f6f522d4e3940cf0c Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Thu, 25 Jan 2024 12:22:42 -0800 Subject: [PATCH 021/165] Bump Connect to version 2024.01.0 --- Justfile | 2 +- connect-content-init/Dockerfile.ubuntu2204 | 2 +- connect-content-init/Justfile | 2 +- connect-content-init/README.md | 6 +++--- connect/.env | 2 +- connect/Dockerfile.ubuntu2204 | 2 +- connect/Justfile | 2 +- connect/README.md | 2 +- docker-compose.yml | 4 ++-- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Justfile b/Justfile index 3740c7003..7caffa2dc 100644 --- a/Justfile +++ b/Justfile @@ -6,7 +6,7 @@ sed_vars := if os() == "macos" { "-i ''" } else { "-i" } BUILDX_PATH := "" -RSC_VERSION := "2023.12.0" +RSC_VERSION := "2024.01.0" RSPM_VERSION := "2023.12.0-13" RSW_VERSION := "2023.12.0+369.pro3" diff --git a/connect-content-init/Dockerfile.ubuntu2204 b/connect-content-init/Dockerfile.ubuntu2204 index ad8455398..9f58675b6 100644 --- a/connect-content-init/Dockerfile.ubuntu2204 +++ b/connect-content-init/Dockerfile.ubuntu2204 @@ -10,7 +10,7 @@ RUN apt-get update && \ apt-get install -y --no-install-recommends ca-certificates curl && \ rm -rf /var/lib/apt/lists/* -ARG RSC_VERSION=2023.12.0 +ARG RSC_VERSION=2024.01.0 SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN mkdir -p /rsc-staging && \ RSC_VERSION_URL=$(echo -n "${RSC_VERSION}" | sed 's/+/%2B/g') && \ diff --git a/connect-content-init/Justfile b/connect-content-init/Justfile index 01bcf1717..e2df1bae3 100644 --- a/connect-content-init/Justfile +++ b/connect-content-init/Justfile @@ -6,7 +6,7 @@ IMAGE_PREFIX := "rstudio-" PRODUCT := "connect-content-init" IMAGE_OS := "ubuntu2204" -RSC_VERSION := "2023.12.0" +RSC_VERSION := "2024.01.0" RSC_TAG_SAFE_VERSION := replace(RSC_VERSION, "+", "-") RSC_LICENSE := "" diff --git a/connect-content-init/README.md b/connect-content-init/README.md index 60702b82f..36373b58f 100644 --- a/connect-content-init/README.md +++ b/connect-content-init/README.md @@ -9,7 +9,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2023.12.0`, `ubuntu2204-2023.12.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.01.0`, `ubuntu2204-2024.01.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) # RStudio Connect Content Init Container @@ -31,7 +31,7 @@ The version of the release package to use can be overridden with the `RSC_VERSION` build arg. ```console -just build ubuntu2204 2023.12.0 +just build ubuntu2204 2024.01.0 ``` ## Testing @@ -56,7 +56,7 @@ just test You can see the different layers that make up the image: ```console -docker history rstudio/rstudio-connect-content-init-preview:2023.12.0-dev-326 +docker history rstudio/rstudio-connect-content-init-preview:2024.01.0-dev-326 ``` NOTE: almost all the image size is pandoc. diff --git a/connect/.env b/connect/.env index d5a833270..f936ca2ca 100644 --- a/connect/.env +++ b/connect/.env @@ -1,4 +1,4 @@ -RSC_VERSION=2023.12.0 +RSC_VERSION=2024.01.0 R_VERSION=4.2.3 R_VERSION_ALT=4.1.3 PYTHON_VERSION=3.9.17 diff --git a/connect/Dockerfile.ubuntu2204 b/connect/Dockerfile.ubuntu2204 index 0bffaf227..8d092a88c 100644 --- a/connect/Dockerfile.ubuntu2204 +++ b/connect/Dockerfile.ubuntu2204 @@ -13,7 +13,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 RSC_VERSION=2023.12.0 +ARG RSC_VERSION=2024.01.0 SHELL [ "/bin/bash", "-o", "pipefail", "-c"] RUN apt-get update --fix-missing \ && apt-get install -yq --no-install-recommends \ diff --git a/connect/Justfile b/connect/Justfile index 4d30c08a1..ccf4af8e7 100644 --- a/connect/Justfile +++ b/connect/Justfile @@ -6,7 +6,7 @@ IMAGE_PREFIX := "rstudio-" PRODUCT := "connect" IMAGE_OS := "ubuntu2204" -RSC_VERSION := "2023.12.0" +RSC_VERSION := "2024.01.0" RSC_LICENSE := "" RSC_LICENSE_SERVER := "" diff --git a/connect/README.md b/connect/README.md index 75f8352be..23add18a2 100644 --- a/connect/README.md +++ b/connect/README.md @@ -7,7 +7,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2023.12.0`, `ubuntu2204-2023.12.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.01.0`, `ubuntu2204-2024.01.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) # What is Posit Connect? diff --git a/docker-compose.yml b/docker-compose.yml index abf4c56be..36db571d3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -25,8 +25,8 @@ services: context: ./connect dockerfile: "Dockerfile.${IMAGE_OS:-ubuntu1804}" args: - RSC_VERSION: 2023.12.0 - image: rstudio/rstudio-connect:2023.12.0 + RSC_VERSION: 2024.01.0 + image: rstudio/rstudio-connect:2024.01.0 privileged: true environment: RSC_LICENSE: ${RSC_LICENSE} From dc8b596c3cc0002430fe096961d42a41f5e8dac4 Mon Sep 17 00:00:00 2001 From: GCRev Date: Tue, 30 Jan 2024 20:50:14 +0000 Subject: [PATCH 022/165] Bump PWB to 2023.12.1+402.pro1 --- Justfile | 2 +- docker-compose.yml | 2 +- r-session-complete/.env | 2 +- r-session-complete/Dockerfile.centos7 | 2 +- r-session-complete/Dockerfile.ubuntu2204 | 2 +- r-session-complete/Justfile | 2 +- r-session-complete/README.md | 2 +- workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 | 2 +- workbench-for-microsoft-azure-ml/.env | 2 +- workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 | 2 +- workbench-for-microsoft-azure-ml/Justfile | 2 +- workbench/.env | 2 +- workbench/Dockerfile.ubuntu2204 | 2 +- workbench/Justfile | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Justfile b/Justfile index 3740c7003..1138e93c7 100644 --- a/Justfile +++ b/Justfile @@ -8,7 +8,7 @@ BUILDX_PATH := "" RSC_VERSION := "2023.12.0" RSPM_VERSION := "2023.12.0-13" -RSW_VERSION := "2023.12.0+369.pro3" +RSW_VERSION := "2023.12.1+402.pro1" DRIVERS_VERSION := "2023.05.0" DRIVERS_VERSION_RHEL := DRIVERS_VERSION + "-1" diff --git a/docker-compose.yml b/docker-compose.yml index abf4c56be..0b502bc9c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,7 +7,7 @@ services: context: ./workbench dockerfile: "Dockerfile.${IMAGE_OS:-ubuntu2204}" args: - RSW_VERSION: 2023.12.0+369.pro3 + RSW_VERSION: 2023.12.1+402.pro1 image: rstudio/rstudio-workbench:2023.12.0 environment: RSW_LICENSE: ${RSW_LICENSE} diff --git a/r-session-complete/.env b/r-session-complete/.env index 346abb8b9..1931d7fec 100644 --- a/r-session-complete/.env +++ b/r-session-complete/.env @@ -1,4 +1,4 @@ R_VERSION=4.1.0 PYTHON_VERSION=3.9.5 DRIVERS_VERSION=2023.05.0-1 -RSW_VERSION=2023.12.0+369.pro3 +RSW_VERSION=2023.12.1+402.pro1 diff --git a/r-session-complete/Dockerfile.centos7 b/r-session-complete/Dockerfile.centos7 index 5de5ee496..ae766c0ba 100644 --- a/r-session-complete/Dockerfile.centos7 +++ b/r-session-complete/Dockerfile.centos7 @@ -12,7 +12,7 @@ ARG R_VERSION_ALT=4.1.3 ARG PYTHON_VERSION=3.9.14 ARG PYTHON_VERSION_ALT=3.8.15 ARG JUPYTERLAB_VERSION=3.2.9 -ARG RSW_VERSION=2023.12.0+369.pro3 +ARG RSW_VERSION=2023.12.1+402.pro1 ARG RSW_NAME=rstudio-workbench-rhel ARG RSW_DOWNLOAD_URL=https://s3.amazonaws.com/rstudio-ide-build/server/centos7/x86_64 diff --git a/r-session-complete/Dockerfile.ubuntu2204 b/r-session-complete/Dockerfile.ubuntu2204 index 519fb444c..1f3018b24 100644 --- a/r-session-complete/Dockerfile.ubuntu2204 +++ b/r-session-complete/Dockerfile.ubuntu2204 @@ -13,7 +13,7 @@ ARG R_VERSION_ALT=4.1.3 ARG PYTHON_VERSION=3.9.17 ARG PYTHON_VERSION_ALT=3.8.17 ARG JUPYTERLAB_VERSION=3.6.5 -ARG RSW_VERSION=2023.12.0+369.pro3 +ARG RSW_VERSION=2023.12.1+402.pro1 ARG RSW_NAME=rstudio-workbench ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64 diff --git a/r-session-complete/Justfile b/r-session-complete/Justfile index f2214aea9..736425275 100755 --- a/r-session-complete/Justfile +++ b/r-session-complete/Justfile @@ -6,7 +6,7 @@ IMAGE_PREFIX := "" PRODUCT := "r-session-complete" IMAGE_OS := "ubuntu2204" -RSW_VERSION := "2023.12.0+369.pro3" +RSW_VERSION := "2023.12.1+402.pro1" RSW_LICENSE := "" DRIVERS_VERSION := "2023.05.0" diff --git a/r-session-complete/README.md b/r-session-complete/README.md index 44a6ca582..d30dbacf6 100644 --- a/r-session-complete/README.md +++ b/r-session-complete/README.md @@ -7,7 +7,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2023.12.0`, `ubuntu2204-2023.12.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/r-session-complete/Dockerfile.ubuntu2204) +* [`jammy`, `ubuntu2204`, `jammy-2023.12.1`, `ubuntu2204-2023.12.1`](https://github.com/rstudio/rstudio-docker-products/blob/main/r-session-complete/Dockerfile.ubuntu2204) # What are the r-session-complete images? diff --git a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 index cb5e38c27..f6de98942 100644 --- a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 +++ b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 @@ -10,7 +10,7 @@ ARG PYTHON_VERSION_JUPYTER=3.10.13 ARG JUPYTERLAB_VERSION=3.6.5 ARG QUARTO_VERSION=1.3.450 ARG DRIVERS_VERSION=2023.05.0 -ARG RSW_VERSION=2023.12.0+369.pro3 +ARG RSW_VERSION=2023.12.1+402.pro1 ARG RSW_NAME=rstudio-workbench ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/focal/amd64 diff --git a/workbench-for-microsoft-azure-ml/.env b/workbench-for-microsoft-azure-ml/.env index afaf34958..a66dd5159 100644 --- a/workbench-for-microsoft-azure-ml/.env +++ b/workbench-for-microsoft-azure-ml/.env @@ -1,4 +1,4 @@ -RSW_VERSION=2023.12.0+369.pro3 +RSW_VERSION=2023.12.1+402.pro1 RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/bionic/amd64 RSW_NAME=rstudio-workbench PYTHON_VERSION=3.9.14 diff --git a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 index deb148eed..f3f0dc965 100644 --- a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 +++ b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 @@ -14,7 +14,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.5 -ARG RSW_VERSION=2023.12.0+369.pro3 +ARG RSW_VERSION=2023.12.1+402.pro1 ARG RSW_NAME=rstudio-workbench ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64 ARG DEBIAN_FRONTEND=noninteractive diff --git a/workbench-for-microsoft-azure-ml/Justfile b/workbench-for-microsoft-azure-ml/Justfile index 6dc3242f7..cd9a2fa08 100644 --- a/workbench-for-microsoft-azure-ml/Justfile +++ b/workbench-for-microsoft-azure-ml/Justfile @@ -6,7 +6,7 @@ IMAGE_PREFIX := "rstudio-" PRODUCT := "workbench" IMAGE_OS := "ubuntu2204" -RSW_VERSION := "2023.12.0+369.pro3" +RSW_VERSION := "2023.12.1+402.pro1" RSW_LICENSE := "" R_VERSION := "4.2.3" diff --git a/workbench/.env b/workbench/.env index 586074222..075b94b74 100644 --- a/workbench/.env +++ b/workbench/.env @@ -1,4 +1,4 @@ -RSW_VERSION=2023.12.0+369.pro3 +RSW_VERSION=2023.12.1+402.pro1 RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/bionic/amd64 RSW_NAME=rstudio-workbench PYTHON_VERSION=3.9.17 diff --git a/workbench/Dockerfile.ubuntu2204 b/workbench/Dockerfile.ubuntu2204 index 8fd8f1d82..64edfed12 100644 --- a/workbench/Dockerfile.ubuntu2204 +++ b/workbench/Dockerfile.ubuntu2204 @@ -14,7 +14,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.5 -ARG RSW_VERSION=2023.12.0+369.pro3 +ARG RSW_VERSION=2023.12.1+402.pro1 ARG RSW_NAME=rstudio-workbench ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64 diff --git a/workbench/Justfile b/workbench/Justfile index 6202f6747..785e0ad75 100644 --- a/workbench/Justfile +++ b/workbench/Justfile @@ -6,7 +6,7 @@ IMAGE_PREFIX := "rstudio-" PRODUCT := "workbench" IMAGE_OS := "ubuntu2204" -RSW_VERSION := "2023.12.0+369.pro3" +RSW_VERSION := "2023.12.1+402.pro1" RSW_RELEASE_TYPE := "release" RSW_LICENSE := "" RSW_LICENSE_SERVER := "" From 43c909e27f6a21bfa9f839ad895fea02f66704d3 Mon Sep 17 00:00:00 2001 From: GCRev Date: Tue, 30 Jan 2024 21:25:36 +0000 Subject: [PATCH 023/165] Update .env in GCP folder and README in workbench folder --- workbench-for-google-cloud-workstations/.env | 4 ++-- workbench/README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/workbench-for-google-cloud-workstations/.env b/workbench-for-google-cloud-workstations/.env index fbc18f37d..f87a5c6be 100644 --- a/workbench-for-google-cloud-workstations/.env +++ b/workbench-for-google-cloud-workstations/.env @@ -1,5 +1,5 @@ -RSW_VERSION=2023.09.1+494.pro2 -RSW_TAG_VERSION=2023.09.1-494.pro2 +RSW_VERSION=2023.12.1+402.pro1 +RSW_TAG_VERSION=2023.12.1-402.pro1 RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/focal/amd64 RSW_NAME=rstudio-workbench PYTHON_VERSION=3.10.13 diff --git a/workbench/README.md b/workbench/README.md index e72c4b245..f5daeabfa 100644 --- a/workbench/README.md +++ b/workbench/README.md @@ -7,7 +7,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2023.12.0`, `ubuntu2204-2023.12.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/workbench/Dockerfile.ubuntu2204) +* [`jammy`, `ubuntu2204`, `jammy-2023.12.1`, `ubuntu2204-2023.12.1`](https://github.com/rstudio/rstudio-docker-products/blob/main/workbench/Dockerfile.ubuntu2204) # What is RStudio Workbench? From 3f27e4632f162ef3233b6bc159c9e8d246de1c7f Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Thu, 1 Feb 2024 07:37:15 -0800 Subject: [PATCH 024/165] Update Pro Drivers to 2023.12.1 --- NEWS.md | 4 +++ ci.Justfile | 2 +- content/matrix.json | 42 +++++++++++++++---------------- content/pro/Dockerfile.ubuntu1804 | 2 +- content/pro/Dockerfile.ubuntu2204 | 2 +- content/pro/Justfile | 2 +- product/pro/Dockerfile.centos7 | 2 +- product/pro/Dockerfile.ubuntu2204 | 2 +- product/pro/Justfile | 2 +- r-session-complete/.env | 2 +- r-session-complete/Justfile | 2 +- 11 files changed, 34 insertions(+), 30 deletions(-) diff --git a/NEWS.md b/NEWS.md index d4235cc11..fbd90b48e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -5,6 +5,10 @@ changed in each image. This file only captures pervasive, repository-wide changes. +# 2024-02-01 + +- Update Pro Drivers to 2023.12.1 + # 2023-08-07 - Removed base image Ubuntu 18.04 builds. diff --git a/ci.Justfile b/ci.Justfile index ebcbdd3b2..65da96b03 100644 --- a/ci.Justfile +++ b/ci.Justfile @@ -9,7 +9,7 @@ R_VERSION_ALT := "4.1.3" PYTHON_VERSION := "3.9.17" PYTHON_VERSION_ALT := "3.8.17" -DRIVERS_VERSION := "2023.05.0" +DRIVERS_VERSION := "2023.12.1" DRIVERS_VERSION_RHEL := DRIVERS_VERSION + "-1" QUARTO_VERSION := "1.3.340" diff --git a/content/matrix.json b/content/matrix.json index bbe08b33d..4f84c28dc 100644 --- a/content/matrix.json +++ b/content/matrix.json @@ -1,23 +1,23 @@ [ - {"r": "3.1.3", "py": "2.7.18", "drivers": "2023.05.0", "os": "ubuntu1804", "os_alt": "bionic"}, - {"r": "3.2.5", "py": "2.7.18", "drivers": "2023.05.0", "os": "ubuntu1804", "os_alt": "bionic"}, - {"r": "3.3.3", "py": "3.6.13", "drivers": "2023.05.0", "os": "ubuntu1804", "os_alt": "bionic"}, - {"r": "3.4.4", "py": "3.6.13", "drivers": "2023.05.0", "os": "ubuntu1804", "os_alt": "bionic"}, - {"r": "3.4.4", "py": "3.7.10", "drivers": "2023.05.0", "os": "ubuntu1804", "os_alt": "bionic"}, - {"r": "3.5.3", "py": "2.7.18", "drivers": "2023.05.0", "os": "ubuntu1804", "os_alt": "bionic"}, - {"r": "3.5.3", "py": "3.7.10", "drivers": "2023.05.0", "os": "ubuntu1804", "os_alt": "bionic"}, - {"r": "3.6.3", "py": "2.7.18", "drivers": "2023.05.0", "os": "ubuntu1804", "os_alt": "bionic"}, - {"r": "3.6.3", "py": "3.6.13", "drivers": "2023.05.0", "os": "ubuntu1804", "os_alt": "bionic"}, - {"r": "3.6.3", "py": "3.8.8", "drivers": "2023.05.0", "os": "ubuntu1804", "os_alt": "bionic"}, - {"r": "4.0.5", "py": "3.6.13", "drivers": "2023.05.0", "os": "ubuntu1804", "os_alt": "bionic"}, - {"r": "4.0.5", "py": "3.7.10", "drivers": "2023.05.0", "os": "ubuntu1804", "os_alt": "bionic"}, - {"r": "4.0.5", "py": "3.8.8", "drivers": "2023.05.0", "os": "ubuntu1804", "os_alt": "bionic"}, - {"r": "4.0.5", "py": "3.9.2", "drivers": "2023.05.0", "os": "ubuntu1804", "os_alt": "bionic"}, - {"r": "4.1.0", "py": "3.8.8", "drivers": "2023.05.0", "os": "ubuntu1804", "os_alt": "bionic"}, - {"r": "4.1.0", "py": "3.9.2", "drivers": "2023.05.0", "os": "ubuntu1804", "os_alt": "bionic"}, - {"r": "4.1.3", "py": "3.10.4", "drivers": "2023.05.0", "os": "ubuntu1804", "os_alt": "bionic"}, - {"r": "3.6.3", "py": "3.8.16", "drivers": "2023.05.0", "os": "ubuntu2204", "os_alt": "jammy"}, - {"r": "4.0.5", "py": "3.9.16", "drivers": "2023.05.0", "os": "ubuntu2204", "os_alt": "jammy"}, - {"r": "4.1.3", "py": "3.10.11", "drivers": "2023.05.0", "os": "ubuntu2204", "os_alt": "jammy"}, - {"r": "4.2.2", "py": "3.11.3", "drivers": "2023.05.0", "os": "ubuntu2204", "os_alt": "jammy"} + {"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"} ] diff --git a/content/pro/Dockerfile.ubuntu1804 b/content/pro/Dockerfile.ubuntu1804 index a14ac3657..feb9d6597 100644 --- a/content/pro/Dockerfile.ubuntu1804 +++ b/content/pro/Dockerfile.ubuntu1804 @@ -6,7 +6,7 @@ FROM ${REGISTRY}/rstudio/content-base:r${R_VERSION}-py${PYTHON_VERSION}-ubuntu18 LABEL maintainer="RStudio Docker " # Install RStudio Professional Drivers ----------------------------------------# -ARG DRIVERS_VERSION=2023.05.0 +ARG DRIVERS_VERSION=2023.12.1 ARG R_VERSION ARG DEBIAN_FRONTEND=noninteractive diff --git a/content/pro/Dockerfile.ubuntu2204 b/content/pro/Dockerfile.ubuntu2204 index ce61df893..afbf342b9 100644 --- a/content/pro/Dockerfile.ubuntu2204 +++ b/content/pro/Dockerfile.ubuntu2204 @@ -6,7 +6,7 @@ FROM ${REGISTRY}/rstudio/content-base:r${R_VERSION}-py${PYTHON_VERSION}-ubuntu22 LABEL maintainer="RStudio Docker " # Install RStudio Professional Drivers ----------------------------------------# -ARG DRIVERS_VERSION=2023.05.0 +ARG DRIVERS_VERSION=2023.12.1 ARG R_VERSION ARG DEBIAN_FRONTEND=noninteractive diff --git a/content/pro/Justfile b/content/pro/Justfile index 710d6509c..d43ae361b 100755 --- a/content/pro/Justfile +++ b/content/pro/Justfile @@ -10,7 +10,7 @@ R_VERSION := "3.6.3" PYTHON_VERSION := "3.9.5" -DRIVERS_VERSION := "2023.05.0" +DRIVERS_VERSION := "2023.12.1" DRIVERS_VERSION_RHEL := DRIVERS_VERSION + "-1" DEFAULT_TAG := IMAGE_PREFIX + PRODUCT + ":r" + R_VERSION + "-py" + PYTHON_VERSION + "-" + IMAGE_OS diff --git a/product/pro/Dockerfile.centos7 b/product/pro/Dockerfile.centos7 index 641a3fd41..f342b95c3 100644 --- a/product/pro/Dockerfile.centos7 +++ b/product/pro/Dockerfile.centos7 @@ -11,7 +11,7 @@ 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.05.0-1 +ARG DRIVERS_VERSION=2023.12.1-1 RUN yum update -y \ && yum install -y unixODBC unixODBC-devel \ diff --git a/product/pro/Dockerfile.ubuntu2204 b/product/pro/Dockerfile.ubuntu2204 index 10f0981c4..892d99e4d 100644 --- a/product/pro/Dockerfile.ubuntu2204 +++ b/product/pro/Dockerfile.ubuntu2204 @@ -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.05.0 +ARG DRIVERS_VERSION=2023.12.1 RUN apt-get update \ && apt-get install -yq --no-install-recommends unixodbc unixodbc-dev \ diff --git a/product/pro/Justfile b/product/pro/Justfile index 354c65466..cbee4b363 100644 --- a/product/pro/Justfile +++ b/product/pro/Justfile @@ -16,7 +16,7 @@ PYTHON_VERSION_ALT := "3.8.17" TINI_VERSION := "0.19.0" QUARTO_VERSION := "1.3.340" -DRIVERS_VERSION := "2023.05.0" +DRIVERS_VERSION := "2023.12.1" DRIVERS_VERSION_RHEL := DRIVERS_VERSION + "-1" _make-default-tag OS=IMAGE_OS: diff --git a/r-session-complete/.env b/r-session-complete/.env index 346abb8b9..ac43338be 100644 --- a/r-session-complete/.env +++ b/r-session-complete/.env @@ -1,4 +1,4 @@ R_VERSION=4.1.0 PYTHON_VERSION=3.9.5 -DRIVERS_VERSION=2023.05.0-1 +DRIVERS_VERSION=2023.12.1-1 RSW_VERSION=2023.12.0+369.pro3 diff --git a/r-session-complete/Justfile b/r-session-complete/Justfile index f2214aea9..85fdc082b 100755 --- a/r-session-complete/Justfile +++ b/r-session-complete/Justfile @@ -9,7 +9,7 @@ IMAGE_OS := "ubuntu2204" RSW_VERSION := "2023.12.0+369.pro3" RSW_LICENSE := "" -DRIVERS_VERSION := "2023.05.0" +DRIVERS_VERSION := "2023.12.1" DRIVERS_VERSION_RHEL := DRIVERS_VERSION + "-1" R_VERSION := "4.2.3" From c73641b730407faefbc4a94f97539739c9bfef7e Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Thu, 1 Feb 2024 10:13:56 -0800 Subject: [PATCH 025/165] Remove R 3.6.3 from Workbench for AML --- workbench-for-microsoft-azure-ml/NEWS.md | 4 ++++ workbench-for-microsoft-azure-ml/deps/install-r.sh | 2 +- workbench-for-microsoft-azure-ml/deps/r_packages.txt | 1 - workbench-for-microsoft-azure-ml/test/goss.yaml | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/workbench-for-microsoft-azure-ml/NEWS.md b/workbench-for-microsoft-azure-ml/NEWS.md index fc0a73812..21e9c1a60 100644 --- a/workbench-for-microsoft-azure-ml/NEWS.md +++ b/workbench-for-microsoft-azure-ml/NEWS.md @@ -1,3 +1,7 @@ +# 2024.02.1 +- Remove R 3.6.3 from image +- Bump R versions to latest patches + # 2023.03.1 - No changes diff --git a/workbench-for-microsoft-azure-ml/deps/install-r.sh b/workbench-for-microsoft-azure-ml/deps/install-r.sh index 5765a06ae..996206149 100755 --- a/workbench-for-microsoft-azure-ml/deps/install-r.sh +++ b/workbench-for-microsoft-azure-ml/deps/install-r.sh @@ -29,7 +29,7 @@ install_r_packages() { } -for rvers in 3.6.3 4.0.5 4.1.3 4.2.3 4.3.1; do +for rvers in 4.0.5 4.1.3 4.2.3 4.3.2; do # install r version curl -O https://cdn.rstudio.com/r/ubuntu-$(lsb_release -rs | sed 's/\.//g')/pkgs/r-${rvers}_1_amd64.deb DEBIAN_FRONTEND=noninteractive apt-get install -y ./r-${rvers}_1_amd64.deb diff --git a/workbench-for-microsoft-azure-ml/deps/r_packages.txt b/workbench-for-microsoft-azure-ml/deps/r_packages.txt index 64fe3f36a..e9ccebc59 100644 --- a/workbench-for-microsoft-azure-ml/deps/r_packages.txt +++ b/workbench-for-microsoft-azure-ml/deps/r_packages.txt @@ -46,7 +46,6 @@ readr readxl renv reticulate -rgdal rlang rmarkdown roxygen2 diff --git a/workbench-for-microsoft-azure-ml/test/goss.yaml b/workbench-for-microsoft-azure-ml/test/goss.yaml index fea15bccf..52f9b01be 100644 --- a/workbench-for-microsoft-azure-ml/test/goss.yaml +++ b/workbench-for-microsoft-azure-ml/test/goss.yaml @@ -131,7 +131,7 @@ 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/3.6.3/bin/R" "/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.1/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. # notably, it also ensures that each expected R version exists and is runnable From e4793e8d66e30a1cfaa25faec0ac1b8a4e968106 Mon Sep 17 00:00:00 2001 From: Pablo Bianco Lascaray Date: Tue, 27 Feb 2024 16:18:30 -0500 Subject: [PATCH 026/165] Bump Connect to version 2024.02.0 --- Justfile | 2 +- connect-content-init/Dockerfile.ubuntu2204 | 2 +- connect-content-init/Justfile | 2 +- connect-content-init/README.md | 6 +++--- connect/.env | 2 +- connect/Dockerfile.ubuntu2204 | 2 +- connect/Justfile | 2 +- connect/README.md | 2 +- docker-compose.yml | 4 ++-- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Justfile b/Justfile index ee975baaa..591527882 100644 --- a/Justfile +++ b/Justfile @@ -6,7 +6,7 @@ sed_vars := if os() == "macos" { "-i ''" } else { "-i" } BUILDX_PATH := "" -RSC_VERSION := "2024.01.0" +RSC_VERSION := "2024.02.0" RSPM_VERSION := "2023.12.0-13" RSW_VERSION := "2023.12.1+402.pro1" diff --git a/connect-content-init/Dockerfile.ubuntu2204 b/connect-content-init/Dockerfile.ubuntu2204 index 9f58675b6..ac1e8be53 100644 --- a/connect-content-init/Dockerfile.ubuntu2204 +++ b/connect-content-init/Dockerfile.ubuntu2204 @@ -10,7 +10,7 @@ RUN apt-get update && \ apt-get install -y --no-install-recommends ca-certificates curl && \ rm -rf /var/lib/apt/lists/* -ARG RSC_VERSION=2024.01.0 +ARG RSC_VERSION=2024.02.0 SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN mkdir -p /rsc-staging && \ RSC_VERSION_URL=$(echo -n "${RSC_VERSION}" | sed 's/+/%2B/g') && \ diff --git a/connect-content-init/Justfile b/connect-content-init/Justfile index e2df1bae3..3c59f2c92 100644 --- a/connect-content-init/Justfile +++ b/connect-content-init/Justfile @@ -6,7 +6,7 @@ IMAGE_PREFIX := "rstudio-" PRODUCT := "connect-content-init" IMAGE_OS := "ubuntu2204" -RSC_VERSION := "2024.01.0" +RSC_VERSION := "2024.02.0" RSC_TAG_SAFE_VERSION := replace(RSC_VERSION, "+", "-") RSC_LICENSE := "" diff --git a/connect-content-init/README.md b/connect-content-init/README.md index 36373b58f..227fbca80 100644 --- a/connect-content-init/README.md +++ b/connect-content-init/README.md @@ -9,7 +9,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2024.01.0`, `ubuntu2204-2024.01.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.02.0`, `ubuntu2204-2024.02.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) # RStudio Connect Content Init Container @@ -31,7 +31,7 @@ The version of the release package to use can be overridden with the `RSC_VERSION` build arg. ```console -just build ubuntu2204 2024.01.0 +just build ubuntu2204 2024.02.0 ``` ## Testing @@ -56,7 +56,7 @@ just test You can see the different layers that make up the image: ```console -docker history rstudio/rstudio-connect-content-init-preview:2024.01.0-dev-326 +docker history rstudio/rstudio-connect-content-init-preview:2024.02.0-dev-326 ``` NOTE: almost all the image size is pandoc. diff --git a/connect/.env b/connect/.env index f936ca2ca..3f85fe19d 100644 --- a/connect/.env +++ b/connect/.env @@ -1,4 +1,4 @@ -RSC_VERSION=2024.01.0 +RSC_VERSION=2024.02.0 R_VERSION=4.2.3 R_VERSION_ALT=4.1.3 PYTHON_VERSION=3.9.17 diff --git a/connect/Dockerfile.ubuntu2204 b/connect/Dockerfile.ubuntu2204 index 8d092a88c..ead6a71d9 100644 --- a/connect/Dockerfile.ubuntu2204 +++ b/connect/Dockerfile.ubuntu2204 @@ -13,7 +13,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 RSC_VERSION=2024.01.0 +ARG RSC_VERSION=2024.02.0 SHELL [ "/bin/bash", "-o", "pipefail", "-c"] RUN apt-get update --fix-missing \ && apt-get install -yq --no-install-recommends \ diff --git a/connect/Justfile b/connect/Justfile index ccf4af8e7..29503409b 100644 --- a/connect/Justfile +++ b/connect/Justfile @@ -6,7 +6,7 @@ IMAGE_PREFIX := "rstudio-" PRODUCT := "connect" IMAGE_OS := "ubuntu2204" -RSC_VERSION := "2024.01.0" +RSC_VERSION := "2024.02.0" RSC_LICENSE := "" RSC_LICENSE_SERVER := "" diff --git a/connect/README.md b/connect/README.md index 23add18a2..f2514fa0d 100644 --- a/connect/README.md +++ b/connect/README.md @@ -7,7 +7,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2024.01.0`, `ubuntu2204-2024.01.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.02.0`, `ubuntu2204-2024.02.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) # What is Posit Connect? diff --git a/docker-compose.yml b/docker-compose.yml index f2c692c3e..149b95df2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -25,8 +25,8 @@ services: context: ./connect dockerfile: "Dockerfile.${IMAGE_OS:-ubuntu1804}" args: - RSC_VERSION: 2024.01.0 - image: rstudio/rstudio-connect:2024.01.0 + RSC_VERSION: 2024.02.0 + image: rstudio/rstudio-connect:2024.02.0 privileged: true environment: RSC_LICENSE: ${RSC_LICENSE} From 22ab1c235ae96f946767c0a15b12561fda4e2f93 Mon Sep 17 00:00:00 2001 From: Pablo Bianco Lascaray Date: Tue, 27 Feb 2024 16:18:34 -0500 Subject: [PATCH 027/165] Bump Connect to version 2024.02.0 --- Justfile | 2 +- connect-content-init/Dockerfile.ubuntu2204 | 2 +- connect-content-init/Justfile | 2 +- connect-content-init/README.md | 6 +++--- connect/.env | 2 +- connect/Dockerfile.ubuntu2204 | 2 +- connect/Justfile | 2 +- connect/README.md | 2 +- docker-compose.yml | 4 ++-- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Justfile b/Justfile index ee975baaa..591527882 100644 --- a/Justfile +++ b/Justfile @@ -6,7 +6,7 @@ sed_vars := if os() == "macos" { "-i ''" } else { "-i" } BUILDX_PATH := "" -RSC_VERSION := "2024.01.0" +RSC_VERSION := "2024.02.0" RSPM_VERSION := "2023.12.0-13" RSW_VERSION := "2023.12.1+402.pro1" diff --git a/connect-content-init/Dockerfile.ubuntu2204 b/connect-content-init/Dockerfile.ubuntu2204 index 9f58675b6..ac1e8be53 100644 --- a/connect-content-init/Dockerfile.ubuntu2204 +++ b/connect-content-init/Dockerfile.ubuntu2204 @@ -10,7 +10,7 @@ RUN apt-get update && \ apt-get install -y --no-install-recommends ca-certificates curl && \ rm -rf /var/lib/apt/lists/* -ARG RSC_VERSION=2024.01.0 +ARG RSC_VERSION=2024.02.0 SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN mkdir -p /rsc-staging && \ RSC_VERSION_URL=$(echo -n "${RSC_VERSION}" | sed 's/+/%2B/g') && \ diff --git a/connect-content-init/Justfile b/connect-content-init/Justfile index e2df1bae3..3c59f2c92 100644 --- a/connect-content-init/Justfile +++ b/connect-content-init/Justfile @@ -6,7 +6,7 @@ IMAGE_PREFIX := "rstudio-" PRODUCT := "connect-content-init" IMAGE_OS := "ubuntu2204" -RSC_VERSION := "2024.01.0" +RSC_VERSION := "2024.02.0" RSC_TAG_SAFE_VERSION := replace(RSC_VERSION, "+", "-") RSC_LICENSE := "" diff --git a/connect-content-init/README.md b/connect-content-init/README.md index 36373b58f..227fbca80 100644 --- a/connect-content-init/README.md +++ b/connect-content-init/README.md @@ -9,7 +9,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2024.01.0`, `ubuntu2204-2024.01.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.02.0`, `ubuntu2204-2024.02.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) # RStudio Connect Content Init Container @@ -31,7 +31,7 @@ The version of the release package to use can be overridden with the `RSC_VERSION` build arg. ```console -just build ubuntu2204 2024.01.0 +just build ubuntu2204 2024.02.0 ``` ## Testing @@ -56,7 +56,7 @@ just test You can see the different layers that make up the image: ```console -docker history rstudio/rstudio-connect-content-init-preview:2024.01.0-dev-326 +docker history rstudio/rstudio-connect-content-init-preview:2024.02.0-dev-326 ``` NOTE: almost all the image size is pandoc. diff --git a/connect/.env b/connect/.env index f936ca2ca..3f85fe19d 100644 --- a/connect/.env +++ b/connect/.env @@ -1,4 +1,4 @@ -RSC_VERSION=2024.01.0 +RSC_VERSION=2024.02.0 R_VERSION=4.2.3 R_VERSION_ALT=4.1.3 PYTHON_VERSION=3.9.17 diff --git a/connect/Dockerfile.ubuntu2204 b/connect/Dockerfile.ubuntu2204 index 8d092a88c..ead6a71d9 100644 --- a/connect/Dockerfile.ubuntu2204 +++ b/connect/Dockerfile.ubuntu2204 @@ -13,7 +13,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 RSC_VERSION=2024.01.0 +ARG RSC_VERSION=2024.02.0 SHELL [ "/bin/bash", "-o", "pipefail", "-c"] RUN apt-get update --fix-missing \ && apt-get install -yq --no-install-recommends \ diff --git a/connect/Justfile b/connect/Justfile index ccf4af8e7..29503409b 100644 --- a/connect/Justfile +++ b/connect/Justfile @@ -6,7 +6,7 @@ IMAGE_PREFIX := "rstudio-" PRODUCT := "connect" IMAGE_OS := "ubuntu2204" -RSC_VERSION := "2024.01.0" +RSC_VERSION := "2024.02.0" RSC_LICENSE := "" RSC_LICENSE_SERVER := "" diff --git a/connect/README.md b/connect/README.md index 23add18a2..f2514fa0d 100644 --- a/connect/README.md +++ b/connect/README.md @@ -7,7 +7,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2024.01.0`, `ubuntu2204-2024.01.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.02.0`, `ubuntu2204-2024.02.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) # What is Posit Connect? diff --git a/docker-compose.yml b/docker-compose.yml index f2c692c3e..149b95df2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -25,8 +25,8 @@ services: context: ./connect dockerfile: "Dockerfile.${IMAGE_OS:-ubuntu1804}" args: - RSC_VERSION: 2024.01.0 - image: rstudio/rstudio-connect:2024.01.0 + RSC_VERSION: 2024.02.0 + image: rstudio/rstudio-connect:2024.02.0 privileged: true environment: RSC_LICENSE: ${RSC_LICENSE} From bd34b85419de4af5f05fc56b46138284d9c8c35b Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Fri, 1 Mar 2024 12:16:05 -0500 Subject: [PATCH 028/165] update quarto to 1.4.550 --- Justfile | 2 +- NEWS.md | 4 ++++ ci.Justfile | 2 +- connect/NEWS.md | 4 ++++ connect/rstudio-connect.gcfg | 2 +- content/base/Dockerfile.ubuntu2204 | 2 +- content/base/Justfile | 2 +- content/base/NEWS.md | 4 ++++ content/base/maybe_install_quarto.sh | 4 ++-- product/base/Dockerfile.centos7 | 2 +- product/base/Dockerfile.ubuntu2204 | 2 +- product/base/Justfile | 2 +- product/pro/Justfile | 2 +- workbench-for-google-cloud-workstations/.env | 2 +- workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 | 2 +- 15 files changed, 25 insertions(+), 13 deletions(-) diff --git a/Justfile b/Justfile index 591527882..6f5d25fd7 100644 --- a/Justfile +++ b/Justfile @@ -21,7 +21,7 @@ PYTHON_VERSION_ALT := "3.8.17" PYTHON_VERSION_RHEL := "3.9.14" PYTHON_VERSION_ALT_RHEL := "3.8.15" -QUARTO_VERSION := "1.3.450" +QUARTO_VERSION := "1.4.550" # just _get-tag-safe-version 2022.07.2+576.pro12 _get-tag-safe-version $VERSION: diff --git a/NEWS.md b/NEWS.md index fbd90b48e..7ca614e20 100644 --- a/NEWS.md +++ b/NEWS.md @@ -5,6 +5,10 @@ changed in each image. This file only captures pervasive, repository-wide changes. +# 2024-03-01 + +- BREAKING: Update Quarto version to 1.4.550 + # 2024-02-01 - Update Pro Drivers to 2023.12.1 diff --git a/ci.Justfile b/ci.Justfile index 65da96b03..c1447b6be 100644 --- a/ci.Justfile +++ b/ci.Justfile @@ -12,7 +12,7 @@ PYTHON_VERSION_ALT := "3.8.17" DRIVERS_VERSION := "2023.12.1" DRIVERS_VERSION_RHEL := DRIVERS_VERSION + "-1" -QUARTO_VERSION := "1.3.340" +QUARTO_VERSION := "1.4.550" # just _get-os-alias jammy _get-os-alias OS: diff --git a/connect/NEWS.md b/connect/NEWS.md index 812a78cdf..bdef561d9 100644 --- a/connect/NEWS.md +++ b/connect/NEWS.md @@ -1,3 +1,7 @@ +# 2024-03-01 + +- BREAKING: Update Quarto version to 1.4.550 + # 2023-08-01 - BREAKING: Removed R 3.6.2, replaced with R 4.1.3. - Updated R 4.2.0 to 4.2.3. diff --git a/connect/rstudio-connect.gcfg b/connect/rstudio-connect.gcfg index 376d08c21..d06c6ce8a 100644 --- a/connect/rstudio-connect.gcfg +++ b/connect/rstudio-connect.gcfg @@ -35,7 +35,7 @@ Executable = /opt/python/{{PYTHON_VERSION_ALT}}/bin/python [Quarto] Enabled = true -Executable = /opt/quarto/1.3.340/bin/quarto +Executable = /opt/quarto/1.4.550/bin/quarto [RPackageRepository "CRAN"] URL = https://packagemanager.rstudio.com/cran/__linux__/jammy/latest diff --git a/content/base/Dockerfile.ubuntu2204 b/content/base/Dockerfile.ubuntu2204 index 030eab0b9..9fd5571eb 100644 --- a/content/base/Dockerfile.ubuntu2204 +++ b/content/base/Dockerfile.ubuntu2204 @@ -117,7 +117,7 @@ RUN curl -O https://cdn.rstudio.com/python/${DISTRIBUTION}/pkgs/python-${PYTHON_ && /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install --upgrade setuptools # install quarto -ARG QUARTO_VERSION=1.3.340 +ARG QUARTO_VERSION=1.4.550 COPY maybe_install_quarto.sh /tmp/maybe_install_quarto.sh RUN /opt/R/${R_VERSION}/bin/R -e 'install.packages("odbc", repos="https://packagemanager.rstudio.com/cran/__linux__/bionic/latest")' \ && /tmp/maybe_install_quarto.sh \ diff --git a/content/base/Justfile b/content/base/Justfile index a1defbf8a..a76eb9b55 100755 --- a/content/base/Justfile +++ b/content/base/Justfile @@ -10,7 +10,7 @@ R_VERSION := "3.6.3" PYTHON_VERSION := "3.9.5" -QUARTO_VERSION := "1.3.340" +QUARTO_VERSION := "1.4.550" DEFAULT_TAG := IMAGE_PREFIX + PRODUCT + ":r" + R_VERSION + "-py" + PYTHON_VERSION + "-" + IMAGE_OS diff --git a/content/base/NEWS.md b/content/base/NEWS.md index 47839d893..f80f7d521 100644 --- a/content/base/NEWS.md +++ b/content/base/NEWS.md @@ -1,3 +1,7 @@ +# 2024-03-01 + +- BREAKING: Update Quarto version to 1.4.550 + # 2023-04-26 - Use the Quarto release 1.3.340 in jammy images. diff --git a/content/base/maybe_install_quarto.sh b/content/base/maybe_install_quarto.sh index cb06e6c82..5cebc8e10 100755 --- a/content/base/maybe_install_quarto.sh +++ b/content/base/maybe_install_quarto.sh @@ -3,7 +3,7 @@ # on bionic, only install quarto if python 3.10 and R 4.1 # TODO: figure out a different hierarchy... if [[ `grep -oE bionic /etc/lsb-release` ]] && [[ `ls /opt/python/ | grep '3\.10\.'` ]] && [[ `ls /opt/R | grep '4\.1\.'` ]]; then - qver=${QUARTO_VERSION:-1.3.340} + qver=${QUARTO_VERSION:-1.4.550} echo '--> Installing Quarto' curl -L -o /quarto.deb https://github.com/quarto-dev/quarto-cli/releases/download/v${qver}/quarto-${qver}-linux-amd64.deb apt install /quarto.deb @@ -12,7 +12,7 @@ fi # on jammy, always install quarto if [[ `grep -oE jammy /etc/lsb-release` ]]; then - qver=${QUARTO_VERSION:-1.3.340} + qver=${QUARTO_VERSION:-1.4.550} echo '--> Installing Quarto' curl -L -o /quarto.tar.gz "https://github.com/quarto-dev/quarto-cli/releases/download/v${qver}/quarto-${qver}-linux-amd64.tar.gz" mkdir -p /opt/quarto/${qver} diff --git a/product/base/Dockerfile.centos7 b/product/base/Dockerfile.centos7 index 273410824..2070ba2ec 100644 --- a/product/base/Dockerfile.centos7 +++ b/product/base/Dockerfile.centos7 @@ -7,7 +7,7 @@ ARG R_VERSION_ALT=3.6.2 ARG PYTHON_VERSION=3.9.14 ARG PYTHON_VERSION_ALT=3.8.15 ARG TINI_VERSION=0.19.0 -ARG QUARTO_VERSION=1.3.340 +ARG QUARTO_VERSION=1.4.550 ### Update/upgrade system packages ### RUN yum upgrade -y -q \ diff --git a/product/base/Dockerfile.ubuntu2204 b/product/base/Dockerfile.ubuntu2204 index f326b3e31..c191eed7d 100644 --- a/product/base/Dockerfile.ubuntu2204 +++ b/product/base/Dockerfile.ubuntu2204 @@ -8,7 +8,7 @@ ARG R_VERSION_ALT=4.1.3 ARG PYTHON_VERSION=3.9.17 ARG PYTHON_VERSION_ALT=3.8.17 ARG TINI_VERSION=0.19.0 -ARG QUARTO_VERSION=1.3.340 +ARG QUARTO_VERSION=1.4.550 ### Update/upgrade system packages ### RUN apt-get update --fix-missing \ diff --git a/product/base/Justfile b/product/base/Justfile index 00c603788..54f0ef56a 100755 --- a/product/base/Justfile +++ b/product/base/Justfile @@ -14,7 +14,7 @@ PYTHON_VERSION := "3.9.17" PYTHON_VERSION_ALT := "3.8.17" TINI_VERSION := "0.19.0" -QUARTO_VERSION := "1.3.340" +QUARTO_VERSION := "1.4.550" _make-default-tag OS=IMAGE_OS: echo "{{IMAGE_REGISTRY}}/{{PRODUCT}}:{{OS}}-r{{R_VERSION}}_{{R_VERSION_ALT}}-py{{PYTHON_VERSION}}_{{PYTHON_VERSION_ALT}}" diff --git a/product/pro/Justfile b/product/pro/Justfile index cbee4b363..41d37a184 100644 --- a/product/pro/Justfile +++ b/product/pro/Justfile @@ -14,7 +14,7 @@ PYTHON_VERSION := "3.9.17" PYTHON_VERSION_ALT := "3.8.17" TINI_VERSION := "0.19.0" -QUARTO_VERSION := "1.3.340" +QUARTO_VERSION := "1.4.550" DRIVERS_VERSION := "2023.12.1" DRIVERS_VERSION_RHEL := DRIVERS_VERSION + "-1" diff --git a/workbench-for-google-cloud-workstations/.env b/workbench-for-google-cloud-workstations/.env index f87a5c6be..45b72c01f 100644 --- a/workbench-for-google-cloud-workstations/.env +++ b/workbench-for-google-cloud-workstations/.env @@ -8,5 +8,5 @@ PYTHON_VERSION_JUPYTER=3.10.13 R_VERSION=4.2.3 R_VERSION_ALT=4.1.3 DRIVERS_VERSION=2023.05.0 -QUARTO_VERSION=1.3.340 +QUARTO_VERSION=1.4.550 IMAGE_REGISTRY_NAME=us-central1-docker.pkg.dev/posit-images/cloud-workstations/workbench diff --git a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 index f6de98942..48f8871b8 100644 --- a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 +++ b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 @@ -8,7 +8,7 @@ ARG PYTHON_VERSION=3.11.7 ARG PYTHON_VERSION_ALT=3.10.13 ARG PYTHON_VERSION_JUPYTER=3.10.13 ARG JUPYTERLAB_VERSION=3.6.5 -ARG QUARTO_VERSION=1.3.450 +ARG QUARTO_VERSION=1.4.550 ARG DRIVERS_VERSION=2023.05.0 ARG RSW_VERSION=2023.12.1+402.pro1 ARG RSW_NAME=rstudio-workbench From 850440ff47177c6208542f00cdd6807aa18019e5 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 4 Mar 2024 07:29:51 -0800 Subject: [PATCH 029/165] Add Google's GPG keyring to apt for WGCW builds --- workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 index 48f8871b8..7ceab95fb 100644 --- a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 +++ b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 @@ -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 \ From 71477c0e8ba72a4af031c2ff9dd505df6b77feca Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 4 Mar 2024 07:35:14 -0800 Subject: [PATCH 030/165] Separate Workbench for Azure ML build into its own workflow --- .github/workflows/build-release.yaml | 5 +- .github/workflows/build-workbench-aml.yaml | 130 +++++++++++++++++++++ 2 files changed, 132 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/build-workbench-aml.yaml diff --git a/.github/workflows/build-release.yaml b/.github/workflows/build-release.yaml index b199fef96..72eb2cc5b 100644 --- a/.github/workflows/build-release.yaml +++ b/.github/workflows/build-release.yaml @@ -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 }} @@ -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 @@ -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 diff --git a/.github/workflows/build-workbench-aml.yaml b/.github/workflows/build-workbench-aml.yaml new file mode 100644 index 000000000..dd1c028c8 --- /dev/null +++ b/.github/workflows/build-workbench-aml.yaml @@ -0,0 +1,130 @@ +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 + name: build-workbench-for-azure-ml + + permissions: + contents: read + packages: write + + concurrency: + group: build-products-${{ env.product }}-${{ env.os }}-${{ github.ref }} + cancel-in-progress: true + + 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 From 406c8e7f19070def4ebf77417c9e7de88228c1b1 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 4 Mar 2024 07:53:29 -0800 Subject: [PATCH 031/165] Remove concurrency rules on specialty builds --- .github/workflows/build-workbench-aml.yaml | 4 ---- .github/workflows/build-workbench-gcw.yaml | 4 ---- 2 files changed, 8 deletions(-) diff --git a/.github/workflows/build-workbench-aml.yaml b/.github/workflows/build-workbench-aml.yaml index dd1c028c8..71a0f19c0 100644 --- a/.github/workflows/build-workbench-aml.yaml +++ b/.github/workflows/build-workbench-aml.yaml @@ -24,10 +24,6 @@ jobs: contents: read packages: write - concurrency: - group: build-products-${{ env.product }}-${{ env.os }}-${{ github.ref }} - cancel-in-progress: true - steps: - name: Check Out Repo - cron main if: github.event.schedule == '0 14 * * 1' diff --git a/.github/workflows/build-workbench-gcw.yaml b/.github/workflows/build-workbench-gcw.yaml index 3ad22ff89..9bbf2cdd2 100644 --- a/.github/workflows/build-workbench-gcw.yaml +++ b/.github/workflows/build-workbench-gcw.yaml @@ -17,10 +17,6 @@ jobs: 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' From e1806650e806b6d10109d27f4c00d9b1ee4e4964 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 4 Mar 2024 08:44:52 -0800 Subject: [PATCH 032/165] More aggressive storage trimming --- .github/actions/build-test-scan-push/action.yaml | 2 ++ .github/workflows/build-workbench-aml.yaml | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/.github/actions/build-test-scan-push/action.yaml b/.github/actions/build-test-scan-push/action.yaml index ebd4b1fe6..46d8c56eb 100644 --- a/.github/actions/build-test-scan-push/action.yaml +++ b/.github/actions/build-test-scan-push/action.yaml @@ -61,6 +61,8 @@ runs: run: | sudo rm -rf /usr/local/lib/android # will release about 10 GB sudo rm -rf /usr/share/dotnet # will release about 20GB + sudo rm -f /mnt/swapfile # will release about 4GB + sudo docker image prune --all --force # start fresh, unknown how much space this will release - name: Login to ghcr.io uses: docker/login-action@v3 diff --git a/.github/workflows/build-workbench-aml.yaml b/.github/workflows/build-workbench-aml.yaml index 71a0f19c0..a104a6451 100644 --- a/.github/workflows/build-workbench-aml.yaml +++ b/.github/workflows/build-workbench-aml.yaml @@ -25,6 +25,14 @@ jobs: packages: write steps: + + - 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 + sudo rm -f /mnt/swapfile # will release about 4GB + - name: Check Out Repo - cron main if: github.event.schedule == '0 14 * * 1' uses: actions/checkout@v3 From 3632ce3f5f3e913aabc433f87e6b8ba9778d2dcb Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 4 Mar 2024 08:53:37 -0800 Subject: [PATCH 033/165] Use jlumbroso/free-disk-space@v1.3.1 action to replace manual disk space clearing --- .../actions/build-test-scan-push/action.yaml | 17 ++++++++++------- .github/workflows/build-workbench-aml.yaml | 16 ++++++++++------ 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/.github/actions/build-test-scan-push/action.yaml b/.github/actions/build-test-scan-push/action.yaml index 46d8c56eb..11198efa8 100644 --- a/.github/actions/build-test-scan-push/action.yaml +++ b/.github/actions/build-test-scan-push/action.yaml @@ -56,13 +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 - sudo rm -f /mnt/swapfile # will release about 4GB - sudo docker image prune --all --force # start fresh, unknown how much space this will release + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@v1.3.1 + 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 diff --git a/.github/workflows/build-workbench-aml.yaml b/.github/workflows/build-workbench-aml.yaml index a104a6451..47c67519c 100644 --- a/.github/workflows/build-workbench-aml.yaml +++ b/.github/workflows/build-workbench-aml.yaml @@ -26,12 +26,16 @@ jobs: steps: - - 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 - sudo rm -f /mnt/swapfile # will release about 4GB + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@v1.3.1 + with: + tool-cache: false + android: true + dotnet: true + haskell: true + large-packages: true + docker-images: true + swap-storage: true - name: Check Out Repo - cron main if: github.event.schedule == '0 14 * * 1' From 9dcb4c2521acf2584b1fb1d6fbb38bf96fab6c98 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 4 Mar 2024 15:07:37 -0800 Subject: [PATCH 034/165] Remove two versions of R from WAML --- workbench-for-microsoft-azure-ml/deps/install-r.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workbench-for-microsoft-azure-ml/deps/install-r.sh b/workbench-for-microsoft-azure-ml/deps/install-r.sh index 996206149..d2dfb42d8 100755 --- a/workbench-for-microsoft-azure-ml/deps/install-r.sh +++ b/workbench-for-microsoft-azure-ml/deps/install-r.sh @@ -29,7 +29,7 @@ install_r_packages() { } -for rvers in 4.0.5 4.1.3 4.2.3 4.3.2; do +for rvers in 4.1.3 4.2.3; do # install r version curl -O https://cdn.rstudio.com/r/ubuntu-$(lsb_release -rs | sed 's/\.//g')/pkgs/r-${rvers}_1_amd64.deb DEBIAN_FRONTEND=noninteractive apt-get install -y ./r-${rvers}_1_amd64.deb From bf1cedaa57d8bba0fcbea62a86ccf85920dc902f Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Tue, 5 Mar 2024 09:18:36 -0800 Subject: [PATCH 035/165] Fix goss test --- workbench-for-microsoft-azure-ml/test/goss.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/workbench-for-microsoft-azure-ml/test/goss.yaml b/workbench-for-microsoft-azure-ml/test/goss.yaml index 52f9b01be..e16765960 100644 --- a/workbench-for-microsoft-azure-ml/test/goss.yaml +++ b/workbench-for-microsoft-azure-ml/test/goss.yaml @@ -130,8 +130,7 @@ 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"}} + {{ $rvers := mkSlice "/opt/R/4.1.3/bin/R" "/opt/R/4.2.3/bin/R"}} {{ $pkgs := .Vars.packages}} # loops the library command for each R version to ensure expected libraries exist for all. # notably, it also ensures that each expected R version exists and is runnable From 8bc3b0d3f4c27fa146fd5b1be44993f6d2d4876b Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Tue, 5 Mar 2024 09:19:51 -0800 Subject: [PATCH 036/165] Add @costrouc as a general code owner --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 9835d8ecc..b377d8846 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -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 From 0169367e9835749fdef7ccb19f93625bc50f0d25 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Tue, 5 Mar 2024 11:27:45 -0800 Subject: [PATCH 037/165] Remove rgdal --- workbench-for-microsoft-azure-ml/test/goss_vars.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/workbench-for-microsoft-azure-ml/test/goss_vars.yaml b/workbench-for-microsoft-azure-ml/test/goss_vars.yaml index b3baba4c9..2669ba18b 100644 --- a/workbench-for-microsoft-azure-ml/test/goss_vars.yaml +++ b/workbench-for-microsoft-azure-ml/test/goss_vars.yaml @@ -1,5 +1,4 @@ packages: - - rgdal - ggplot2 - mlflow - odbc From 65b8f46a3adf3a66200a21751032d0f71154dfc2 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 11 Mar 2024 09:34:42 -0700 Subject: [PATCH 038/165] Rollback R versions removal --- workbench-for-microsoft-azure-ml/deps/install-r.sh | 2 +- workbench-for-microsoft-azure-ml/test/goss.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/workbench-for-microsoft-azure-ml/deps/install-r.sh b/workbench-for-microsoft-azure-ml/deps/install-r.sh index d2dfb42d8..996206149 100755 --- a/workbench-for-microsoft-azure-ml/deps/install-r.sh +++ b/workbench-for-microsoft-azure-ml/deps/install-r.sh @@ -29,7 +29,7 @@ install_r_packages() { } -for rvers in 4.1.3 4.2.3; do +for rvers in 4.0.5 4.1.3 4.2.3 4.3.2; do # install r version curl -O https://cdn.rstudio.com/r/ubuntu-$(lsb_release -rs | sed 's/\.//g')/pkgs/r-${rvers}_1_amd64.deb DEBIAN_FRONTEND=noninteractive apt-get install -y ./r-${rvers}_1_amd64.deb diff --git a/workbench-for-microsoft-azure-ml/test/goss.yaml b/workbench-for-microsoft-azure-ml/test/goss.yaml index e16765960..05269e7d9 100644 --- a/workbench-for-microsoft-azure-ml/test/goss.yaml +++ b/workbench-for-microsoft-azure-ml/test/goss.yaml @@ -130,7 +130,7 @@ command: ] # test all R versions and packages - {{ $rvers := mkSlice "/opt/R/4.1.3/bin/R" "/opt/R/4.2.3/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. # notably, it also ensures that each expected R version exists and is runnable From 21b508a88d3a36c3ae22ee2b1492d55fd650aa2f Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Mon, 11 Mar 2024 15:23:20 -0400 Subject: [PATCH 039/165] Resize github-actions runner for gcp and azure builds --- .github/workflows/build-workbench-aml.yaml | 2 +- .github/workflows/build-workbench-gcw.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-workbench-aml.yaml b/.github/workflows/build-workbench-aml.yaml index 47c67519c..912ac18a2 100644 --- a/.github/workflows/build-workbench-aml.yaml +++ b/.github/workflows/build-workbench-aml.yaml @@ -17,7 +17,7 @@ jobs: r-alternate: 4.1.3 py-primary: 3.9.14 py-alternate: 3.8.15 - runs-on: ubuntu-latest + runs-on: ubuntu-latest-4x name: build-workbench-for-azure-ml permissions: diff --git a/.github/workflows/build-workbench-gcw.yaml b/.github/workflows/build-workbench-gcw.yaml index 9bbf2cdd2..750ae7bd4 100644 --- a/.github/workflows/build-workbench-gcw.yaml +++ b/.github/workflows/build-workbench-gcw.yaml @@ -10,7 +10,7 @@ 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: From f5489c95dad2162e3156bf3fcab35ea5d09d7bf3 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 11 Mar 2024 14:35:41 -0700 Subject: [PATCH 040/165] Removing initial space trimming to leave to action --- .github/workflows/build-workbench-aml.yaml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.github/workflows/build-workbench-aml.yaml b/.github/workflows/build-workbench-aml.yaml index 47c67519c..2a7d695af 100644 --- a/.github/workflows/build-workbench-aml.yaml +++ b/.github/workflows/build-workbench-aml.yaml @@ -26,17 +26,6 @@ jobs: steps: - - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space@v1.3.1 - with: - tool-cache: false - android: true - dotnet: true - haskell: true - large-packages: true - docker-images: true - swap-storage: true - - name: Check Out Repo - cron main if: github.event.schedule == '0 14 * * 1' uses: actions/checkout@v3 From bfb19009fdcded288680cf46aea562432e13e4b9 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Tue, 12 Mar 2024 13:10:10 -0700 Subject: [PATCH 041/165] Add false positive exclusions for WAML ClamAV --- .../Dockerfile.ubuntu2204 | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 index f3f0dc965..4a8156945 100644 --- a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 +++ b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 @@ -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 From 3d1406954cb05c79b1d6c10c1696869cce7c7016 Mon Sep 17 00:00:00 2001 From: "Benjamin R. J. Schwedler" Date: Thu, 14 Mar 2024 09:34:45 -0500 Subject: [PATCH 042/165] Update Pro Drivers to 2024.03.0 --- NEWS.md | 4 +++ ci.Justfile | 2 +- content/matrix.json | 42 +++++++++++++++---------------- content/pro/Dockerfile.ubuntu1804 | 2 +- content/pro/Dockerfile.ubuntu2204 | 2 +- content/pro/Justfile | 2 +- product/pro/Dockerfile.centos7 | 2 +- product/pro/Dockerfile.ubuntu2204 | 2 +- product/pro/Justfile | 2 +- r-session-complete/.env | 2 +- r-session-complete/Justfile | 2 +- 11 files changed, 34 insertions(+), 30 deletions(-) diff --git a/NEWS.md b/NEWS.md index 7ca614e20..e347fc9cd 100644 --- a/NEWS.md +++ b/NEWS.md @@ -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-03-01 - BREAKING: Update Quarto version to 1.4.550 diff --git a/ci.Justfile b/ci.Justfile index c1447b6be..79bf3dcc8 100644 --- a/ci.Justfile +++ b/ci.Justfile @@ -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.4.550" diff --git a/content/matrix.json b/content/matrix.json index 4f84c28dc..163b8ddd0 100644 --- a/content/matrix.json +++ b/content/matrix.json @@ -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"} ] diff --git a/content/pro/Dockerfile.ubuntu1804 b/content/pro/Dockerfile.ubuntu1804 index feb9d6597..e3be3d7fd 100644 --- a/content/pro/Dockerfile.ubuntu1804 +++ b/content/pro/Dockerfile.ubuntu1804 @@ -6,7 +6,7 @@ FROM ${REGISTRY}/rstudio/content-base:r${R_VERSION}-py${PYTHON_VERSION}-ubuntu18 LABEL maintainer="RStudio Docker " # Install RStudio Professional Drivers ----------------------------------------# -ARG DRIVERS_VERSION=2023.12.1 +ARG DRIVERS_VERSION=2024.03.0 ARG R_VERSION ARG DEBIAN_FRONTEND=noninteractive diff --git a/content/pro/Dockerfile.ubuntu2204 b/content/pro/Dockerfile.ubuntu2204 index afbf342b9..4a8066b54 100644 --- a/content/pro/Dockerfile.ubuntu2204 +++ b/content/pro/Dockerfile.ubuntu2204 @@ -6,7 +6,7 @@ FROM ${REGISTRY}/rstudio/content-base:r${R_VERSION}-py${PYTHON_VERSION}-ubuntu22 LABEL maintainer="RStudio Docker " # Install RStudio Professional Drivers ----------------------------------------# -ARG DRIVERS_VERSION=2023.12.1 +ARG DRIVERS_VERSION=2024.03.0 ARG R_VERSION ARG DEBIAN_FRONTEND=noninteractive diff --git a/content/pro/Justfile b/content/pro/Justfile index d43ae361b..1d77ae54b 100755 --- a/content/pro/Justfile +++ b/content/pro/Justfile @@ -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 diff --git a/product/pro/Dockerfile.centos7 b/product/pro/Dockerfile.centos7 index f342b95c3..107cbd618 100644 --- a/product/pro/Dockerfile.centos7 +++ b/product/pro/Dockerfile.centos7 @@ -11,7 +11,7 @@ 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 \ diff --git a/product/pro/Dockerfile.ubuntu2204 b/product/pro/Dockerfile.ubuntu2204 index 892d99e4d..3914cffbb 100644 --- a/product/pro/Dockerfile.ubuntu2204 +++ b/product/pro/Dockerfile.ubuntu2204 @@ -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 \ diff --git a/product/pro/Justfile b/product/pro/Justfile index 41d37a184..a0b4aba80 100644 --- a/product/pro/Justfile +++ b/product/pro/Justfile @@ -16,7 +16,7 @@ PYTHON_VERSION_ALT := "3.8.17" TINI_VERSION := "0.19.0" QUARTO_VERSION := "1.4.550" -DRIVERS_VERSION := "2023.12.1" +DRIVERS_VERSION := "2024.03.0" DRIVERS_VERSION_RHEL := DRIVERS_VERSION + "-1" _make-default-tag OS=IMAGE_OS: diff --git a/r-session-complete/.env b/r-session-complete/.env index 02e0c736c..fccaa926b 100644 --- a/r-session-complete/.env +++ b/r-session-complete/.env @@ -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 diff --git a/r-session-complete/Justfile b/r-session-complete/Justfile index 529be69fc..da24d8304 100755 --- a/r-session-complete/Justfile +++ b/r-session-complete/Justfile @@ -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" From 077f09b67579e2263f8ab50bffdd4537b10390ae Mon Sep 17 00:00:00 2001 From: "Benjamin R. J. Schwedler" Date: Mon, 18 Mar 2024 08:41:16 -0500 Subject: [PATCH 043/165] Update filename for EL drivers package The filename for the Enterprise Linux drivers package removed the version from the filename. This commit corrects this for the centos7 image. --- product/pro/Dockerfile.centos7 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/product/pro/Dockerfile.centos7 b/product/pro/Dockerfile.centos7 index 107cbd618..0214e2ab9 100644 --- a/product/pro/Dockerfile.centos7 +++ b/product/pro/Dockerfile.centos7 @@ -15,10 +15,10 @@ 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")' From 7259bcb2dc2f01b9783041c3c059284e82d199cc Mon Sep 17 00:00:00 2001 From: "Benjamin R. J. Schwedler" Date: Fri, 22 Mar 2024 08:51:19 -0500 Subject: [PATCH 044/165] Revert "Merge pull request #699 from rstudio/kg-quarto-update-1.4.550" This reverts commit 2fa5480f9f103ddfecd7db4d954f0447f99efb14, reversing changes made to e0fa3ab39e64e6e9b03febcbcb97e71a96210596. We do not want to update Quarto globally across all images due to the coordination required across the helm charts for the individual products. --- Justfile | 2 +- NEWS.md | 4 ---- ci.Justfile | 2 +- connect/NEWS.md | 4 ---- connect/rstudio-connect.gcfg | 2 +- content/base/Dockerfile.ubuntu2204 | 2 +- content/base/Justfile | 2 +- content/base/NEWS.md | 4 ---- content/base/maybe_install_quarto.sh | 4 ++-- product/base/Dockerfile.centos7 | 2 +- product/base/Dockerfile.ubuntu2204 | 2 +- product/base/Justfile | 2 +- product/pro/Justfile | 2 +- workbench-for-google-cloud-workstations/.env | 2 +- workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 | 2 +- 15 files changed, 13 insertions(+), 25 deletions(-) diff --git a/Justfile b/Justfile index 6f5d25fd7..591527882 100644 --- a/Justfile +++ b/Justfile @@ -21,7 +21,7 @@ PYTHON_VERSION_ALT := "3.8.17" PYTHON_VERSION_RHEL := "3.9.14" PYTHON_VERSION_ALT_RHEL := "3.8.15" -QUARTO_VERSION := "1.4.550" +QUARTO_VERSION := "1.3.450" # just _get-tag-safe-version 2022.07.2+576.pro12 _get-tag-safe-version $VERSION: diff --git a/NEWS.md b/NEWS.md index e347fc9cd..2a981260b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -9,10 +9,6 @@ This file only captures pervasive, repository-wide changes. - Update Professional Drivers to 2024.03.0 -# 2024-03-01 - -- BREAKING: Update Quarto version to 1.4.550 - # 2024-02-01 - Update Pro Drivers to 2023.12.1 diff --git a/ci.Justfile b/ci.Justfile index 79bf3dcc8..392613192 100644 --- a/ci.Justfile +++ b/ci.Justfile @@ -12,7 +12,7 @@ PYTHON_VERSION_ALT := "3.8.17" DRIVERS_VERSION := "2024.03.0" DRIVERS_VERSION_RHEL := DRIVERS_VERSION + "-1" -QUARTO_VERSION := "1.4.550" +QUARTO_VERSION := "1.3.340" # just _get-os-alias jammy _get-os-alias OS: diff --git a/connect/NEWS.md b/connect/NEWS.md index bdef561d9..812a78cdf 100644 --- a/connect/NEWS.md +++ b/connect/NEWS.md @@ -1,7 +1,3 @@ -# 2024-03-01 - -- BREAKING: Update Quarto version to 1.4.550 - # 2023-08-01 - BREAKING: Removed R 3.6.2, replaced with R 4.1.3. - Updated R 4.2.0 to 4.2.3. diff --git a/connect/rstudio-connect.gcfg b/connect/rstudio-connect.gcfg index d06c6ce8a..376d08c21 100644 --- a/connect/rstudio-connect.gcfg +++ b/connect/rstudio-connect.gcfg @@ -35,7 +35,7 @@ Executable = /opt/python/{{PYTHON_VERSION_ALT}}/bin/python [Quarto] Enabled = true -Executable = /opt/quarto/1.4.550/bin/quarto +Executable = /opt/quarto/1.3.340/bin/quarto [RPackageRepository "CRAN"] URL = https://packagemanager.rstudio.com/cran/__linux__/jammy/latest diff --git a/content/base/Dockerfile.ubuntu2204 b/content/base/Dockerfile.ubuntu2204 index 9fd5571eb..030eab0b9 100644 --- a/content/base/Dockerfile.ubuntu2204 +++ b/content/base/Dockerfile.ubuntu2204 @@ -117,7 +117,7 @@ RUN curl -O https://cdn.rstudio.com/python/${DISTRIBUTION}/pkgs/python-${PYTHON_ && /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install --upgrade setuptools # install quarto -ARG QUARTO_VERSION=1.4.550 +ARG QUARTO_VERSION=1.3.340 COPY maybe_install_quarto.sh /tmp/maybe_install_quarto.sh RUN /opt/R/${R_VERSION}/bin/R -e 'install.packages("odbc", repos="https://packagemanager.rstudio.com/cran/__linux__/bionic/latest")' \ && /tmp/maybe_install_quarto.sh \ diff --git a/content/base/Justfile b/content/base/Justfile index a76eb9b55..a1defbf8a 100755 --- a/content/base/Justfile +++ b/content/base/Justfile @@ -10,7 +10,7 @@ R_VERSION := "3.6.3" PYTHON_VERSION := "3.9.5" -QUARTO_VERSION := "1.4.550" +QUARTO_VERSION := "1.3.340" DEFAULT_TAG := IMAGE_PREFIX + PRODUCT + ":r" + R_VERSION + "-py" + PYTHON_VERSION + "-" + IMAGE_OS diff --git a/content/base/NEWS.md b/content/base/NEWS.md index f80f7d521..47839d893 100644 --- a/content/base/NEWS.md +++ b/content/base/NEWS.md @@ -1,7 +1,3 @@ -# 2024-03-01 - -- BREAKING: Update Quarto version to 1.4.550 - # 2023-04-26 - Use the Quarto release 1.3.340 in jammy images. diff --git a/content/base/maybe_install_quarto.sh b/content/base/maybe_install_quarto.sh index 5cebc8e10..cb06e6c82 100755 --- a/content/base/maybe_install_quarto.sh +++ b/content/base/maybe_install_quarto.sh @@ -3,7 +3,7 @@ # on bionic, only install quarto if python 3.10 and R 4.1 # TODO: figure out a different hierarchy... if [[ `grep -oE bionic /etc/lsb-release` ]] && [[ `ls /opt/python/ | grep '3\.10\.'` ]] && [[ `ls /opt/R | grep '4\.1\.'` ]]; then - qver=${QUARTO_VERSION:-1.4.550} + qver=${QUARTO_VERSION:-1.3.340} echo '--> Installing Quarto' curl -L -o /quarto.deb https://github.com/quarto-dev/quarto-cli/releases/download/v${qver}/quarto-${qver}-linux-amd64.deb apt install /quarto.deb @@ -12,7 +12,7 @@ fi # on jammy, always install quarto if [[ `grep -oE jammy /etc/lsb-release` ]]; then - qver=${QUARTO_VERSION:-1.4.550} + qver=${QUARTO_VERSION:-1.3.340} echo '--> Installing Quarto' curl -L -o /quarto.tar.gz "https://github.com/quarto-dev/quarto-cli/releases/download/v${qver}/quarto-${qver}-linux-amd64.tar.gz" mkdir -p /opt/quarto/${qver} diff --git a/product/base/Dockerfile.centos7 b/product/base/Dockerfile.centos7 index 2070ba2ec..273410824 100644 --- a/product/base/Dockerfile.centos7 +++ b/product/base/Dockerfile.centos7 @@ -7,7 +7,7 @@ ARG R_VERSION_ALT=3.6.2 ARG PYTHON_VERSION=3.9.14 ARG PYTHON_VERSION_ALT=3.8.15 ARG TINI_VERSION=0.19.0 -ARG QUARTO_VERSION=1.4.550 +ARG QUARTO_VERSION=1.3.340 ### Update/upgrade system packages ### RUN yum upgrade -y -q \ diff --git a/product/base/Dockerfile.ubuntu2204 b/product/base/Dockerfile.ubuntu2204 index c191eed7d..f326b3e31 100644 --- a/product/base/Dockerfile.ubuntu2204 +++ b/product/base/Dockerfile.ubuntu2204 @@ -8,7 +8,7 @@ ARG R_VERSION_ALT=4.1.3 ARG PYTHON_VERSION=3.9.17 ARG PYTHON_VERSION_ALT=3.8.17 ARG TINI_VERSION=0.19.0 -ARG QUARTO_VERSION=1.4.550 +ARG QUARTO_VERSION=1.3.340 ### Update/upgrade system packages ### RUN apt-get update --fix-missing \ diff --git a/product/base/Justfile b/product/base/Justfile index 54f0ef56a..00c603788 100755 --- a/product/base/Justfile +++ b/product/base/Justfile @@ -14,7 +14,7 @@ PYTHON_VERSION := "3.9.17" PYTHON_VERSION_ALT := "3.8.17" TINI_VERSION := "0.19.0" -QUARTO_VERSION := "1.4.550" +QUARTO_VERSION := "1.3.340" _make-default-tag OS=IMAGE_OS: echo "{{IMAGE_REGISTRY}}/{{PRODUCT}}:{{OS}}-r{{R_VERSION}}_{{R_VERSION_ALT}}-py{{PYTHON_VERSION}}_{{PYTHON_VERSION_ALT}}" diff --git a/product/pro/Justfile b/product/pro/Justfile index a0b4aba80..d07474f01 100644 --- a/product/pro/Justfile +++ b/product/pro/Justfile @@ -14,7 +14,7 @@ PYTHON_VERSION := "3.9.17" PYTHON_VERSION_ALT := "3.8.17" TINI_VERSION := "0.19.0" -QUARTO_VERSION := "1.4.550" +QUARTO_VERSION := "1.3.340" DRIVERS_VERSION := "2024.03.0" DRIVERS_VERSION_RHEL := DRIVERS_VERSION + "-1" diff --git a/workbench-for-google-cloud-workstations/.env b/workbench-for-google-cloud-workstations/.env index 45b72c01f..f87a5c6be 100644 --- a/workbench-for-google-cloud-workstations/.env +++ b/workbench-for-google-cloud-workstations/.env @@ -8,5 +8,5 @@ PYTHON_VERSION_JUPYTER=3.10.13 R_VERSION=4.2.3 R_VERSION_ALT=4.1.3 DRIVERS_VERSION=2023.05.0 -QUARTO_VERSION=1.4.550 +QUARTO_VERSION=1.3.340 IMAGE_REGISTRY_NAME=us-central1-docker.pkg.dev/posit-images/cloud-workstations/workbench diff --git a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 index 7ceab95fb..b612a6a97 100644 --- a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 +++ b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 @@ -8,7 +8,7 @@ ARG PYTHON_VERSION=3.11.7 ARG PYTHON_VERSION_ALT=3.10.13 ARG PYTHON_VERSION_JUPYTER=3.10.13 ARG JUPYTERLAB_VERSION=3.6.5 -ARG QUARTO_VERSION=1.4.550 +ARG QUARTO_VERSION=1.3.450 ARG DRIVERS_VERSION=2023.05.0 ARG RSW_VERSION=2023.12.1+402.pro1 ARG RSW_NAME=rstudio-workbench From aee904f7521c633a1b722363bc27fbbddefcfabd Mon Sep 17 00:00:00 2001 From: Pablo Bianco Lascaray Date: Thu, 28 Mar 2024 13:10:26 -0400 Subject: [PATCH 045/165] Bump Connect to version 2024.03.0 --- Justfile | 2 +- connect-content-init/Dockerfile.ubuntu2204 | 2 +- connect-content-init/Justfile | 2 +- connect-content-init/README.md | 6 +++--- connect/.env | 2 +- connect/Dockerfile.ubuntu2204 | 2 +- connect/Justfile | 2 +- connect/README.md | 2 +- docker-compose.yml | 4 ++-- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Justfile b/Justfile index 591527882..f715d2708 100644 --- a/Justfile +++ b/Justfile @@ -6,7 +6,7 @@ sed_vars := if os() == "macos" { "-i ''" } else { "-i" } BUILDX_PATH := "" -RSC_VERSION := "2024.02.0" +RSC_VERSION := "2024.03.0" RSPM_VERSION := "2023.12.0-13" RSW_VERSION := "2023.12.1+402.pro1" diff --git a/connect-content-init/Dockerfile.ubuntu2204 b/connect-content-init/Dockerfile.ubuntu2204 index ac1e8be53..1de6e7ca4 100644 --- a/connect-content-init/Dockerfile.ubuntu2204 +++ b/connect-content-init/Dockerfile.ubuntu2204 @@ -10,7 +10,7 @@ RUN apt-get update && \ apt-get install -y --no-install-recommends ca-certificates curl && \ rm -rf /var/lib/apt/lists/* -ARG RSC_VERSION=2024.02.0 +ARG RSC_VERSION=2024.03.0 SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN mkdir -p /rsc-staging && \ RSC_VERSION_URL=$(echo -n "${RSC_VERSION}" | sed 's/+/%2B/g') && \ diff --git a/connect-content-init/Justfile b/connect-content-init/Justfile index 3c59f2c92..cf7e1277c 100644 --- a/connect-content-init/Justfile +++ b/connect-content-init/Justfile @@ -6,7 +6,7 @@ IMAGE_PREFIX := "rstudio-" PRODUCT := "connect-content-init" IMAGE_OS := "ubuntu2204" -RSC_VERSION := "2024.02.0" +RSC_VERSION := "2024.03.0" RSC_TAG_SAFE_VERSION := replace(RSC_VERSION, "+", "-") RSC_LICENSE := "" diff --git a/connect-content-init/README.md b/connect-content-init/README.md index 227fbca80..9173b3eab 100644 --- a/connect-content-init/README.md +++ b/connect-content-init/README.md @@ -9,7 +9,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2024.02.0`, `ubuntu2204-2024.02.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.03.0`, `ubuntu2204-2024.03.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) # RStudio Connect Content Init Container @@ -31,7 +31,7 @@ The version of the release package to use can be overridden with the `RSC_VERSION` build arg. ```console -just build ubuntu2204 2024.02.0 +just build ubuntu2204 2024.03.0 ``` ## Testing @@ -56,7 +56,7 @@ just test You can see the different layers that make up the image: ```console -docker history rstudio/rstudio-connect-content-init-preview:2024.02.0-dev-326 +docker history rstudio/rstudio-connect-content-init-preview:2024.03.0-dev-326 ``` NOTE: almost all the image size is pandoc. diff --git a/connect/.env b/connect/.env index 3f85fe19d..3e53ac365 100644 --- a/connect/.env +++ b/connect/.env @@ -1,4 +1,4 @@ -RSC_VERSION=2024.02.0 +RSC_VERSION=2024.03.0 R_VERSION=4.2.3 R_VERSION_ALT=4.1.3 PYTHON_VERSION=3.9.17 diff --git a/connect/Dockerfile.ubuntu2204 b/connect/Dockerfile.ubuntu2204 index ead6a71d9..210bb05a0 100644 --- a/connect/Dockerfile.ubuntu2204 +++ b/connect/Dockerfile.ubuntu2204 @@ -13,7 +13,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 RSC_VERSION=2024.02.0 +ARG RSC_VERSION=2024.03.0 SHELL [ "/bin/bash", "-o", "pipefail", "-c"] RUN apt-get update --fix-missing \ && apt-get install -yq --no-install-recommends \ diff --git a/connect/Justfile b/connect/Justfile index 29503409b..0716476d4 100644 --- a/connect/Justfile +++ b/connect/Justfile @@ -6,7 +6,7 @@ IMAGE_PREFIX := "rstudio-" PRODUCT := "connect" IMAGE_OS := "ubuntu2204" -RSC_VERSION := "2024.02.0" +RSC_VERSION := "2024.03.0" RSC_LICENSE := "" RSC_LICENSE_SERVER := "" diff --git a/connect/README.md b/connect/README.md index f2514fa0d..ea42414d3 100644 --- a/connect/README.md +++ b/connect/README.md @@ -7,7 +7,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2024.02.0`, `ubuntu2204-2024.02.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.03.0`, `ubuntu2204-2024.03.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) # What is Posit Connect? diff --git a/docker-compose.yml b/docker-compose.yml index 149b95df2..61ddf371a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -25,8 +25,8 @@ services: context: ./connect dockerfile: "Dockerfile.${IMAGE_OS:-ubuntu1804}" args: - RSC_VERSION: 2024.02.0 - image: rstudio/rstudio-connect:2024.02.0 + RSC_VERSION: 2024.03.0 + image: rstudio/rstudio-connect:2024.03.0 privileged: true environment: RSC_LICENSE: ${RSC_LICENSE} From 73939c2d83a7beb423a6b04f5ed1a5a74f30ae03 Mon Sep 17 00:00:00 2001 From: Aron Atkins Date: Thu, 28 Mar 2024 13:45:38 -0400 Subject: [PATCH 046/165] update products to Quarto 1.4.552. content images use existing Quarto version. --- Justfile | 2 +- ci.Justfile | 2 +- connect/NEWS.md | 3 +++ connect/rstudio-connect.gcfg | 2 +- product/base/Dockerfile.centos7 | 2 +- product/base/Dockerfile.ubuntu2204 | 2 +- product/base/Justfile | 2 +- product/pro/Justfile | 2 +- workbench-for-google-cloud-workstations/.env | 2 +- workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 | 2 +- 10 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Justfile b/Justfile index f715d2708..079e1423d 100644 --- a/Justfile +++ b/Justfile @@ -21,7 +21,7 @@ PYTHON_VERSION_ALT := "3.8.17" PYTHON_VERSION_RHEL := "3.9.14" PYTHON_VERSION_ALT_RHEL := "3.8.15" -QUARTO_VERSION := "1.3.450" +QUARTO_VERSION := "1.4.552" # just _get-tag-safe-version 2022.07.2+576.pro12 _get-tag-safe-version $VERSION: diff --git a/ci.Justfile b/ci.Justfile index 392613192..8cf8ae2cc 100644 --- a/ci.Justfile +++ b/ci.Justfile @@ -12,7 +12,7 @@ PYTHON_VERSION_ALT := "3.8.17" DRIVERS_VERSION := "2024.03.0" DRIVERS_VERSION_RHEL := DRIVERS_VERSION + "-1" -QUARTO_VERSION := "1.3.340" +QUARTO_VERSION := "1.4.552" # just _get-os-alias jammy _get-os-alias OS: diff --git a/connect/NEWS.md b/connect/NEWS.md index 812a78cdf..77f5b1cb7 100644 --- a/connect/NEWS.md +++ b/connect/NEWS.md @@ -1,3 +1,6 @@ +# 2024-03-28 +- Updated to Quarto 1.4.552. + # 2023-08-01 - BREAKING: Removed R 3.6.2, replaced with R 4.1.3. - Updated R 4.2.0 to 4.2.3. diff --git a/connect/rstudio-connect.gcfg b/connect/rstudio-connect.gcfg index 376d08c21..608079ce5 100644 --- a/connect/rstudio-connect.gcfg +++ b/connect/rstudio-connect.gcfg @@ -35,7 +35,7 @@ Executable = /opt/python/{{PYTHON_VERSION_ALT}}/bin/python [Quarto] Enabled = true -Executable = /opt/quarto/1.3.340/bin/quarto +Executable = /opt/quarto/1.4.552/bin/quarto [RPackageRepository "CRAN"] URL = https://packagemanager.rstudio.com/cran/__linux__/jammy/latest diff --git a/product/base/Dockerfile.centos7 b/product/base/Dockerfile.centos7 index 273410824..35e527d52 100644 --- a/product/base/Dockerfile.centos7 +++ b/product/base/Dockerfile.centos7 @@ -7,7 +7,7 @@ ARG R_VERSION_ALT=3.6.2 ARG PYTHON_VERSION=3.9.14 ARG PYTHON_VERSION_ALT=3.8.15 ARG TINI_VERSION=0.19.0 -ARG QUARTO_VERSION=1.3.340 +ARG QUARTO_VERSION=1.4.552 ### Update/upgrade system packages ### RUN yum upgrade -y -q \ diff --git a/product/base/Dockerfile.ubuntu2204 b/product/base/Dockerfile.ubuntu2204 index f326b3e31..c14a04138 100644 --- a/product/base/Dockerfile.ubuntu2204 +++ b/product/base/Dockerfile.ubuntu2204 @@ -8,7 +8,7 @@ ARG R_VERSION_ALT=4.1.3 ARG PYTHON_VERSION=3.9.17 ARG PYTHON_VERSION_ALT=3.8.17 ARG TINI_VERSION=0.19.0 -ARG QUARTO_VERSION=1.3.340 +ARG QUARTO_VERSION=1.4.552 ### Update/upgrade system packages ### RUN apt-get update --fix-missing \ diff --git a/product/base/Justfile b/product/base/Justfile index 00c603788..9323a28e7 100755 --- a/product/base/Justfile +++ b/product/base/Justfile @@ -14,7 +14,7 @@ PYTHON_VERSION := "3.9.17" PYTHON_VERSION_ALT := "3.8.17" TINI_VERSION := "0.19.0" -QUARTO_VERSION := "1.3.340" +QUARTO_VERSION := "1.4.552" _make-default-tag OS=IMAGE_OS: echo "{{IMAGE_REGISTRY}}/{{PRODUCT}}:{{OS}}-r{{R_VERSION}}_{{R_VERSION_ALT}}-py{{PYTHON_VERSION}}_{{PYTHON_VERSION_ALT}}" diff --git a/product/pro/Justfile b/product/pro/Justfile index d07474f01..852cc9710 100644 --- a/product/pro/Justfile +++ b/product/pro/Justfile @@ -14,7 +14,7 @@ PYTHON_VERSION := "3.9.17" PYTHON_VERSION_ALT := "3.8.17" TINI_VERSION := "0.19.0" -QUARTO_VERSION := "1.3.340" +QUARTO_VERSION := "1.4.552" DRIVERS_VERSION := "2024.03.0" DRIVERS_VERSION_RHEL := DRIVERS_VERSION + "-1" diff --git a/workbench-for-google-cloud-workstations/.env b/workbench-for-google-cloud-workstations/.env index f87a5c6be..fa7e87980 100644 --- a/workbench-for-google-cloud-workstations/.env +++ b/workbench-for-google-cloud-workstations/.env @@ -8,5 +8,5 @@ PYTHON_VERSION_JUPYTER=3.10.13 R_VERSION=4.2.3 R_VERSION_ALT=4.1.3 DRIVERS_VERSION=2023.05.0 -QUARTO_VERSION=1.3.340 +QUARTO_VERSION=1.4.552 IMAGE_REGISTRY_NAME=us-central1-docker.pkg.dev/posit-images/cloud-workstations/workbench diff --git a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 index b612a6a97..db8e38f6d 100644 --- a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 +++ b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 @@ -8,7 +8,7 @@ ARG PYTHON_VERSION=3.11.7 ARG PYTHON_VERSION_ALT=3.10.13 ARG PYTHON_VERSION_JUPYTER=3.10.13 ARG JUPYTERLAB_VERSION=3.6.5 -ARG QUARTO_VERSION=1.3.450 +ARG QUARTO_VERSION=1.4.552 ARG DRIVERS_VERSION=2023.05.0 ARG RSW_VERSION=2023.12.1+402.pro1 ARG RSW_NAME=rstudio-workbench From 305cfe7021eb34666ca52a53f3017c05b2aa5e75 Mon Sep 17 00:00:00 2001 From: David Kegley Date: Wed, 10 Apr 2024 12:34:44 -0400 Subject: [PATCH 047/165] Revert quarto version upgrade --- Justfile | 2 +- ci.Justfile | 2 +- connect/NEWS.md | 7 ++----- connect/rstudio-connect.gcfg | 2 +- product/base/Dockerfile.centos7 | 2 +- product/base/Dockerfile.ubuntu2204 | 2 +- product/base/Justfile | 2 +- product/pro/Justfile | 2 +- workbench-for-google-cloud-workstations/.env | 2 +- .../Dockerfile.ubuntu2004 | 2 +- 10 files changed, 11 insertions(+), 14 deletions(-) diff --git a/Justfile b/Justfile index 079e1423d..f715d2708 100644 --- a/Justfile +++ b/Justfile @@ -21,7 +21,7 @@ PYTHON_VERSION_ALT := "3.8.17" PYTHON_VERSION_RHEL := "3.9.14" PYTHON_VERSION_ALT_RHEL := "3.8.15" -QUARTO_VERSION := "1.4.552" +QUARTO_VERSION := "1.3.450" # just _get-tag-safe-version 2022.07.2+576.pro12 _get-tag-safe-version $VERSION: diff --git a/ci.Justfile b/ci.Justfile index 8cf8ae2cc..392613192 100644 --- a/ci.Justfile +++ b/ci.Justfile @@ -12,7 +12,7 @@ PYTHON_VERSION_ALT := "3.8.17" DRIVERS_VERSION := "2024.03.0" DRIVERS_VERSION_RHEL := DRIVERS_VERSION + "-1" -QUARTO_VERSION := "1.4.552" +QUARTO_VERSION := "1.3.340" # just _get-os-alias jammy _get-os-alias OS: diff --git a/connect/NEWS.md b/connect/NEWS.md index 77f5b1cb7..fcbf737bd 100644 --- a/connect/NEWS.md +++ b/connect/NEWS.md @@ -1,13 +1,10 @@ -# 2024-03-28 -- Updated to Quarto 1.4.552. - # 2023-08-01 - BREAKING: Removed R 3.6.2, replaced with R 4.1.3. - Updated R 4.2.0 to 4.2.3. - Updated Python versions to 3.8.17 and 3.9.17 (latest fix versions). # 2023-07-25 -- Changed `rstudio-connect.gcfg` Python version numbers behavior from statically defined to dynamically filled on build. +- Changed `rstudio-connect.gcfg` Python version numbers behavior from statically defined to dynamically filled on build. # 2023-07-10 @@ -15,7 +12,7 @@ # 2023-07-07 -- WARNING: Refactor image to build _FROM_ the new `product-base` image, this could be potentially breaking for some +- WARNING: Refactor image to build _FROM_ the new `product-base` image, this could be potentially breaking for some users. - The following packages have been removed from the image: `gdebi-core`, `libsm6`, `libxext6`, and `libxrender1`. - The [Posit Professional Drivers](https://docs.posit.co/pro-drivers/) are now included by default in the image. diff --git a/connect/rstudio-connect.gcfg b/connect/rstudio-connect.gcfg index 608079ce5..376d08c21 100644 --- a/connect/rstudio-connect.gcfg +++ b/connect/rstudio-connect.gcfg @@ -35,7 +35,7 @@ Executable = /opt/python/{{PYTHON_VERSION_ALT}}/bin/python [Quarto] Enabled = true -Executable = /opt/quarto/1.4.552/bin/quarto +Executable = /opt/quarto/1.3.340/bin/quarto [RPackageRepository "CRAN"] URL = https://packagemanager.rstudio.com/cran/__linux__/jammy/latest diff --git a/product/base/Dockerfile.centos7 b/product/base/Dockerfile.centos7 index 35e527d52..273410824 100644 --- a/product/base/Dockerfile.centos7 +++ b/product/base/Dockerfile.centos7 @@ -7,7 +7,7 @@ ARG R_VERSION_ALT=3.6.2 ARG PYTHON_VERSION=3.9.14 ARG PYTHON_VERSION_ALT=3.8.15 ARG TINI_VERSION=0.19.0 -ARG QUARTO_VERSION=1.4.552 +ARG QUARTO_VERSION=1.3.340 ### Update/upgrade system packages ### RUN yum upgrade -y -q \ diff --git a/product/base/Dockerfile.ubuntu2204 b/product/base/Dockerfile.ubuntu2204 index c14a04138..f326b3e31 100644 --- a/product/base/Dockerfile.ubuntu2204 +++ b/product/base/Dockerfile.ubuntu2204 @@ -8,7 +8,7 @@ ARG R_VERSION_ALT=4.1.3 ARG PYTHON_VERSION=3.9.17 ARG PYTHON_VERSION_ALT=3.8.17 ARG TINI_VERSION=0.19.0 -ARG QUARTO_VERSION=1.4.552 +ARG QUARTO_VERSION=1.3.340 ### Update/upgrade system packages ### RUN apt-get update --fix-missing \ diff --git a/product/base/Justfile b/product/base/Justfile index 9323a28e7..00c603788 100755 --- a/product/base/Justfile +++ b/product/base/Justfile @@ -14,7 +14,7 @@ PYTHON_VERSION := "3.9.17" PYTHON_VERSION_ALT := "3.8.17" TINI_VERSION := "0.19.0" -QUARTO_VERSION := "1.4.552" +QUARTO_VERSION := "1.3.340" _make-default-tag OS=IMAGE_OS: echo "{{IMAGE_REGISTRY}}/{{PRODUCT}}:{{OS}}-r{{R_VERSION}}_{{R_VERSION_ALT}}-py{{PYTHON_VERSION}}_{{PYTHON_VERSION_ALT}}" diff --git a/product/pro/Justfile b/product/pro/Justfile index 852cc9710..d07474f01 100644 --- a/product/pro/Justfile +++ b/product/pro/Justfile @@ -14,7 +14,7 @@ PYTHON_VERSION := "3.9.17" PYTHON_VERSION_ALT := "3.8.17" TINI_VERSION := "0.19.0" -QUARTO_VERSION := "1.4.552" +QUARTO_VERSION := "1.3.340" DRIVERS_VERSION := "2024.03.0" DRIVERS_VERSION_RHEL := DRIVERS_VERSION + "-1" diff --git a/workbench-for-google-cloud-workstations/.env b/workbench-for-google-cloud-workstations/.env index fa7e87980..f87a5c6be 100644 --- a/workbench-for-google-cloud-workstations/.env +++ b/workbench-for-google-cloud-workstations/.env @@ -8,5 +8,5 @@ PYTHON_VERSION_JUPYTER=3.10.13 R_VERSION=4.2.3 R_VERSION_ALT=4.1.3 DRIVERS_VERSION=2023.05.0 -QUARTO_VERSION=1.4.552 +QUARTO_VERSION=1.3.340 IMAGE_REGISTRY_NAME=us-central1-docker.pkg.dev/posit-images/cloud-workstations/workbench diff --git a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 index db8e38f6d..b612a6a97 100644 --- a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 +++ b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 @@ -8,7 +8,7 @@ ARG PYTHON_VERSION=3.11.7 ARG PYTHON_VERSION_ALT=3.10.13 ARG PYTHON_VERSION_JUPYTER=3.10.13 ARG JUPYTERLAB_VERSION=3.6.5 -ARG QUARTO_VERSION=1.4.552 +ARG QUARTO_VERSION=1.3.450 ARG DRIVERS_VERSION=2023.05.0 ARG RSW_VERSION=2023.12.1+402.pro1 ARG RSW_NAME=rstudio-workbench From 75e5e62f311a7c5d98ed4a68ff236a3dba5e2b37 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Tue, 16 Apr 2024 13:13:04 -0700 Subject: [PATCH 048/165] Buildx bake with goss test runner orchestration (#718) * Initial commit of docker buildx bake experiment * Separate builds for azure/google specialized images * Specify targets in bake * Implement test stages on base * Implement stage tests for base * Implement stage tests for ppm * Implement stage tests for connect (borked) * Update connect just test to work with test stage * Implement test stage on r-session-complete * Fix/exclude goss tests for buildx bake * Implement separate test for Connect * Remove compose testing and image local justfiles * Increase timeout for checking Jupyter * Convert content builds to use bake * Target content docker-bake file * Print metadata after build * Enable GHA caching * Default to image output * Remove debug line * Suppress DL3006 * Extend timeouts for GCW * Add timeout to r-session-complete jupyter * Cleanup justfiles * Update tagging for bake release builds * Implement bake preview builds * Update if clause for pushing preview images * Install requests package * Provision buildx in preview * Set file on preview builds * Fix target names * Fix CentOS 7 image bad ref * Calculate RSW download URL in bake * Wait for launcher startup in Workbench tests * Add wait time in Workbench test runner to ensure services are up * Do not cache or output tests Use a standard runner for content images * Do not cache or output tests for preview Provide a buildx config for GHA Unify test sleep behavior of Workbench images * Show running processes (debugging) * Remove test targets * Remove test layers from Dockerfiles * Change test running to be orchestrated by a Python script * Order tags narrowest to broadest * Update workflow patterns * Update preview builds for new test script * Output failed targets * Rename jobs and add authentication for registries * Merge build.justfile into Justfile * README updates * Update README.md for bake changes Change `build` targets to aliases Add a `run` target that leverages docker compose Remove duplicated targets from bake definitions * Merge content bake definition into main bake definition * Change CI build target name * Unify functions between bake files * Test separating image lines * Add missing checkout command * Abandon reusing buildx builder instance * Remove bad env.target refs * Declare bash as shell * Implement reuse of base images across jobs * Remove builder references * Switch print for logging * Swap runners based on image load * Add shim for mounting DinD and deps for WGCW Add entrypoint setting to tests * Use `--init` flag on tests * Remove unused base targets Fix tests on WAML and improve logging * Turn down compression level * Update upload artifacts action * Update preview workflow to match release workflow Clean up dockerfiles * Add missing just install * Update setup-just * Adapt action to work with Previews * Move to fully parallel builds * Use bake-test-push action for previews * Improve test filtering * Remove preview base dependency * Second test filtering fix * Alias build to bake * Fix run command * Update README with test instructions --------- Co-authored-by: Chris Ostrouchov --- .github/actions/bake-test-push/action.yml | 119 ++++ .github/workflows/build-bake-preview.yaml | 357 ++++++++++++ .github/workflows/build-bake.yaml | 290 ++++++++++ .github/workflows/build-content.yaml | 215 ------- .github/workflows/build-manual.yaml | 2 +- .github/workflows/build-prerelease.yaml | 144 ----- .github/workflows/build-release.yaml | 360 ------------ .github/workflows/build-workbench-aml.yaml | 127 ----- .github/workflows/build-workbench-gcw.yaml | 99 ---- .gitignore | 2 + Justfile | 157 +++++- NEWS.md | 4 + README.md | 76 ++- ci.Justfile | 66 --- connect-content-init/Dockerfile.ubuntu2204 | 3 +- connect-content-init/Justfile | 50 -- connect-content-init/docker-compose.test.yml | 13 - connect-content-init/test/run_tests.sh | 18 +- connect/Dockerfile.ubuntu2204 | 10 +- connect/Justfile | 90 --- connect/docker-compose.test.yml | 20 - connect/test/goss.yaml | 4 +- connect/test/run_tests.sh | 21 +- content/README.md | 11 +- content/base/Dockerfile.ubuntu1804 | 2 - content/base/Dockerfile.ubuntu2204 | 2 - content/base/Justfile | 47 -- content/base/NEWS.md | 4 + content/base/README.md | 9 - content/build-images.sh | 48 -- content/docker-bake.hcl | 82 +++ content/matrix.json | 23 - content/pro/Dockerfile.ubuntu1804 | 7 +- content/pro/Dockerfile.ubuntu2204 | 7 +- content/pro/Justfile | 48 -- content/pro/NEWS.md | 4 + content/pro/README.md | 9 - docker-bake.hcl | 524 ++++++++++++++++++ docker-bake.preview.hcl | 417 ++++++++++++++ docker-compose.yml | 46 +- hadolint.yaml | 2 + package-manager/Dockerfile.ubuntu2204 | 9 +- package-manager/Justfile | 98 ---- package-manager/docker-compose.test.yml | 19 - package-manager/test/run_tests.sh | 20 +- product/base/Dockerfile.centos7 | 3 +- product/base/Dockerfile.ubuntu2204 | 3 +- product/base/Justfile | 69 --- product/base/docker-compose.test.yml | 20 - product/base/test/run_tests.sh | 17 +- product/pro/Dockerfile.centos7 | 9 +- product/pro/Dockerfile.ubuntu2204 | 9 +- product/pro/Justfile | 79 --- product/pro/docker-compose.test.yml | 22 - product/pro/test/goss.yaml | 7 +- product/pro/test/run_tests.sh | 17 +- r-session-complete/Dockerfile.centos7 | 9 +- r-session-complete/Dockerfile.ubuntu2204 | 9 +- r-session-complete/Justfile | 87 --- r-session-complete/test/goss.yaml | 2 + r-session-complete/test/run_tests.sh | 18 +- share/buildkitd.toml | 1 + share/local_buildkitd.toml | 4 + tools/export_bake_artifacts.py | 69 +++ tools/import_bake_artifacts.py | 35 ++ tools/test_bake_artifacts.py | 114 ++++ .../Dockerfile.ubuntu2004 | 5 +- .../Justfile | 116 ---- .../docker-compose.test.yml | 24 - .../test/goss.yaml | 37 +- .../test/run_tests.sh | 24 +- .../Dockerfile.ubuntu2204 | 17 +- workbench-for-microsoft-azure-ml/Justfile | 78 --- .../docker-compose.test.yml | 20 - .../test/goss.yaml | 1 + .../test/goss_vars.yaml | 1 - .../test/run_tests.sh | 26 +- workbench/Dockerfile.ubuntu2204 | 11 +- workbench/Justfile | 100 ---- workbench/docker-compose.test.yml | 20 - workbench/test/goss.yaml | 1 + workbench/test/run_tests.sh | 23 +- 82 files changed, 2387 insertions(+), 2405 deletions(-) create mode 100644 .github/actions/bake-test-push/action.yml create mode 100644 .github/workflows/build-bake-preview.yaml create mode 100644 .github/workflows/build-bake.yaml delete mode 100644 .github/workflows/build-content.yaml delete mode 100644 .github/workflows/build-prerelease.yaml delete mode 100644 .github/workflows/build-release.yaml delete mode 100644 .github/workflows/build-workbench-aml.yaml delete mode 100644 .github/workflows/build-workbench-gcw.yaml delete mode 100644 connect-content-init/Justfile delete mode 100644 connect-content-init/docker-compose.test.yml delete mode 100644 connect/Justfile delete mode 100644 connect/docker-compose.test.yml delete mode 100755 content/base/Justfile delete mode 100644 content/base/README.md delete mode 100755 content/build-images.sh create mode 100644 content/docker-bake.hcl delete mode 100644 content/matrix.json delete mode 100755 content/pro/Justfile delete mode 100644 content/pro/README.md create mode 100644 docker-bake.hcl create mode 100644 docker-bake.preview.hcl delete mode 100644 package-manager/Justfile delete mode 100644 package-manager/docker-compose.test.yml delete mode 100755 product/base/Justfile delete mode 100644 product/base/docker-compose.test.yml delete mode 100644 product/pro/Justfile delete mode 100644 product/pro/docker-compose.test.yml delete mode 100755 r-session-complete/Justfile create mode 100644 share/buildkitd.toml create mode 100644 share/local_buildkitd.toml create mode 100644 tools/export_bake_artifacts.py create mode 100644 tools/import_bake_artifacts.py create mode 100644 tools/test_bake_artifacts.py delete mode 100644 workbench-for-google-cloud-workstations/Justfile delete mode 100644 workbench-for-google-cloud-workstations/docker-compose.test.yml delete mode 100644 workbench-for-microsoft-azure-ml/Justfile delete mode 100644 workbench-for-microsoft-azure-ml/docker-compose.test.yml delete mode 100644 workbench/Justfile delete mode 100644 workbench/docker-compose.test.yml diff --git a/.github/actions/bake-test-push/action.yml b/.github/actions/bake-test-push/action.yml new file mode 100644 index 000000000..066e0bc9f --- /dev/null +++ b/.github/actions/bake-test-push/action.yml @@ -0,0 +1,119 @@ +name: 'Build/Test/Scan/Push Image' +inputs: + target: + description: Target or group to bake + required: true + type: string + bakefile: + description: Path to the bakefile + required: true + default: "docker-bake.hcl" + type: string + env-vars: + description: A semicolon delimited list of environment variables to set as overrides for the bake definition + required: false + type: string + test-image: + description: Flag to test image once built + default: true + type: boolean + push-image: + description: Flag to push image once built + default: false + type: boolean + ghcr-token: + description: Username for authentication with GHCR.io + required: true + type: string + dockerhub-username: + description: Username for authentication with DockerHub + required: true + type: string + dockerhub-token: + description: Username for authentication with DockerHub + required: true + type: string + gcp-json: + description: JSON for authenticating Google Cloud Platform + default: "" + type: string + +runs: + using: "composite" + steps: + # Setup dependencies and tools + - name: Set up Just + uses: extractions/setup-just@v2 + env: + GITHUB_TOKEN: ${{ inputs.ghcr-token }} + + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + + # Authenticate to registries + - name: Login to ghcr.io + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ inputs.ghcr-token }} + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ inputs.dockerhub-username }} + password: ${{ inputs.dockerhub-token }} + + - name: Login to GCAR us-central1 + continue-on-error: true + uses: docker/login-action@v3 + with: + registry: us-central1-docker.pkg.dev + username: _json_key + password: '${{ inputs.gcp-json }}' + + - name: Login to GCAR us + continue-on-error: true + uses: docker/login-action@v3 + with: + registry: us-docker.pkg.dev + username: _json_key + password: '${{ inputs.gcp-json }}' + + - name: Login to GCAR asia + continue-on-error: true + uses: docker/login-action@v3 + with: + registry: asia-docker.pkg.dev + username: _json_key + password: '${{ inputs.gcp-json }}' + + - name: Login to GCAR europe + continue-on-error: true + uses: docker/login-action@v3 + with: + registry: europe-docker.pkg.dev + username: _json_key + password: '${{ inputs.gcp-json }}' + + # Build, test, and push image + - name: Build + id: build + uses: docker/bake-action@v4 + with: + targets: "${{ inputs.target }}" + push: false + files: ${{ inputs.bakefile }} + + - name: Test + shell: bash + run: | + just test "${{ inputs.target }}" "${{ inputs.bakefile }}" + + - name: Push - ${{ inputs.push-image }} + uses: docker/bake-action@v4 + with: + targets: "${{ inputs.target }}" + push: ${{ inputs.push-image }} + files: ${{ inputs.bakefile }} diff --git a/.github/workflows/build-bake-preview.yaml b/.github/workflows/build-bake-preview.yaml new file mode 100644 index 000000000..fce96eff7 --- /dev/null +++ b/.github/workflows/build-bake-preview.yaml @@ -0,0 +1,357 @@ +on: + schedule: + - cron: '0 8 * * *' + - cron: '0 9 * * *' + push: + branches: + - main + - dev + - dev-rspm + pull_request: + +name: Preview - Build, Test, and Push +jobs: + versions: + name: Fetch product daily/preview versions + runs-on: ubuntu-latest + + concurrency: + group: fetch-versions-${{ github.ref }} + cancel-in-progress: true + + outputs: + WORKBENCH_DAILY_VERSION: ${{ steps.get-version.outputs.WORKBENCH_DAILY_VERSION }} + WORKBENCH_PREVIEW_VERSION: ${{ steps.get-version.outputs.WORKBENCH_PREVIEW_VERSION }} + PACKAGE_MANAGER_DAILY_VERSION: ${{ steps.get-version.outputs.PACKAGE_MANAGER_DAILY_VERSION }} + CONNECT_DAILY_VERSION: ${{ steps.get-version.outputs.CONNECT_DAILY_VERSION }} + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Just + uses: extractions/setup-just@v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Install Python dependencies + run: | + pip install requests + + - name: Get Version + id: get-version + run: | + WORKBENCH_DAILY_VERSION=$(just -f ci.Justfile get-version workbench --type=daily --local) + echo "WORKBENCH_DAILY_VERSION=$WORKBENCH_DAILY_VERSION" >> $GITHUB_OUTPUT + WORKBENCH_PREVIEW_VERSION=$(just -f ci.Justfile get-version workbench --type=preview --local) + echo "WORKBENCH_PREVIEW_VERSION=$WORKBENCH_PREVIEW_VERSION" >> $GITHUB_OUTPUT + PACKAGE_MANAGER_DAILY_VERSION=$(just -f ci.Justfile get-version package-manager --type=daily --local) + echo "PACKAGE_MANAGER_DAILY_VERSION=$PACKAGE_MANAGER_DAILY_VERSION" >> $GITHUB_OUTPUT + CONNECT_DAILY_VERSION=$(just -f ci.Justfile get-version connect --type=daily --local) + echo "CONNECT_DAILY_VERSION=$CONNECT_DAILY_VERSION" >> $GITHUB_OUTPUT + + base: + needs: [versions] + name: Base Image Previews + runs-on: ubuntu-latest-4x + + env: + target: "base-dev-images" + 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 }} + CONNECT_DAILY_VERSION: ${{ needs.versions.outputs.CONNECT_DAILY_VERSION }} + BRANCH: ${{ github.head_ref || github.ref_name }} + + concurrency: + group: bake-base-preview-${{ github.ref }} + cancel-in-progress: true + + steps: + - name: Check Out main Branch + if: github.event.schedule == '0 8 * * *' + uses: actions/checkout@v3 + with: + ref: 'main' + + - name: Check Out Repo at Triggered Branch + if: github.event.schedule != '0 8 * * *' + uses: actions/checkout@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + 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 }} + + connect-daily: + needs: [versions] + name: Connect Image - Daily + runs-on: ubuntu-latest-4x + + env: + target: "connect-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 }} + CONNECT_DAILY_VERSION: ${{ needs.versions.outputs.CONNECT_DAILY_VERSION }} + BRANCH: ${{ github.head_ref || github.ref_name }} + + concurrency: + group: bake-connect-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 }} + + connect-content-init-daily: + needs: [versions] + name: Connect Content Init - Daily + runs-on: ubuntu-latest-4x + + env: + target: "connect-content-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 }} + CONNECT_DAILY_VERSION: ${{ needs.versions.outputs.CONNECT_DAILY_VERSION }} + BRANCH: ${{ github.head_ref || github.ref_name }} + + concurrency: + group: bake-connect-content-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 }} + + package-manager-daily: + needs: [versions] + name: Package Manager - Daily + runs-on: ubuntu-latest-4x + + env: + target: "package-manager-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 }} + CONNECT_DAILY_VERSION: ${{ needs.versions.outputs.CONNECT_DAILY_VERSION }} + BRANCH: ${{ github.head_ref || github.ref_name }} + + concurrency: + group: bake-package-manager-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 }} + + r-session-complete-preview: + needs: [versions] + name: R Session Complete - Preview + runs-on: ubuntu-latest-4x + + env: + target: "r-session-complete-preview" + 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 }} + CONNECT_DAILY_VERSION: ${{ needs.versions.outputs.CONNECT_DAILY_VERSION }} + BRANCH: ${{ github.head_ref || github.ref_name }} + + concurrency: + group: bake-r-session-complete-preview-${{ 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 }} + + r-session-complete-daily: + needs: [versions] + name: R Session Complete - Daily + runs-on: ubuntu-latest-4x + + env: + target: "r-session-complete-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 }} + CONNECT_DAILY_VERSION: ${{ needs.versions.outputs.CONNECT_DAILY_VERSION }} + BRANCH: ${{ github.head_ref || github.ref_name }} + + concurrency: + group: bake-r-session-complete-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 }} + + workbench-preview: + needs: [versions] + name: Workbench - Preview + runs-on: ubuntu-latest-4x + + env: + target: "workbench-preview" + 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 }} + CONNECT_DAILY_VERSION: ${{ needs.versions.outputs.CONNECT_DAILY_VERSION }} + BRANCH: ${{ github.head_ref || github.ref_name }} + + concurrency: + group: bake-workbench-preview-${{ 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 }} + + workbench-daily: + needs: [versions] + name: Workbench - Daily + runs-on: ubuntu-latest-4x + + env: + target: "workbench-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 }} + CONNECT_DAILY_VERSION: ${{ needs.versions.outputs.CONNECT_DAILY_VERSION }} + BRANCH: ${{ github.head_ref || github.ref_name }} + + concurrency: + group: bake-workbench-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 }} diff --git a/.github/workflows/build-bake.yaml b/.github/workflows/build-bake.yaml new file mode 100644 index 000000000..734fba768 --- /dev/null +++ b/.github/workflows/build-bake.yaml @@ -0,0 +1,290 @@ +on: + schedule: + - cron: '0 8 * * 1' # Every Monday at 8:00 UTC for automatic rebuilds (pull in OS updates, security patches, etc.) + push: + branches: + - main + - dev + pull_request: + +name: Release - Build, Test, and Push +jobs: + + base: + name: Base Images + runs-on: ubuntu-latest-8x + + concurrency: + group: bake-base-${{ github.ref }} + cancel-in-progress: true + + env: + target: base-images + + 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 }} + push-image: ${{ github.ref == 'refs/heads/main' }} + 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 }}' + + connect: + name: Connect + runs-on: ubuntu-latest-4x + + concurrency: + group: bake-connect-${{ github.ref }} + cancel-in-progress: true + + env: + target: connect + + 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 }} + push-image: ${{ github.ref == 'refs/heads/main' }} + 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 }}' + + connect-content-init: + name: Connect Content Init + runs-on: ubuntu-latest-4x + + concurrency: + group: bake-connect-content-init-${{ github.ref }} + cancel-in-progress: true + + env: + target: connect-content-init + + 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 }} + push-image: ${{ github.ref == 'refs/heads/main' }} + 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 }}' + + content: + name: Content Images + runs-on: ubuntu-latest-8x + + concurrency: + group: bake-content-${{ github.ref }} + cancel-in-progress: true + + env: + target: content-images + + 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 }} + push-image: ${{ github.ref == 'refs/heads/main' }} + 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 }}' + + package-manager: + name: Package Manager + runs-on: ubuntu-latest-4x + + concurrency: + group: bake-package-manager-${{ github.ref }} + cancel-in-progress: true + + env: + target: package-manager + + 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 }} + push-image: ${{ github.ref == 'refs/heads/main' }} + 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 }}' + + r-session-complete: + name: R Session Complete + runs-on: ubuntu-latest-8x + + concurrency: + group: bake-r-session-complete-${{ github.ref }} + cancel-in-progress: true + + env: + target: r-session-complete + + 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 }} + push-image: ${{ github.ref == 'refs/heads/main' }} + 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 }}' + + workbench: + name: Workbench + runs-on: ubuntu-latest-4x + + concurrency: + group: bake-workbench-${{ github.ref }} + cancel-in-progress: true + + env: + target: workbench + + 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 }} + push-image: ${{ github.ref == 'refs/heads/main' }} + 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 }}' + + workbench-for-google-cloud-workstations: + name: Workbench for Google Cloud Workstations + runs-on: ubuntu-latest-8x + + concurrency: + group: bake-wgcw-${{ github.ref }} + cancel-in-progress: true + + env: + target: workbench-for-google-cloud-workstations + + 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 }} + push-image: ${{ github.ref == 'refs/heads/main' }} + 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 }}' + + workbench-for-microsoft-azure-ml: + name: Workbench for Microsoft Azure ML + runs-on: ubuntu-latest-8x + + concurrency: + group: bake-waml-${{ github.ref }} + cancel-in-progress: true + + env: + target: waml-images + + 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 }} + push-image: ${{ github.ref == 'refs/heads/main' }} + 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 }}' diff --git a/.github/workflows/build-content.yaml b/.github/workflows/build-content.yaml deleted file mode 100644 index 4b7db4e1c..000000000 --- a/.github/workflows/build-content.yaml +++ /dev/null @@ -1,215 +0,0 @@ -on: - push: - branches: - - main - - dev - pull_request: - -name: Content Images - Build, Test, Scan, and Push -jobs: - matrix: - runs-on: ubuntu-latest - outputs: - matrix: ${{ steps.set-matrix.outputs.matrix }} - steps: - - uses: actions/checkout@v3 - - id: set-matrix - run: | - MATRIX=$(jq -Mcr < content/matrix.json) - echo "matrix=$MATRIX" >> $GITHUB_OUTPUT - - build: - runs-on: ubuntu-latest - needs: matrix - name: content-base-${{ matrix.config.os }}-r${{ matrix.config.r }}-py${{ matrix.config.py }}--${{ github.ref }} - - permissions: - contents: read - packages: write - - concurrency: - group: content-base-${{ matrix.config.os }}-r${{ matrix.config.r }}-py${{ matrix.config.py }}-${{ github.ref }} - cancel-in-progress: true - - strategy: - fail-fast: false - matrix: - config: ${{ fromJson(needs.matrix.outputs.matrix) }} - - steps: - - name: Check Out Repo - uses: actions/checkout@v3 - - - name: Set up Just - uses: extractions/setup-just@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - 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 \ - get-content-args \ - ${{ matrix.config.r }} \ - ${{ matrix.config.py }} \ - ) - 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 \ - get-content-tags \ - content-base \ - ${{ matrix.config.r }} \ - ${{ matrix.config.py }} \ - ${{ matrix.config.os }} \ - ) - echo "IMAGE_TAGS=$IMAGE_TAGS" >> $GITHUB_OUTPUT - - - name: Build/Test/Scan/Push content base image - id: build1 - uses: ./.github/actions/build-test-scan-push - continue-on-error: true - with: - context: ./content/base - os: ${{ matrix.config.os }} - product: content-base - image-tags: ${{ steps.get-tags.outputs.IMAGE_TAGS }} - build-args: ${{ steps.get-build-args.outputs.BUILD_ARGS }} - test-image: false - push-image: ${{ github.ref == 'refs/heads/main' }} - 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 base pro image - id: build2 - if: steps.build1.outcome == 'failure' - uses: ./.github/actions/build-test-scan-push - with: - context: ./content/base - os: ${{ matrix.config.os }} - product: content-base - image-tags: ${{ steps.get-tags.outputs.IMAGE_TAGS }} - build-args: ${{ steps.get-build-args.outputs.BUILD_ARGS }} - test-image: false - push-image: ${{ github.ref == 'refs/heads/main' }} - 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 - - build-pro: - runs-on: ubuntu-latest - needs: [ matrix, build ] - name: content-pro-${{ matrix.config.os }}-r${{ matrix.config.r }}-py${{ matrix.config.py }}--${{ github.ref }} - concurrency: - group: content-pro-${{ matrix.config.os }}-r${{ matrix.config.r }}-py${{ matrix.config.py }}-${{ github.ref }} - cancel-in-progress: true - - strategy: - fail-fast: false - matrix: - config: ${{ fromJson(needs.matrix.outputs.matrix) }} - - steps: - - name: Check Out Repo - uses: actions/checkout@v3 - - - name: Set up Just - uses: extractions/setup-just@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - 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 \ - get-content-args \ - ${{ matrix.config.r }} \ - ${{ matrix.config.py }} \ - ${{ matrix.config.drivers }} \ - ) - 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 \ - get-content-tags \ - content-pro \ - ${{ matrix.config.r }} \ - ${{ matrix.config.py }} \ - ${{ matrix.config.os }} \ - ) - echo "IMAGE_TAGS=$IMAGE_TAGS" >> $GITHUB_OUTPUT - - - name: Build/Test/Scan/Push content pro image - id: build1 - uses: ./.github/actions/build-test-scan-push - continue-on-error: true - with: - context: ./content/pro - os: ${{ matrix.config.os }} - product: content-pro - image-tags: ${{ steps.get-tags.outputs.IMAGE_TAGS }} - build-args: ${{ steps.get-build-args.outputs.BUILD_ARGS }} - test-image: false - push-image: ${{ github.ref == 'refs/heads/main' }} - 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 base pro image - id: build2 - if: steps.build1.outcome == 'failure' - uses: ./.github/actions/build-test-scan-push - with: - context: ./content/pro - os: ${{ matrix.config.os }} - product: content-pro - image-tags: ${{ steps.get-tags.outputs.IMAGE_TAGS }} - build-args: ${{ steps.get-build-args.outputs.BUILD_ARGS }} - test-image: false - push-image: ${{ github.ref == 'refs/heads/main' }} - 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 diff --git a/.github/workflows/build-manual.yaml b/.github/workflows/build-manual.yaml index 2f1137a09..89cd44296 100644 --- a/.github/workflows/build-manual.yaml +++ b/.github/workflows/build-manual.yaml @@ -75,7 +75,7 @@ jobs: ref: ${{ inputs.branch }} - name: Set up Just - uses: extractions/setup-just@v1 + uses: extractions/setup-just@v2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/build-prerelease.yaml b/.github/workflows/build-prerelease.yaml deleted file mode 100644 index 470470bb9..000000000 --- a/.github/workflows/build-prerelease.yaml +++ /dev/null @@ -1,144 +0,0 @@ -on: - schedule: - # every morning at 8am UTC - # https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onschedule - # make sure to change the `if` commands below when changing the schedule - - cron: '0 8 * * *' - - cron: '0 9 * * *' - push: - branches: - - main - - dev - - dev-rspm - pull_request: - -name: Prerelease - Build, Test, Scan, and Push -jobs: - build: - runs-on: ubuntu-latest - name: build-${{ matrix.config.type }}-${{ matrix.config.product }}-${{ matrix.config.os }} - - permissions: - contents: read - packages: write - - strategy: - fail-fast: false - matrix: - config: - - {product: "workbench", type: "daily", os: "ubuntu2204", r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"} - - {product: "workbench", type: "preview", os: "ubuntu2204", r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"} - - {product: "connect", type: "daily", os: "ubuntu2204", r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"} - - {product: "connect-content-init", type: "daily", os: "ubuntu2204", r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"} - - {product: "package-manager", type: "daily", 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", type: "daily", os: "ubuntu2204", r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"} - - {product: "r-session-complete", type: "daily", 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", type: "preview", os: "ubuntu2204", r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"} - - {product: "r-session-complete", type: "preview", os: 'centos7', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.14", py-alternate: "3.8.15"} - - concurrency: - group: prerelease-build-${{ matrix.config.type }}-${{ matrix.config.product }}-${{ matrix.config.os }}-${{ github.ref }} - cancel-in-progress: true - - steps: - - name: Check Out main Branch - if: github.event.schedule == '0 8 * * *' - uses: actions/checkout@v3 - with: - ref: 'main' - - - name: Check Out Repo at Triggered Branch - if: github.event.schedule != '0 8 * * *' - 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 ${{ matrix.config.product }} --type=${{ matrix.config.type }} --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=${{ matrix.config.r-primary }} \ - R_VERSION_ALT=${{ matrix.config.r-alternate }} \ - PYTHON_VERSION=${{ matrix.config.py-primary }} \ - PYTHON_VERSION_ALT=${{ matrix.config.py-alternate }} \ - get-prerelease-args \ - ${{ matrix.config.type }} \ - ${{ matrix.config.product }} \ - ${{ matrix.config.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=${{ matrix.config.r-primary }} \ - R_VERSION_ALT=${{ matrix.config.r-alternate }} \ - PYTHON_VERSION=${{ matrix.config.py-primary }} \ - PYTHON_VERSION_ALT=${{ matrix.config.py-alternate }} \ - get-prerelease-tags \ - ${{ matrix.config.type }} \ - ${{ matrix.config.product }} \ - ${{ matrix.config.os }} \ - ${{ steps.get-version.outputs.VERSION }} \ - ) - echo "IMAGE_TAGS=$IMAGE_TAGS" >> $GITHUB_OUTPUT - - - name: Build/Test/Scan/Push base pro image - id: build1 - uses: ./.github/actions/build-test-scan-push - continue-on-error: true - with: - context: ./${{ matrix.config.product }} - os: ${{ matrix.config.os }} - product: ${{ matrix.config.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.ref == 'refs/heads/dev' || github.ref == 'refs/heads/dev-rspm' }} - 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 base pro image - id: build2 - if: steps.build1.outcome == 'failure' - uses: ./.github/actions/build-test-scan-push - with: - context: ./${{ matrix.config.product }} - os: ${{ matrix.config.os }} - product: product-base - 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.ref == 'refs/heads/dev' }} - 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 diff --git a/.github/workflows/build-release.yaml b/.github/workflows/build-release.yaml deleted file mode 100644 index 72eb2cc5b..000000000 --- a/.github/workflows/build-release.yaml +++ /dev/null @@ -1,360 +0,0 @@ -on: - schedule: - - cron: '0 12 * * 1' # If updating this value, be sure to update logic for all `push-image` arguments! - push: - branches: - - main - - dev - pull_request: - -name: Release - Build, Test, Scan, and Push -jobs: - build-base: - runs-on: ubuntu-latest - name: product-base-build-${{ matrix.config.os }}-r${{ matrix.config.r-primary }}_${{ matrix.config.r-alternate }}-py${{ matrix.config.py-primary }}_${{ matrix.config.py-alternate }} - - permissions: - contents: read - packages: write - - concurrency: - group: base-build-${{ matrix.config.os }}-r${{ matrix.config.r-primary }}_${{ matrix.config.r-alternate }}-py${{ matrix.config.py-primary }}_${{ matrix.config.py-alternate }}-${{ github.ref }} - cancel-in-progress: true - - strategy: - fail-fast: false - matrix: - config: - - {os: 'centos7', r-primary: "4.2.0", r-alternate: "3.6.2", py-primary: "3.9.5", py-alternate: "3.8.10"} - - {os: 'centos7', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.14", py-alternate: "3.8.15"} - - {os: 'ubuntu2204', r-primary: "4.2.0", r-alternate: "3.6.2", py-primary: "3.9.5", py-alternate: "3.8.10"} - - {os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.14", py-alternate: "3.8.15"} - - {os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"} - - {os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.12.1", py-alternate: "3.11.7"} - - steps: - - name: Check Out Repo - cron main - if: github.event.schedule == '0 12 * * 1' - uses: actions/checkout@v3 - with: - ref: main - - - name: Check Out Repo - if: github.event.schedule != '0 12 * * 1' - uses: actions/checkout@v3 - - - name: Set up Just - uses: extractions/setup-just@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - 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=${{ matrix.config.r-primary }} \ - R_VERSION_ALT=${{ matrix.config.r-alternate }} \ - PYTHON_VERSION=${{ matrix.config.py-primary }} \ - PYTHON_VERSION_ALT=${{ matrix.config.py-alternate }} \ - get-base-args ${{ matrix.config.os }} product-base \ - ) - 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=${{ matrix.config.r-primary }} \ - R_VERSION_ALT=${{ matrix.config.r-alternate }} \ - PYTHON_VERSION=${{ matrix.config.py-primary }} \ - PYTHON_VERSION_ALT=${{ matrix.config.py-alternate }} \ - get-base-tags ${{ matrix.config.os }} product-base \ - ) - echo "IMAGE_TAGS=$IMAGE_TAGS" >> $GITHUB_OUTPUT - - - name: Build/Test/Scan/Push base image - id: build1 - uses: ./.github/actions/build-test-scan-push - continue-on-error: true - with: - context: ./product/base - os: ${{ matrix.config.os }} - product: product-base - 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.ref == 'refs/heads/dev' || github.event.schedule == '0 12 * * 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 base pro image - id: build2 - if: steps.build1.outcome == 'failure' - uses: ./.github/actions/build-test-scan-push - with: - context: ./product/base - os: ${{ matrix.config.os }} - product: product-base - 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.ref == 'refs/heads/dev' || github.event.schedule == '0 12 * * 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 - - build-base-pro: - needs: build-base - runs-on: ubuntu-latest - name: product-base-pro-build-${{ matrix.config.os }}-r${{ matrix.config.r-primary }}_${{ matrix.config.r-alternate }}-py${{ matrix.config.py-primary }}_${{ matrix.config.py-alternate }} - - permissions: - contents: read - packages: write - - strategy: - fail-fast: false - matrix: - config: - - {os: 'centos7', r-primary: "4.2.0", r-alternate: "3.6.2", py-primary: "3.9.5", py-alternate: "3.8.10"} - - {os: 'centos7', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.14", py-alternate: "3.8.15"} - - {os: 'ubuntu2204', r-primary: "4.2.0", r-alternate: "3.6.2", py-primary: "3.9.5", py-alternate: "3.8.10"} - - {os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.14", py-alternate: "3.8.15"} - - {os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"} - - {os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.12.1", py-alternate: "3.11.7"} - - concurrency: - group: build-base-pro-${{ matrix.config.os }}-r${{ matrix.config.r-primary }}_${{ matrix.config.r-alternate }}-py${{ matrix.config.py-primary }}_${{ matrix.config.py-alternate }}-${{ github.ref }} - cancel-in-progress: true - - steps: - - name: Check Out Repo - cron main - if: github.event.schedule == '0 12 * * 1' - uses: actions/checkout@v3 - with: - ref: main - - - name: Check Out Repo - if: github.event.schedule != '0 12 * * 1' - uses: actions/checkout@v3 - - - name: Set up Just - uses: extractions/setup-just@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - 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=${{ matrix.config.r-primary }} \ - R_VERSION_ALT=${{ matrix.config.r-alternate }} \ - PYTHON_VERSION=${{ matrix.config.py-primary }} \ - PYTHON_VERSION_ALT=${{ matrix.config.py-alternate }} \ - get-base-args ${{ matrix.config.os }} product-base-pro \ - ) - 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=${{ matrix.config.r-primary }} \ - R_VERSION_ALT=${{ matrix.config.r-alternate }} \ - PYTHON_VERSION=${{ matrix.config.py-primary }} \ - PYTHON_VERSION_ALT=${{ matrix.config.py-alternate }} \ - get-base-tags ${{ matrix.config.os }} product-base-pro \ - ) - echo "IMAGE_TAGS=$IMAGE_TAGS" >> $GITHUB_OUTPUT - - - name: Build/Test/Scan/Push base pro image - id: build1 - uses: ./.github/actions/build-test-scan-push - continue-on-error: true - with: - context: ./product/pro - os: ${{ matrix.config.os }} - product: product-base-pro - 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.ref == 'refs/heads/dev' || github.event.schedule == '0 12 * * 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 base pro image - id: build2 - if: steps.build1.outcome == 'failure' - uses: ./.github/actions/build-test-scan-push - with: - context: ./product/pro - os: ${{ matrix.config.os }} - product: product-base-pro - 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.ref == 'refs/heads/dev' || github.event.schedule == '0 12 * * 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 - - build-products: - needs: [ build-base, build-base-pro ] - runs-on: ubuntu-latest - name: build-${{ matrix.config.product }}-${{ matrix.config.os }} - - permissions: - contents: read - packages: write - - strategy: - fail-fast: false - matrix: - config: - - {product: 'workbench', os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.14", py-alternate: "3.8.15"} - - {product: 'connect', os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"} - - {product: 'connect-content-init', os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"} - - {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"} - - 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 12 * * 1' - uses: actions/checkout@v3 - with: - ref: main - - - name: Check Out Repo - if: github.event.schedule != '0 12 * * 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 ${{ matrix.config.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=${{ matrix.config.r-primary }} \ - R_VERSION_ALT=${{ matrix.config.r-alternate }} \ - PYTHON_VERSION=${{ matrix.config.py-primary }} \ - PYTHON_VERSION_ALT=${{ matrix.config.py-alternate }} \ - get-product-args \ - ${{ matrix.config.product }} \ - ${{ matrix.config.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=${{ matrix.config.r-primary }} \ - R_VERSION_ALT=${{ matrix.config.r-alternate }} \ - PYTHON_VERSION=${{ matrix.config.py-primary }} \ - PYTHON_VERSION_ALT=${{ matrix.config.py-alternate }} \ - get-product-tags \ - ${{ matrix.config.product }} \ - ${{ matrix.config.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: ./${{ matrix.config.product }} - os: ${{ matrix.config.os }} - product: ${{ matrix.config.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 12 * * 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: ./${{ matrix.config.product }} - os: ${{ matrix.config.os }} - product: ${{ matrix.config.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 12 * * 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 diff --git a/.github/workflows/build-workbench-aml.yaml b/.github/workflows/build-workbench-aml.yaml deleted file mode 100644 index 9e70c1490..000000000 --- a/.github/workflows/build-workbench-aml.yaml +++ /dev/null @@ -1,127 +0,0 @@ -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 diff --git a/.github/workflows/build-workbench-gcw.yaml b/.github/workflows/build-workbench-gcw.yaml deleted file mode 100644 index 750ae7bd4..000000000 --- a/.github/workflows/build-workbench-gcw.yaml +++ /dev/null @@ -1,99 +0,0 @@ -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 GCW - Build, Test, Scan, and Push -jobs: - build-workbench-for-google-cloud-workstations: - runs-on: ubuntu-latest-4x - name: build-workbench-for-google-cloud-workstations - - 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 workbench-for-google-cloud-workstations/get-version) - 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 workbench-for-google-cloud-workstations/get-build-args) - 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 workbench-for-google-cloud-workstations/get-build-tags) - echo "IMAGE_TAGS=$IMAGE_TAGS" >> $GITHUB_OUTPUT - - - name: Build/Test/Scan/Push base pro image - id: build1 - uses: ./.github/actions/build-test-scan-push - continue-on-error: true - with: - context: ./workbench-for-google-cloud-workstations - os: ubuntu2004 - product: workbench-for-google-cloud-workstations - 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 base pro image - id: build2 - if: steps.build1.outcome == 'failure' - uses: ./.github/actions/build-test-scan-push - with: - context: ./workbench-for-google-cloud-workstations - os: ubuntu2004 - product: workbench-for-google-cloud-workstations - 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 diff --git a/.gitignore b/.gitignore index c9c09d208..f2b8f9669 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ data .idea/ tmp*/ .python-version +.out/ +.cache/ diff --git a/Justfile b/Justfile index 591527882..24f6dabad 100644 --- a/Justfile +++ b/Justfile @@ -1,3 +1,4 @@ +#!/usr/bin/env just --justfile set positional-arguments vars := "-i ''" @@ -23,6 +24,127 @@ PYTHON_VERSION_ALT_RHEL := "3.8.15" QUARTO_VERSION := "1.3.450" +export RSC_LICENSE := "" +export RSPM_LICENSE := "" +export RSW_LICENSE := "" + +# Targets for managing the buildx builder for Posit images + +# just create-builder +create-builder: + docker buildx create \ + --name posit-builder \ + --buildkitd-flags '--allow-insecure-entitlement security.insecure' \ + --buildkitd-config "{{justfile_directory()}}/share/local_buildkitd.toml" + +# just delete-builder +delete-builder: + docker buildx rm posit-builder + +# Build and bake + +# just build +alias build := bake +# just bake workbench-images +bake target="default": + just -f {{justfile()}} create-builder || true + docker buildx bake --builder=posit-builder -f docker-bake.hcl {{target}} + +# just preview-bake workbench-images dev +preview-build: + just preview-bake "default" +preview-bake target branch="$(git branch --show-current)": + just -f {{justfile()}} create-builder || true + WORKBENCH_DAILY_VERSION=$(just -f ci.Justfile get-version workbench --type=daily --local) \ + WORKBENCH_PREVIEW_VERSION=$(just -f ci.Justfile get-version workbench --type=preview --local) \ + PACKAGE_MANAGER_DAILY_VERSION=$(just -f ci.Justfile get-version package-manager --type=daily --local) \ + CONNECT_DAILY_VERSION=$(just -f ci.Justfile get-version connect --type=daily --local) \ + BRANCH="{{branch}}" \ + docker buildx bake --builder=posit-builder -f docker-bake.preview.hcl {{target}} + +content-bake: + just -f {{justfile()}} create-builder || true + cd {{justfile_directory()}}/content && docker buildx bake --builder=posit-builder + cd {{justfile_directory()}} + +# just plan +plan: + docker buildx bake -f docker-bake.hcl --print + +# just preview-plan +preview-plan branch="$(git branch --show-current)": + WORKBENCH_DAILY_VERSION=$(just -f ci.Justfile get-version workbench --type=daily --local) \ + WORKBENCH_PREVIEW_VERSION=$(just -f ci.Justfile get-version workbench --type=preview --local) \ + PACKAGE_MANAGER_DAILY_VERSION=$(just -f ci.Justfile get-version package-manager --type=daily --local) \ + CONNECT_DAILY_VERSION=$(just -f ci.Justfile get-version connect --type=daily --local) \ + BRANCH="{{branch}}" \ + docker buildx bake -f docker-bake.preview.hcl --print + +# Run tests + +# just test workbench +test target="default" file="docker-bake.hcl": + python3 {{justfile_directory()}}/tools/test_bake_artifacts.py --target "{{target}}" --file "{{file}}" + +# just preview-test connect dev +preview-test target="default" branch="$(git branch --show-current)": + #!/bin/bash + if [ -z "$WORKBENCH_DAILY_VERSION" ]; then + WORKBENCH_DAILY_VERSION=$(just -f ci.Justfile get-version workbench --type=daily --local) + fi + if [ -z "$WORKBENCH_PREVIEW_VERSION" ]; then + WORKBENCH_PREVIEW_VERSION=$(just -f ci.Justfile get-version workbench --type=preview --local) + fi + if [ -z "$PACKAGE_MANAGER_DAILY_VERSION" ]; then + PACKAGE_MANAGER_DAILY_VERSION=$(just -f ci.Justfile get-version package-manager --type=daily --local) + fi + if [ -z "$CONNECT_DAILY_VERSION" ]; then + CONNECT_DAILY_VERSION=$(just -f ci.Justfile get-version connect --type=daily --local) + fi + if [ -z "$BRANCH" ]; then + BRANCH="{{branch}}" + fi + WORKBENCH_DAILY_VERSION="${WORKBENCH_DAILY_VERSION}" \ + WORKBENCH_PREVIEW_VERSION="${WORKBENCH_PREVIEW_VERSION}" \ + PACKAGE_MANAGER_DAILY_VERSION="${PACKAGE_MANAGER_DAILY_VERSION}" \ + CONNECT_DAILY_VERSION="${CONNECT_DAILY_VERSION}" \ + BRANCH="${BRANCH}" \ + python3 {{justfile_directory()}}/tools/test_bake_artifacts.py --file docker-bake.preview.hcl --target "{{target}}" + +# just lint workbench ubuntu2204 +lint $PRODUCT $OS: + #!/usr/bin/env bash + docker run --rm -i -v $PWD/hadolint.yaml:/.config/hadolint.yaml ghcr.io/hadolint/hadolint < $PRODUCT/Dockerfile.$(just _parse-os {{OS}}) + +# Run targets + +run product tag="": + #!/bin/bash + RSC_VERSION="ubuntu2204" + RSW_VERSION="ubuntu2204" + RSPM_VERSION="ubuntu2204" + if [ "{{product}}" = "workbench" ] && [ -z "{{tag}}" ]; then + RSW_VERSION="{{tag}}" + elif [ "{{product}}" = "connect" ] && [ -z "{{tag}}" ]; then + RSC_VERSION="{{tag}}" + elif [ "{{product}}" = "package-manager" ] && [ -z "{{tag}}" ]; then + RSPM_VERSION="{{tag}}" + fi + RSW_VERSION="${RSW_VERSION}" RSC_VERSION="${RSC_VERSION}" RSPM_VERSION="${RSPM_VERSION}" \ + docker compose up \ + --no-build \ + {{product}} + +# Export/import targets + +export-artifacts target build_definition="docker-bake.hcl": + python3 {{justfile_directory()}}/tools/export_bake_artifacts.py --target "{{target}}" --file "{{build_definition}}" + +import-artifacts: + python3 {{justfile_directory()}}/tools/import_bake_artifacts.py + +# Helper targets + # just _get-tag-safe-version 2022.07.2+576.pro12 _get-tag-safe-version $VERSION: #!/usr/bin/env bash @@ -81,6 +203,8 @@ _config-license-persist-volumes TYPE PRODUCT HOST_DIR: echo "-v {{HOST_DIR}}/float:${licensing_state_root_dir}/.TurboFloat" fi +# Version and dependency version management + # just RSW_VERSION=1.2.3 R_VERSION=4.1.0 update-versions update-versions: just \ @@ -112,13 +236,11 @@ update-rsw-versions: 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" \ - r-session-complete/Justfile \ - workbench/Justfile \ - workbench-for-microsoft-azure-ml/Justfile \ 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 + sed -i '/variable WORKBENCH_VERSION/!b;n;c\ \ \ \ default = "{{ RSW_VERSION }}"' docker-bake.hcl # just RSPM_VERSION=1.2.3 update-rspm-versions update-rspm-versions: @@ -133,6 +255,7 @@ update-rspm-versions: package-manager/Justfile \ Justfile sed {{ sed_vars }} -E "s/[0-9]{4}\.[0-9]{1,2}\.[0-9]{1,2}/`just _get-clean-version {{ RSPM_VERSION }}`/g" package-manager/README.md + sed -i '/variable PACKAGE_MANAGER_VERSION/!b;n;c\ \ \ \ default = "{{ RSPM_VERSION }}"' docker-bake.hcl # just RSC_VERSION=1.2.3 update-rsc-versions update-rsc-versions: @@ -151,9 +274,11 @@ update-rsc-versions: sed {{ sed_vars }} -E "s/[0-9]{4}\.[0-9]{1,2}\.[0-9]{1,2}/`just _get-clean-version {{ RSC_VERSION }}`/g" \ connect/README.md \ connect-content-init/README.md + sed -i '/variable CONNECT_VERSION/!b;n;c\ \ \ \ default = "{{ RSC_VERSION }}"' docker-bake.hcl # just R_VERSION=3.2.1 R_VERSION_ALT=4.1.0 update-r-versions -update-r-versions: +update-r-versions: update-default-r-versions +update-default-r-versions: #!/usr/bin/env bash set -euxo pipefail # Update primary R versions @@ -197,7 +322,8 @@ update-r-versions: ci.Justfile # just PYTHON_VERSION=3.9.5 PYTHON_VERSION_ALT=3.8.10 update-py-versions -update-py-versions: +update-py-versions: update-default-py-versions +update-default-py-versions: #!/usr/bin/env bash set -euxo pipefail # Update primary Python versions @@ -267,6 +393,7 @@ update-drivers-versions: r-session-complete/Justfile \ product/pro/Justfile \ ci.Justfile + sed -i '/variable DRIVERS_VERSION/!b;n;c\ \ \ \ default = "{{ RSC_VERSION }}"' docker-bake.hcl update-quarto-versions: #!/usr/bin/env bash @@ -283,22 +410,4 @@ update-quarto-versions: connect/rstudio-connect.gcfg sed {{ sed_vars }} "s/qver=\${QUARTO_VERSION:-.*}/qver=\${QUARTO_VERSION:-{{ QUARTO_VERSION }}}/g" \ content/base/maybe_install_quarto.sh - - -# just test-image preview workbench 12.0.11-8 tag1 tag2 tag3 ... -test-image $PRODUCT $VERSION +IMAGES: - #!/usr/bin/env bash - set -euxo pipefail - IMAGES="{{IMAGES}}" - read -ra IMAGE_ARRAY <<<"$IMAGES" - just \ - R_VERSION={{R_VERSION}} \ - R_VERSION_ALT={{R_VERSION_ALT}} \ - PYTHON_VERSION={{PYTHON_VERSION}} \ - PYTHON_VERSION_ALT={{PYTHON_VERSION_ALT}} \ - $PRODUCT/test "${IMAGE_ARRAY[0]}" "$VERSION" - -# just lint workbench ubuntu2204 -lint $PRODUCT $OS: - #!/usr/bin/env bash - docker run --rm -i -v $PWD/hadolint.yaml:/.config/hadolint.yaml ghcr.io/hadolint/hadolint < $PRODUCT/Dockerfile.$(just _parse-os {{OS}}) + sed -i '/variable DEFAULT_QUARTO_VERSION/!b;n;c\ \ \ \ default = "{{ QUARTO_VERSION }}"' docker-bake.hcl diff --git a/NEWS.md b/NEWS.md index 2a981260b..857ae42d7 100644 --- a/NEWS.md +++ b/NEWS.md @@ -5,6 +5,10 @@ changed in each image. This file only captures pervasive, repository-wide changes. +# 2024-04-10 + +- Change build orchestration to use `docker buildx bake` for all images. + # 2024-03-14 - Update Professional Drivers to 2024.03.0 diff --git a/README.md b/README.md index f81e8c338..cca79afd7 100644 --- a/README.md +++ b/README.md @@ -30,17 +30,20 @@ Docker images for RStudio Professional Products - RStudio Workbench Session Images (requires the launcher) - [R Session Complete](./r-session-complete/) - Product Base Images - - [Base](./product/base) - - [Pro (with Pro Drivers)](./product/pro) + - [Product Base](./product/base) + - [Product Base Pro (includes Pro Drivers)](./product/pro) +- RStudio Connect Session Images (requires the launcher) + - [Content Base Image](./content/base/) + - [Content Base + Pro Driver Image](./content/pro/) + - [Content Init Container](./connect-content-init/) ### Preview Images *IMPORTANT:* Do not use these images. They are in preparation for a future release -- RStudio Connect Session Images (requires the launcher) - - [Content Base Image](./content/base/) - - [Content Base + Pro Driver Image](./content/pro/) - - [Content Init Container](./connect-content-init/) +- [RStudio Workbench Preview and Daily](./workbench/) +- [RStudio Connect Daily](./connect/) +- [RStudio Package Manager Daily](./package-manager/) ### Image Hierarchy And Relationship @@ -49,19 +52,21 @@ Docker images for RStudio Professional Products ```mermaid flowchart TB; + subgraph Product Base Images; + id4("Product Base") + id5("Product Base Pro") + id4-->id5 + end subgraph s1["Connect"]; id1("Connect Image") id2("Connect Content Init") id1-.-id2 + id5-->id1 end; subgraph Package Manager; id3("Package Manager Image") + id4-->id3 end; - subgraph Product Base Images; - id4("Product Base") - id5("Product Base Pro") - id4-->id5 - end subgraph Workbench; id6("Workbench Image") id7("r-session-complete") @@ -115,28 +120,49 @@ After you have cloned [rstudio-docker-products](https://github.com/rstudio/rstud own containers fairly simply with the provided Justfiles. If you're unfamiliar with `just`, please check out [their documentation](https://just.systems/man/en). If you are unable to use `just` in your organization, most targets in each Justfile can be copy/pasted into your shell and ran there with variables replaced where -appropriate. +appropriate. -To build RStudio Workbench: -``` -just workbench/build -``` -To build RStudio Connect: -``` -just connect/build -``` -To build RStudio Package Manager: +We orchestrate all our builds using `docker buildx bake`. You can learn more about the tool on +[Docker's buildx bake page](https://docs.docker.com/build/bake/), however no additional background knowledge is needed on the tool in order +to use it. + +To build all images: +```bash +just build ``` -just package-manager/build +Individual images or groups of images can also be built. For example, you can build `connect` by running: +```bash +just bake connect ``` +Here are the available targets and groups in bake. To build one, use `just bake `: +- `build` - Builds all images +- `base-images` - Builds `product/base` and `product/pro` +- `package-manager` - Builds `package-manager` +- `connect` - Builds `connect` +- `workbench` - Builds `workbench` +- `connect-content-init` - Builds `connect-content-init` +- `r-session-complete` - Builds `r-session-complete` +- `workbench-for-google-cloud-workstations` - Builds `workbench-for-google-cloud-workstations` +- `waml-images` - Builds `workbench-for-microsoft-azure-ml` stack (build, scan, and final) + +Preview images and content images are also available to build through the `docker-bake.preview.hcl` and +`content/docker-bake.hcl` files respectively or use `just preview-bake` and `just content-bake`. + You can alter what exactly is built by changing `workbench/Dockerfile.$OS`, `connect/Dockerfile.$OS`, -and `package-manager/Dockerfile.$OS`. +and `package-manager/Dockerfile.$OS`. Keep in mind that `product/base` or `product/pro` also impact what our default +image builds contain. -You can then run what you've built to test out with the `run` commands. For instance, to run the workbench container +You can then run what you've built to test out with the `run` target. For instance, to run the workbench container you have built: ``` -just workbench/run +just RSW_LICENSE="" run workbench +``` + +You can also run validation tests on the image using [Goss](https://github.com/goss-org/goss). To run the tests, use +the `test` target. For example, to test Connect you can run: +``` +just test connect ``` Note you must have a license in place, and all other instructions in separate sections are still relevant. diff --git a/ci.Justfile b/ci.Justfile index 392613192..06324e8ec 100644 --- a/ci.Justfile +++ b/ci.Justfile @@ -59,55 +59,6 @@ _get-rsw-download-url TYPE OS: get-version +NARGS: ./tools/get-version.py {{NARGS}} -# just get-base-args ubuntu2204 base|pro -get-base-args $OS $TYPE="base" $BRANCH=`git branch --show`: - #!/usr/bin/env bash - set -euxo pipefail - if [[ $TYPE == "base" || $TYPE == "product-base" ]]; then - SRC_IMAGE_NAME="" - CTX_PATH="./product/base" - FILE_PATH="./product/base/Dockerfile.${OS}" - elif [[ $TYPE == "base-pro" || $TYPE == "pro" || $TYPE == "product-base-pro" ]]; then - SRC_IMAGE_NAME="product-base" - CTX_PATH="./product/pro" - FILE_PATH="./product/pro/Dockerfile.${OS}" - fi - if [[ $BRANCH != "main" ]]; then - SRC_IMAGE_NAME="${SRC_IMAGE_NAME}-dev" - fi - - if [[ "${OS}" == "centos7" ]]; then - _DRIVERS_VERSION="{{ DRIVERS_VERSION_RHEL }}" - else - _DRIVERS_VERSION="{{ DRIVERS_VERSION }}" - fi - - printf "R_VERSION={{ R_VERSION }} - R_VERSION_ALT={{ R_VERSION_ALT }} - PYTHON_VERSION={{ PYTHON_VERSION }} - PYTHON_VERSION_ALT={{ PYTHON_VERSION_ALT }} - QUARTO_VERSION={{ QUARTO_VERSION }} - DRIVERS_VERSION=${_DRIVERS_VERSION} - SRC_IMAGE_NAME=${SRC_IMAGE_NAME}" - -# just get-base-tags ubuntu2204 base|pro -get-base-tags $OS $TYPE="base" $BRANCH=`git branch --show`: - #!/usr/bin/env bash - set -euxo pipefail - IMAGE_NAME="" - if [[ $TYPE == "base" || $TYPE == "product-base" ]]; then - IMAGE_NAME="product-base" - elif [[ $TYPE == "base-pro" || $TYPE == "pro" || $TYPE == "product-base-pro" ]]; then - IMAGE_NAME="product-base-pro" - fi - if [[ $BRANCH != "main" ]]; then - IMAGE_NAME="${IMAGE_NAME}-dev" - fi - - echo ghcr.io/rstudio/${IMAGE_NAME}:${OS}-r{{R_VERSION}}_{{R_VERSION_ALT}}-py{{PYTHON_VERSION}}_{{PYTHON_VERSION_ALT}},\ - ghcr.io/rstudio/${IMAGE_NAME}:${OS}-r{{R_VERSION}}-py{{PYTHON_VERSION}},\ - ghcr.io/rstudio/${IMAGE_NAME}:${OS} - # just get-product-args connect ubuntu2204 2023.05.0 get-product-args $PRODUCT $OS $VERSION $USE_S3="false" $BRANCH=`git branch --show` $SHA_SHORT=`git rev-parse --short HEAD`: #!/usr/bin/env bash @@ -286,20 +237,3 @@ get-prerelease-tags $TYPE $PRODUCT $OS $VERSION $BRANCH=`git branch --show`: done tags=$(IFS="," ; echo "${tag_array[*]}") echo "${tags}" - -# just get-content-args 4.2.3 3.9.17 -get-content-args r-ver py-ver drivers-ver="": - #!/usr/bin/env bash - printf "R_VERSION={{r-ver}} - PYTHON_VERSION={{py-ver}} - DRIVERS_VERSION={{drivers-ver}}" - -# just get-content-tags content-base|content-pro 4.2.3 3.9.17 ubuntu2204 -get-content-tags image-name r-ver py-ver os: - #!/usr/bin/env bash - OS=$(just _parse-os {{os}}) - OS_ALT=$(just _rev-parse-os {{os}}) - echo rstudio/{{image-name}}:r{{r-ver}}-py{{py-ver}}-${OS},\ - ghcr.io/rstudio/{{image-name}}:r{{r-ver}}-py{{py-ver}}-${OS},\ - rstudio/{{image-name}}:r{{r-ver}}-py{{py-ver}}-${OS_ALT},\ - ghcr.io/rstudio/{{image-name}}:r{{r-ver}}-py{{py-ver}}-${OS_ALT} diff --git a/connect-content-init/Dockerfile.ubuntu2204 b/connect-content-init/Dockerfile.ubuntu2204 index ac1e8be53..b0dbacaef 100644 --- a/connect-content-init/Dockerfile.ubuntu2204 +++ b/connect-content-init/Dockerfile.ubuntu2204 @@ -1,6 +1,5 @@ # Tag from https://hub.docker.com/_/ubuntu/ -FROM ubuntu:22.04 -LABEL maintainer="RStudio Connect " +FROM ubuntu:22.04 as build # Install required tools: # - ca-certificates installs necessary certificates to use cURL with HTTPS websites diff --git a/connect-content-init/Justfile b/connect-content-init/Justfile deleted file mode 100644 index 3c59f2c92..000000000 --- a/connect-content-init/Justfile +++ /dev/null @@ -1,50 +0,0 @@ -set positional-arguments - -BUILDX_PATH := "" - -IMAGE_PREFIX := "rstudio-" -PRODUCT := "connect-content-init" -IMAGE_OS := "ubuntu2204" - -RSC_VERSION := "2024.02.0" -RSC_TAG_SAFE_VERSION := replace(RSC_VERSION, "+", "-") -RSC_LICENSE := "" - -R_VERSION := "3.6.2" -R_VERSION_ALT := "4.1.0" - -PYTHON_VERSION := "3.9.5" -PYTHON_VERSION_ALT := "3.8.10" - -DEFAULT_TAG := IMAGE_PREFIX + PRODUCT + ":" + IMAGE_OS + "-" + RSC_TAG_SAFE_VERSION - -# Build Connect content init image - just build ubuntu2204 2022.10.0 rstudio/rstudio-connect-content-init:ubuntu2204-2022.10.0 -build OS=IMAGE_OS VERSION=RSC_VERSION +TAGS=DEFAULT_TAG: - #!/usr/bin/env bash - set -euxo pipefail - BUILDX_ARGS="" - if [[ "{{BUILDX_PATH}}" != "" ]]; then - BUILDX_ARGS="--cache-from=type=local,src=/tmp/.buildx-cache --cache-to=type=local,dest=/tmp/.buildx-cache" - fi - tag_array=() - for TAG in {{TAGS}} - do - tag_array+=("-t" $TAG) - done - - docker buildx --builder="{{ BUILDX_PATH }}" build --load ${BUILDX_ARGS} \ - ${tag_array[@]} \ - --build-arg RSC_VERSION="{{ VERSION }}" \ - --file=./Dockerfile.$(just -f ../Justfile _parse-os {{OS}}) . - -# Test Connect content init image - just test rstudio/rstudio-connect:ubuntu2204-2022.10.0 2022.10.0 -test TAG=DEFAULT_TAG VERSION=RSC_VERSION CMD="": - #!/usr/bin/env bash - set -euxo pipefail - IMAGE_NAME="{{ TAG }}" \ - RSC_VERSION="{{ VERSION }}" \ - docker-compose -f ./docker-compose.test.yml run sut {{ CMD }} - -# Test Connect content init image interactively - just test-i rstudio/rstudio-connect:ubuntu2204-2022.10.0 2022.10.0 -test-i TAG=DEFAULT_TAG VERSION=RSC_VERSION: - just test {{ TAG }} {{ VERSION }} bash diff --git a/connect-content-init/docker-compose.test.yml b/connect-content-init/docker-compose.test.yml deleted file mode 100644 index 0ee6998b4..000000000 --- a/connect-content-init/docker-compose.test.yml +++ /dev/null @@ -1,13 +0,0 @@ -version: '2.3' -services: - - sut: - image: $IMAGE_NAME - command: /run_tests.sh - entrypoint: [] - environment: - # uses .env by default - - RSC_VERSION - volumes: - - "./test/run_tests.sh:/run_tests.sh" - - "./test/goss.yaml:/tmp/goss.yaml" diff --git a/connect-content-init/test/run_tests.sh b/connect-content-init/test/run_tests.sh index ff787bcad..840d328ae 100755 --- a/connect-content-init/test/run_tests.sh +++ b/connect-content-init/test/run_tests.sh @@ -1,15 +1,17 @@ #!/bin/bash # install goss - -GOSS_FILE=${GOSS_FILE:-/tmp/goss.yaml} -GOSS_VARS=${GOSS_VARS:-/tmp/goss_vars.yaml} -GOSS_VERSION=${GOSS_VERSION:-0.3.8} +GOSS_FILE=${GOSS_FILE:-/test/goss.yaml} +GOSS_VERSION=${GOSS_VERSION:-0.4.6} GOSS_MAX_CONCURRENT=${GOSS_MAX_CONCURRENT:-50} -# default to empty var file (since vars are not necessary) -if [ ! -f "$GOSS_VARS" ]; then - touch $GOSS_VARS +if [ -f /etc/debian_version ]; then + OS="ubuntu" +elif [ -f /etc/centos-release ]; then + OS="centos" +else + echo "OS not supported. Exiting" + exit 1 fi # install goss to tmp location and make executable @@ -17,4 +19,4 @@ curl -sL https://github.com/aelsabbahy/goss/releases/download/v$GOSS_VERSION/gos && chmod +x /tmp/goss \ && GOSS=/tmp/goss -GOSS_FILE=$GOSS_FILE GOSS_VARS=$GOSS_VARS $GOSS v --format documentation --max-concurrent $GOSS_MAX_CONCURRENT +OS=$OS GOSS_FILE=$GOSS_FILE $GOSS v --format documentation --max-concurrent $GOSS_MAX_CONCURRENT diff --git a/connect/Dockerfile.ubuntu2204 b/connect/Dockerfile.ubuntu2204 index ead6a71d9..499957ae5 100644 --- a/connect/Dockerfile.ubuntu2204 +++ b/connect/Dockerfile.ubuntu2204 @@ -1,11 +1,5 @@ -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 SRC_IMAGE_NAME=product-base-pro -ARG REGISTRY=ghcr.io -FROM ${REGISTRY}/rstudio/${SRC_IMAGE_NAME}:ubuntu2204-r${R_VERSION}_${R_VERSION_ALT}-py${PYTHON_VERSION}_${PYTHON_VERSION_ALT} -LABEL maintainer="RStudio Docker " +# syntax=docker/dockerfile:1-labs +FROM product-base-pro as build COPY --chmod=0775 startup.sh /usr/local/bin/startup.sh diff --git a/connect/Justfile b/connect/Justfile deleted file mode 100644 index 29503409b..000000000 --- a/connect/Justfile +++ /dev/null @@ -1,90 +0,0 @@ -set positional-arguments - -BUILDX_PATH := "" - -IMAGE_PREFIX := "rstudio-" -PRODUCT := "connect" -IMAGE_OS := "ubuntu2204" - -RSC_VERSION := "2024.02.0" -RSC_LICENSE := "" -RSC_LICENSE_SERVER := "" - -R_VERSION := "4.2.3" -R_VERSION_ALT := "4.1.3" - -PYTHON_VERSION := "3.9.17" -PYTHON_VERSION_ALT := "3.8.17" - -PERSIST_LICENSE := "false" -PERSIST_LICENSE_DIR := join(justfile_directory(), "tmp-lic") - -DEFAULT_TAG := IMAGE_PREFIX + PRODUCT + ":" + IMAGE_OS + "-" + RSC_VERSION - -# Build Connect image - just build ubuntu2204 2022.10.0 rstudio/rstudio-connect:ubuntu2204-2022.10.0 -build OS=IMAGE_OS VERSION=RSC_VERSION +TAGS=DEFAULT_TAG: - #!/usr/bin/env bash - set -euxo pipefail - BUILDX_ARGS="" - if [[ "{{BUILDX_PATH}}" != "" ]]; then - BUILDX_ARGS="--cache-from=type=local,src=/tmp/.buildx-cache --cache-to=type=local,dest=/tmp/.buildx-cache" - fi - tag_array=() - for TAG in {{TAGS}} - do - tag_array+=("-t" $TAG) - done - - docker buildx --builder="{{ BUILDX_PATH }}" build --load ${BUILDX_ARGS} \ - ${tag_array[@]} \ - --build-arg RSC_VERSION="{{ VERSION }}" \ - --build-arg R_VERSION="{{ R_VERSION }}" \ - --build-arg R_VERSION_ALT="{{ R_VERSION_ALT }}" \ - --build-arg PYTHON_VERSION="{{ PYTHON_VERSION }}" \ - --build-arg PYTHON_VERSION_ALT="{{ PYTHON_VERSION_ALT }}" \ - --file=./Dockerfile.$(just -f ../Justfile _parse-os {{OS}}) . - -# Test Connect image - just test rstudio/rstudio-connect:ubuntu2204-2022.10.0 2022.10.0 -test TAG=DEFAULT_TAG VERSION=RSC_VERSION CMD="": - #!/usr/bin/env bash - set -euxo pipefail - IMAGE_NAME="{{ TAG }}" \ - RSC_VERSION="{{ VERSION }}" \ - RSC_LICENSE="{{ RSC_LICENSE }}" \ - RSC_LICENSE_SERVER="{{ RSC_LICENSE_SERVER }}" \ - R_VERSION="{{ R_VERSION }}" \ - R_VERSION_ALT="{{ R_VERSION_ALT }}" \ - PYTHON_VERSION="{{ PYTHON_VERSION }}" \ - PYTHON_VERSION_ALT="{{ PYTHON_VERSION_ALT }}" \ - docker-compose -f ./docker-compose.test.yml run sut {{ CMD }} - -# Test Connect image interactively - just test-i rstudio/rstudio-connect:ubuntu2204-2022.10.0 2022.10.0 -test-i TAG=DEFAULT_TAG VERSION=RSC_VERSION: - just test {{ TAG }} {{ VERSION }} bash - -# Run Connect - just RSC_LICENSE="" run rstudio/rstudio-connect:ubuntu2204-2022.10.0 -run TAG=DEFAULT_TAG CMD="": - #!/usr/bin/env bash - set -euxo pipefail - if [ -z "{{ RSC_LICENSE }}" ] && [ -z "{{ RSC_LICENSE_SERVER }}" ]; then - echo "Please set RSC_LICENSE or RSC_LICENSE_SERVER before running." - exit 1 - fi - - volume_opts=() - if [ {{ PERSIST_LICENSE }} = "true" ]; then - if [ {{RSC_LICENSE}} ]; then - echo "Volumes will be configured to persist license state data for an activation key." - volume_opts=$(just -f ../Justfile _config-license-persist-volumes key {{PRODUCT}} {{PERSIST_LICENSE_DIR}}) - elif [ {{RSC_LICENSE_SERVER}} ]; then - echo "Volumes will be configured to persist license state data for a floating license server." - volume_opts=$(just -f ../Justfile _config-license-persist-volumes float {{PRODUCT}} {{PERSIST_LICENSE_DIR}}) - fi - fi - - docker run -it --privileged \ - ${volume_opts[@]} \ - -p 3939:3939 \ - -e RSC_LICENSE="{{ RSC_LICENSE }}" \ - -e RSC_LICENSE_SERVER="{{ RSC_LICENSE_SERVER }}" \ - "{{ TAG }}" {{ CMD }} diff --git a/connect/docker-compose.test.yml b/connect/docker-compose.test.yml deleted file mode 100644 index 7ac851a5e..000000000 --- a/connect/docker-compose.test.yml +++ /dev/null @@ -1,20 +0,0 @@ -version: '2.3' -services: - - sut: - image: $IMAGE_NAME - command: /run_tests.sh - entrypoint: [] - privileged: true - environment: - # uses .env by default - - RSC_VERSION - - R_VERSION - - R_VERSION_ALT - - PYTHON_VERSION - - PYTHON_VERSION_ALT - - RSC_LICENSE - - RSC_LICENSE_SERVER - volumes: - - "./test/run_tests.sh:/run_tests.sh" - - "./test/goss.yaml:/tmp/goss.yaml" diff --git a/connect/test/goss.yaml b/connect/test/goss.yaml index e9d49083a..57ffaee8b 100644 --- a/connect/test/goss.yaml +++ b/connect/test/goss.yaml @@ -46,7 +46,7 @@ file: exists: true /tmp/startup.log: exists: true - contains: + contents: - "!Error: Couldn't read configuration file " # Check that `cracklib-runtime` is present so `chpasswd` works /var/cache/cracklib/cracklib_dict.pwd: @@ -58,7 +58,7 @@ command: title: connect_version_matches exit-status: 0 stdout: [ - "{{ .Env.RSC_VERSION }}" + "{{ .Env.RSC_VERSION }}" ] # Ensure correct R version "/opt/R/{{ .Env.R_VERSION }}/bin/R --version": diff --git a/connect/test/run_tests.sh b/connect/test/run_tests.sh index 250f2161f..10dcb7f75 100755 --- a/connect/test/run_tests.sh +++ b/connect/test/run_tests.sh @@ -10,19 +10,22 @@ sleep 15 echo '--> Startup complete' -GOSS_FILE=${GOSS_FILE:-/tmp/goss.yaml} -GOSS_VARS=${GOSS_VARS:-/tmp/goss_vars.yaml} -GOSS_VERSION=${GOSS_VERSION:-0.3.16} -GOSS_MAX_CONCURRENT=${GOSS_MAX_CONCURRENT:-50} - -# default to empty var file (since vars are not necessary) -if [ ! -f "$GOSS_VARS" ]; then - touch $GOSS_VARS +if [ -f /etc/debian_version ]; then + OS="ubuntu" +elif [ -f /etc/centos-release ]; then + OS="centos" +else + echo "OS not supported. Exiting" + exit 1 fi +GOSS_FILE=${GOSS_FILE:-/test/goss.yaml} +GOSS_VERSION=${GOSS_VERSION:-0.4.6} +GOSS_MAX_CONCURRENT=${GOSS_MAX_CONCURRENT:-50} + # install goss to tmp location and make executable curl -sL https://github.com/aelsabbahy/goss/releases/download/v$GOSS_VERSION/goss-linux-amd64 -o /tmp/goss \ && chmod +x /tmp/goss \ && GOSS=/tmp/goss -GOSS_FILE=$GOSS_FILE GOSS_VARS=$GOSS_VARS $GOSS v --format documentation --max-concurrent $GOSS_MAX_CONCURRENT +OS=$OS GOSS_FILE=$GOSS_FILE $GOSS v --format documentation --max-concurrent $GOSS_MAX_CONCURRENT diff --git a/content/README.md b/content/README.md index 2ba1fab83..52b52b278 100644 --- a/content/README.md +++ b/content/README.md @@ -89,20 +89,17 @@ DEBUG=1 ./scripts/build-image.sh \ ## Build matrix -The json defined in `matrix.json` is loaded by the Github Action to +The `CONTENT_BUILD_MATRIX` variable defined in [the buildx bake definition](../docker-bake.hcl) is used to determine which combinations of R and Python to use when building our `content-base` and `content-pro` images. To add a new R and Python version combination, simply update the matrix and the Github Action will publish -the new image combinations to our registries upon the next push to `main` +the new image combinations to our registries upon the next push to `main`. -**NOTE** This combination should be kept in sync with the `build-images.sh` script, as the -file `matrix.json` is used by Github Actions as described above, but the `build-images.sh` script -is used when the developer is validating the ability to build the new images locally. +To build content images locally, use `just bake content-images` from the repository root. ## Github Actions -Because of the dependency on the content-base images, the github actions that build the pro images -depend on completion of the base image builds in [build-content](../.github/workflows/build-content.yaml) +Content base and pro images are built in [build-bake](../.github/workflows/build-bake.yaml). # Licensing diff --git a/content/base/Dockerfile.ubuntu1804 b/content/base/Dockerfile.ubuntu1804 index c53d44850..9ef4363e5 100644 --- a/content/base/Dockerfile.ubuntu1804 +++ b/content/base/Dockerfile.ubuntu1804 @@ -1,8 +1,6 @@ # Using dated tags from https://hub.docker.com/_/ubuntu/ FROM ubuntu:18.04 -LABEL maintainer="RStudio Docker " - # Locale configuration --------------------------------------------------------# RUN apt-get update \ && apt-get install -y --no-install-recommends locales \ diff --git a/content/base/Dockerfile.ubuntu2204 b/content/base/Dockerfile.ubuntu2204 index 030eab0b9..118fc171c 100644 --- a/content/base/Dockerfile.ubuntu2204 +++ b/content/base/Dockerfile.ubuntu2204 @@ -1,8 +1,6 @@ # Using dated tags from https://hub.docker.com/_/ubuntu/ FROM ubuntu:22.04 -LABEL maintainer="RStudio Docker " - ARG DEBIAN_FRONTEND=noninteractive ARG DISTRIBUTION=ubuntu-2204 diff --git a/content/base/Justfile b/content/base/Justfile deleted file mode 100755 index a1defbf8a..000000000 --- a/content/base/Justfile +++ /dev/null @@ -1,47 +0,0 @@ -set positional-arguments - -BUILDX_PATH := "" - -IMAGE_PREFIX := "rstudio/" -PRODUCT := "content-base" -IMAGE_OS := "ubuntu2204" - -R_VERSION := "3.6.3" - -PYTHON_VERSION := "3.9.5" - -QUARTO_VERSION := "1.3.340" - -DEFAULT_TAG := IMAGE_PREFIX + PRODUCT + ":r" + R_VERSION + "-py" + PYTHON_VERSION + "-" + IMAGE_OS - -# Build content base image - just build ubuntu2204 3.6.3 3.9.5 rstudio/content-base:r3.6.3-py3.9.5-bionic -build OS=IMAGE_OS _R_VERSION=R_VERSION _PYTHON_VERSION=PYTHON_VERSION +TAGS="": - #!/usr/bin/env bash - set -euxo pipefail - BUILDX_ARGS="" - if [[ "{{BUILDX_PATH}}" != "" ]]; then - BUILDX_ARGS="--cache-from=type=local,src=/tmp/.buildx-cache --cache-to=type=local,dest=/tmp/.buildx-cache" - fi - - tag_array=() - if [[ "{{TAGS}}" == "" ]]; then - read -a OS_ALIASES <<< $(just -f {{ justfile_directory() }}/../../ci.Justfile _get-os-alias {{OS}}) - for os_name in ${OS_ALIASES[@]}; - do - tag_array+=( - "-t" "rstudio/{{IMAGE_PREFIX}}{{PRODUCT}}:r{{_R_VERSION}}-py{{_PYTHON_VERSION}}-${os_name}" - ) - done - else - for TAG in {{TAGS}} - do - tag_array+=("-t" $TAG) - done - fi - - docker buildx --builder="{{ BUILDX_PATH }}" build --load ${BUILDX_ARGS} \ - ${tag_array[@]} \ - --build-arg R_VERSION="{{ _R_VERSION }}" \ - --build-arg PYTHON_VERSION="{{ _PYTHON_VERSION }}" \ - --build-arg QUARTO_VERSION="{{ QUARTO_VERSION }}" \ - --file="Dockerfile.{{ OS }}" {{ justfile_directory() }} diff --git a/content/base/NEWS.md b/content/base/NEWS.md index 47839d893..363fa2a85 100644 --- a/content/base/NEWS.md +++ b/content/base/NEWS.md @@ -1,3 +1,7 @@ +# 2024-04-10 + +- Change build orchestration to `buildx bake` + # 2023-04-26 - Use the Quarto release 1.3.340 in jammy images. diff --git a/content/base/README.md b/content/base/README.md deleted file mode 100644 index eb1ef638f..000000000 --- a/content/base/README.md +++ /dev/null @@ -1,9 +0,0 @@ -## Build - -```console -# Creates rstudio/content-base:r3.6.3-py3.9.5-bionic -just build - -# Creates rstudio/content-base:r4.0.4-py3.9.2-bionic -just R_VERSION=4.0.4 PYTHON_VERSION=3.9.2 build -``` diff --git a/content/build-images.sh b/content/build-images.sh deleted file mode 100755 index ed812c3e9..000000000 --- a/content/build-images.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env bash - -set -ex - -if [ $# -eq 0 ] ; then - echo "usage: $0 ..." - echo - echo "Common uses:" - echo " $0 build" - exit 1 -fi - -TARGETS="$@" - -build() { - just R_VERSION=3.1.3 PYTHON_VERSION=2.7.18 IMAGE_OS=ubuntu1804 ${1} - just R_VERSION=3.2.5 PYTHON_VERSION=2.7.18 IMAGE_OS=ubuntu1804 ${1} - just R_VERSION=3.3.3 PYTHON_VERSION=3.6.13 IMAGE_OS=ubuntu1804 ${1} - just R_VERSION=3.3.3 PYTHON_VERSION=3.6.13 IMAGE_OS=ubuntu1804 ${1} - just R_VERSION=3.4.4 PYTHON_VERSION=3.6.13 IMAGE_OS=ubuntu1804 ${1} - just R_VERSION=3.4.4 PYTHON_VERSION=3.7.10 IMAGE_OS=ubuntu1804 ${1} - just R_VERSION=3.5.3 PYTHON_VERSION=2.7.18 IMAGE_OS=ubuntu1804 ${1} - just R_VERSION=3.5.3 PYTHON_VERSION=3.7.10 IMAGE_OS=ubuntu1804 ${1} - just R_VERSION=3.6.3 PYTHON_VERSION=2.7.18 IMAGE_OS=ubuntu1804 ${1} - just R_VERSION=3.6.3 PYTHON_VERSION=3.6.13 IMAGE_OS=ubuntu1804 ${1} - just R_VERSION=3.6.3 PYTHON_VERSION=3.8.8 IMAGE_OS=ubuntu1804 ${1} - just R_VERSION=4.0.5 PYTHON_VERSION=3.6.13 IMAGE_OS=ubuntu1804 ${1} - just R_VERSION=4.0.5 PYTHON_VERSION=3.7.10 IMAGE_OS=ubuntu1804 ${1} - just R_VERSION=4.0.5 PYTHON_VERSION=3.8.8 IMAGE_OS=ubuntu1804 ${1} - just R_VERSION=4.0.5 PYTHON_VERSION=3.9.2 IMAGE_OS=ubuntu1804 ${1} - just R_VERSION=4.1.0 PYTHON_VERSION=3.8.8 IMAGE_OS=ubuntu1804 ${1} - just R_VERSION=4.1.0 PYTHON_VERSION=3.9.2 IMAGE_OS=ubuntu1804 ${1} - just R_VERSION=4.1.3 PYTHON_VERSION=3.10.4 IMAGE_OS=ubuntu1804 ${1} - just R_VERSION=3.6.3 PYTHON_VERSION=3.8.16 IMAGE_OS=ubuntu2204 ${1} - just R_VERSION=4.0.5 PYTHON_VERSION=3.9.16 IMAGE_OS=ubuntu2204 ${1} - just R_VERSION=4.1.3 PYTHON_VERSION=3.10.11 IMAGE_OS=ubuntu2204 ${1} - just R_VERSION=4.2.2 PYTHON_VERSION=3.11.3 IMAGE_OS=ubuntu2204 ${1} -} - -# build content-base -pushd base/ -build "${TARGETS[@]}" -popd - -# build content-pro -pushd pro/ -build "${TARGETS[@]}" -popd diff --git a/content/docker-bake.hcl b/content/docker-bake.hcl new file mode 100644 index 000000000..3205ca24d --- /dev/null +++ b/content/docker-bake.hcl @@ -0,0 +1,82 @@ +variable CONTENT_BUILD_MATRIX { + default = { + builds = [ + {os = "ubuntu1804", os_alt = "bionic", r = "3.1.3", py = "2.7.18", drivers = "2024.03.0", quarto = "1.0.37"}, + {os = "ubuntu1804", os_alt = "bionic", r = "3.2.5", py = "2.7.18", drivers = "2024.03.0", quarto = "1.0.37"}, + {os = "ubuntu1804", os_alt = "bionic", r = "3.3.3", py = "3.6.13", drivers = "2024.03.0", quarto = "1.0.37"}, + {os = "ubuntu1804", os_alt = "bionic", r = "3.4.4", py = "3.6.13", drivers = "2024.03.0", quarto = "1.0.37"}, + {os = "ubuntu1804", os_alt = "bionic", r = "3.4.4", py = "3.7.10", drivers = "2024.03.0", quarto = "1.0.37"}, + {os = "ubuntu1804", os_alt = "bionic", r = "3.5.3", py = "2.7.18", drivers = "2024.03.0", quarto = "1.0.37"}, + {os = "ubuntu1804", os_alt = "bionic", r = "3.5.3", py = "3.7.10", drivers = "2024.03.0", quarto = "1.0.37"}, + {os = "ubuntu1804", os_alt = "bionic", r = "3.6.3", py = "2.7.18", drivers = "2024.03.0", quarto = "1.0.37"}, + {os = "ubuntu1804", os_alt = "bionic", r = "3.6.3", py = "3.6.13", drivers = "2024.03.0", quarto = "1.0.37"}, + {os = "ubuntu1804", os_alt = "bionic", r = "3.6.3", py = "3.8.8", drivers = "2024.03.0", quarto = "1.0.37"}, + {os = "ubuntu1804", os_alt = "bionic", r = "4.0.5", py = "3.6.13", drivers = "2024.03.0", quarto = "1.0.37"}, + {os = "ubuntu1804", os_alt = "bionic", r = "4.0.5", py = "3.7.10", drivers = "2024.03.0", quarto = "1.0.37"}, + {os = "ubuntu1804", os_alt = "bionic", r = "4.0.5", py = "3.8.8", drivers = "2024.03.0", quarto = "1.0.37"}, + {os = "ubuntu1804", os_alt = "bionic", r = "4.0.5", py = "3.9.2", drivers = "2024.03.0", quarto = "1.0.37"}, + {os = "ubuntu1804", os_alt = "bionic", r = "4.1.0", py = "3.8.8", drivers = "2024.03.0", quarto = "1.0.37"}, + {os = "ubuntu1804", os_alt = "bionic", r = "4.1.0", py = "3.9.2", drivers = "2024.03.0", quarto = "1.0.37"}, + {os = "ubuntu1804", os_alt = "bionic", r = "4.1.3", py = "3.10.4", drivers = "2024.03.0", quarto = "1.0.37"}, + {os = "ubuntu2204", os_alt = "jammy", r = "3.6.3", py = "3.8.16", drivers = "2024.03.0", quarto = "1.3.340"}, + {os = "ubuntu2204", os_alt = "jammy", r = "4.0.5", py = "3.9.16", drivers = "2024.03.0", quarto = "1.3.340"}, + {os = "ubuntu2204", os_alt = "jammy", r = "4.1.3", py = "3.10.11", drivers = "2024.03.0", quarto = "1.3.340"}, + {os = "ubuntu2204", os_alt = "jammy", r = "4.2.2", py = "3.11.3", drivers = "2024.03.0", quarto = "1.3.340"}, + ] + } +} + +group "default" { + targets = ["base", "pro"] +} + +target "base" { + name = "content-base-r${replace(builds.r, ".", "-")}-py${replace(builds.py, ".", "-")}-${builds.os}" + + tags = [ + "ghcr.io/rstudio/content-base:r${builds.r}-py${builds.py}-${builds.os}", + "ghcr.io/rstudio/content-base:r${builds.r}-py${builds.py}-${builds.os_alt}", + "docker.io/rstudio/content-base:r${builds.r}-py${builds.py}-${builds.os}", + "docker.io.io/rstudio/content-base:r${builds.r}-py${builds.py}-${builds.os_alt}", + ] + output = [ + "type=image", + ] + + dockerfile = "Dockerfile.${builds.os}" + context = "base" + + matrix = CONTENT_BUILD_MATRIX + args = { + R_VERSION = "${builds.r}" + PYTHON_VERSION = "${builds.py}" + QUARTO_VERSION = "${builds.quarto}" + } +} + +target "pro" { + name = "content-pro-r${replace(builds.r, ".", "-")}-py${replace(builds.py, ".", "-")}-${builds.os}" + + tags = [ + "ghcr.io/rstudio/content-pro:r${builds.r}-py${builds.py}-${builds.os}", + "ghcr.io/rstudio/content-pro:r${builds.r}-py${builds.py}-${builds.os_alt}", + "docker.io/rstudio/content-pro:r${builds.r}-py${builds.py}-${builds.os}", + "docker.io.io/rstudio/content-pro:r${builds.r}-py${builds.py}-${builds.os_alt}", + ] + output = [ + "type=image", + ] + + contexts = { + content-base = "target:content-base-r${replace(builds.r, ".", "-")}-py${replace(builds.py, ".", "-")}-${builds.os}" + } + + dockerfile = "Dockerfile.${builds.os}" + context = "pro" + + matrix = CONTENT_BUILD_MATRIX + args = { + R_VERSION = "${builds.r}" + DRIVERS_VERSION = "${builds.drivers}" + } +} diff --git a/content/matrix.json b/content/matrix.json deleted file mode 100644 index 163b8ddd0..000000000 --- a/content/matrix.json +++ /dev/null @@ -1,23 +0,0 @@ -[ - {"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"} -] diff --git a/content/pro/Dockerfile.ubuntu1804 b/content/pro/Dockerfile.ubuntu1804 index e3be3d7fd..7b6f34c12 100644 --- a/content/pro/Dockerfile.ubuntu1804 +++ b/content/pro/Dockerfile.ubuntu1804 @@ -1,9 +1,4 @@ -ARG PYTHON_VERSION -ARG R_VERSION -ARG REGISTRY=ghcr.io -FROM ${REGISTRY}/rstudio/content-base:r${R_VERSION}-py${PYTHON_VERSION}-ubuntu1804 - -LABEL maintainer="RStudio Docker " +FROM content-base # Install RStudio Professional Drivers ----------------------------------------# ARG DRIVERS_VERSION=2024.03.0 diff --git a/content/pro/Dockerfile.ubuntu2204 b/content/pro/Dockerfile.ubuntu2204 index 4a8066b54..7b6f34c12 100644 --- a/content/pro/Dockerfile.ubuntu2204 +++ b/content/pro/Dockerfile.ubuntu2204 @@ -1,9 +1,4 @@ -ARG PYTHON_VERSION -ARG R_VERSION -ARG REGISTRY=ghcr.io -FROM ${REGISTRY}/rstudio/content-base:r${R_VERSION}-py${PYTHON_VERSION}-ubuntu2204 - -LABEL maintainer="RStudio Docker " +FROM content-base # Install RStudio Professional Drivers ----------------------------------------# ARG DRIVERS_VERSION=2024.03.0 diff --git a/content/pro/Justfile b/content/pro/Justfile deleted file mode 100755 index 1d77ae54b..000000000 --- a/content/pro/Justfile +++ /dev/null @@ -1,48 +0,0 @@ -set positional-arguments - -BUILDX_PATH := "" - -IMAGE_PREFIX := "rstudio/" -PRODUCT := "content-pro" -IMAGE_OS := "ubuntu2204" - -R_VERSION := "3.6.3" - -PYTHON_VERSION := "3.9.5" - -DRIVERS_VERSION := "2024.03.0" -DRIVERS_VERSION_RHEL := DRIVERS_VERSION + "-1" - -DEFAULT_TAG := IMAGE_PREFIX + PRODUCT + ":r" + R_VERSION + "-py" + PYTHON_VERSION + "-" + IMAGE_OS - -# Build content pro image - just build ubuntu2204 3.6.3 3.9.5 rstudio/content-pro:r3.6.3-py3.9.5-bionic -build OS=IMAGE_OS _R_VERSION=R_VERSION _PYTHON_VERSION=PYTHON_VERSION +TAGS=DEFAULT_TAG: - #!/usr/bin/env bash - set -euxo pipefail - BUILDX_ARGS="" - if [[ "{{BUILDX_PATH}}" != "" ]]; then - BUILDX_ARGS="--cache-from=type=local,src=/tmp/.buildx-cache --cache-to=type=local,dest=/tmp/.buildx-cache" - fi - - tag_array=() - if [[ "{{TAGS}}" == "" ]]; then - read -a OS_ALIASES <<< $(just -f {{ justfile_directory() }}/../../ci.Justfile _get-os-alias {{OS}}) - for os_name in ${OS_ALIASES[@]}; - do - tag_array+=( - "-t" "rstudio/{{IMAGE_PREFIX}}{{PRODUCT}}:r{{_R_VERSION}}-py{{_PYTHON_VERSION}}-${os_name}" - ) - done - else - for TAG in {{TAGS}} - do - tag_array+=("-t" $TAG) - done - fi - - docker buildx --builder="{{ BUILDX_PATH }}" build --load ${BUILDX_ARGS} \ - ${tag_array[@]} \ - --build-arg R_VERSION="{{ _R_VERSION }}" \ - --build-arg PYTHON_VERSION="{{ _PYTHON_VERSION }}" \ - --build-arg DRIVERS_VERSION="{{ DRIVERS_VERSION }}" \ - --file="Dockerfile.{{ OS }}" {{ justfile_directory() }} diff --git a/content/pro/NEWS.md b/content/pro/NEWS.md index 530a9fc6a..8880dd7b5 100644 --- a/content/pro/NEWS.md +++ b/content/pro/NEWS.md @@ -1,3 +1,7 @@ +# 2024-04-10 + +- Change build orchestration to `buildx bake` + # 2021-07-19 - Add NEWS.md diff --git a/content/pro/README.md b/content/pro/README.md deleted file mode 100644 index 254301c50..000000000 --- a/content/pro/README.md +++ /dev/null @@ -1,9 +0,0 @@ -## Build - -```console -# Creates rstudio/content-pro:r3.6.3-py3.9.5-bionic -just build - -# Creates rstudio/content-pro:r4.0.4-py3.9.2-bionic -just R_VERSION=4.0.4 PYTHON_VERSION=3.9.2 build -``` diff --git a/docker-bake.hcl b/docker-bake.hcl new file mode 100644 index 000000000..2a521eae7 --- /dev/null +++ b/docker-bake.hcl @@ -0,0 +1,524 @@ +### Variable definitions ### +variable CONNECT_VERSION { + default = "2024.02.0" +} + +variable PACKAGE_MANAGER_VERSION { + default = "2023.12.0-13" +} + +variable WORKBENCH_VERSION { + default = "2023.12.1+402.pro1" +} + +variable DRIVERS_VERSION { + default = "2024.03.0" +} + +variable DEFAULT_QUARTO_VERSION { + default = "1.4.553" +} + +function tag_safe_version { + params = [version] + result = replace(version, "+", "-") +} + +function clean_version { + params = [version] + result = regex_replace(version, "[+|-].*", "") +} + +function get_drivers_version { + params = [os] + result = os == "centos7" ? "${DRIVERS_VERSION}-1" : DRIVERS_VERSION +} + +function get_os_alt_name { + params = [os] + result = os == "ubuntu2204" ? "jammy" : os +} + +function get_centos_tags { + params = [os, product, product_version] + result = [ + "ghcr.io/rstudio/${product}:${os}-${tag_safe_version(product_version)}", + "ghcr.io/rstudio/${product}:${os}", + "docker.io/rstudio/${product}:${os}-${tag_safe_version(product_version)}", + "docker.io/rstudio/${product}:${os}", + ] +} + +function get_ubuntu_tags { + params = [os, product, product_version] + result = [ + "ghcr.io/rstudio/${product}:${os}-${tag_safe_version(product_version)}", + "ghcr.io/rstudio/${product}:${get_os_alt_name(os)}-${tag_safe_version(product_version)}", + "ghcr.io/rstudio/${product}:${os}", + "ghcr.io/rstudio/${product}:${get_os_alt_name(os)}", + "docker.io/rstudio/${product}:${get_os_alt_name(os)}-${tag_safe_version(product_version)}", + "docker.io/rstudio/${product}:${os}-${tag_safe_version(product_version)}", + "docker.io/rstudio/${product}:${get_os_alt_name(os)}", + "docker.io/rstudio/${product}:${os}", + ] +} + +# FIXME: There's an obnoxious amount of hardcoding here due to restrictions with what bake can actually interpret from HCL. +function get_tags { + params = [os, product, product_version] + result = os == "ubuntu2204" ? get_ubuntu_tags(os, product, product_version) : get_centos_tags(os, product, product_version) +} + +### Build matrices ### + +variable BASE_BUILD_MATRIX { + default = { + builds = [ + {os = "centos7", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.14", py_alternate = "3.8.15"}, + {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.14", py_alternate = "3.8.15"}, + {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.17", py_alternate = "3.8.17"}, + {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.12.1", py_alternate = "3.11.7"}, + ] + } +} + +variable PRO_BUILD_MATRIX { + default = BASE_BUILD_MATRIX +} + +variable PACKAGE_MANAGER_BUILD_MATRIX { + default = { + builds = [ + {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.12.1", py_alternate = "3.11.7"}, + ] + } +} + +variable CONNECT_BUILD_MATRIX { + default = { + builds = [ + {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.17", py_alternate = "3.8.17"}, + ] + } +} + +variable CONNECT_CONTENT_INIT_BUILD_MATRIX { + default = { + builds = [ + {os = "ubuntu2204"}, + ] + } +} + +variable CONTENT_BUILD_MATRIX { + default = { + builds = [ + {os = "ubuntu1804", os_alt = "bionic", r = "3.1.3", py = "2.7.18", drivers = "2024.03.0", quarto = "1.0.37"}, + {os = "ubuntu1804", os_alt = "bionic", r = "3.2.5", py = "2.7.18", drivers = "2024.03.0", quarto = "1.0.37"}, + {os = "ubuntu1804", os_alt = "bionic", r = "3.3.3", py = "3.6.13", drivers = "2024.03.0", quarto = "1.0.37"}, + {os = "ubuntu1804", os_alt = "bionic", r = "3.4.4", py = "3.6.13", drivers = "2024.03.0", quarto = "1.0.37"}, + {os = "ubuntu1804", os_alt = "bionic", r = "3.4.4", py = "3.7.10", drivers = "2024.03.0", quarto = "1.0.37"}, + {os = "ubuntu1804", os_alt = "bionic", r = "3.5.3", py = "2.7.18", drivers = "2024.03.0", quarto = "1.0.37"}, + {os = "ubuntu1804", os_alt = "bionic", r = "3.5.3", py = "3.7.10", drivers = "2024.03.0", quarto = "1.0.37"}, + {os = "ubuntu1804", os_alt = "bionic", r = "3.6.3", py = "2.7.18", drivers = "2024.03.0", quarto = "1.0.37"}, + {os = "ubuntu1804", os_alt = "bionic", r = "3.6.3", py = "3.6.13", drivers = "2024.03.0", quarto = "1.0.37"}, + {os = "ubuntu1804", os_alt = "bionic", r = "3.6.3", py = "3.8.8", drivers = "2024.03.0", quarto = "1.0.37"}, + {os = "ubuntu1804", os_alt = "bionic", r = "4.0.5", py = "3.6.13", drivers = "2024.03.0", quarto = "1.0.37"}, + {os = "ubuntu1804", os_alt = "bionic", r = "4.0.5", py = "3.7.10", drivers = "2024.03.0", quarto = "1.0.37"}, + {os = "ubuntu1804", os_alt = "bionic", r = "4.0.5", py = "3.8.8", drivers = "2024.03.0", quarto = "1.0.37"}, + {os = "ubuntu1804", os_alt = "bionic", r = "4.0.5", py = "3.9.2", drivers = "2024.03.0", quarto = "1.0.37"}, + {os = "ubuntu1804", os_alt = "bionic", r = "4.1.0", py = "3.8.8", drivers = "2024.03.0", quarto = "1.0.37"}, + {os = "ubuntu1804", os_alt = "bionic", r = "4.1.0", py = "3.9.2", drivers = "2024.03.0", quarto = "1.0.37"}, + {os = "ubuntu1804", os_alt = "bionic", r = "4.1.3", py = "3.10.4", drivers = "2024.03.0", quarto = "1.0.37"}, + {os = "ubuntu2204", os_alt = "jammy", r = "3.6.3", py = "3.8.16", drivers = "2024.03.0", quarto = "1.3.340"}, + {os = "ubuntu2204", os_alt = "jammy", r = "4.0.5", py = "3.9.16", drivers = "2024.03.0", quarto = "1.3.340"}, + {os = "ubuntu2204", os_alt = "jammy", r = "4.1.3", py = "3.10.11", drivers = "2024.03.0", quarto = "1.3.340"}, + {os = "ubuntu2204", os_alt = "jammy", r = "4.2.2", py = "3.11.3", drivers = "2024.03.0", quarto = "1.3.340"}, + ] + } +} + +variable R_SESSION_COMPLETE_BUILD_MATRIX { + default = { + builds = [ + {os = "centos7", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.14", py_alternate = "3.8.15"}, + {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.14", py_alternate = "3.8.15"}, + ] + } +} + +variable WORKBENCH_BUILD_MATRIX { + default = { + builds = [ + {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.14", py_alternate = "3.8.15"}, + ] + } +} + +variable WORKBENCH_GOOGLE_CLOUD_WORKSTATION_BUILD_MATRIX { + default = { + builds = [ + {os = "ubuntu2004", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.7", py_alternate = "3.10.13"}, + ] + } +} + +variable WORKBENCH_MICROSOFT_AZURE_ML_BUILD_MATRIX { + default = { + builds = [ + {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.14", py_alternate = "3.8.15"}, + ] + } +} + +### Group definitions ### +group "default" { + targets = [ + "product-base", + "product-base-pro", + "connect", + "connect-content-init", + "content-base", + "content-pro", + "package-manager", + "r-session-complete", + "workbench", + ] +} + +group "base-images" { + targets = [ + "product-base", + "product-base-pro" + ] +} + +group "content-images" { + targets = [ + "content-base", + "content-pro" + ] +} + +group "waml-images" { + targets = [ + "build-workbench-for-microsoft-azure-ml", + "scan-workbench-for-microsoft-azure-ml", + "workbench-for-microsoft-azure-ml", + ] +} + +### Base Image targets ### +target "base" { + labels = { + "maintainer" = "Posit Docker " + } + output = ["type=image", "type=docker"] +} + +target "product-base" { + inherits = ["base"] + target = "build" + + name = "product-base-${builds.os}-r${replace(builds.r_primary, ".", "-")}_${replace(builds.r_alternate, ".", "-")}-py${replace(builds.py_primary, ".", "-")}_${replace(builds.py_alternate, ".", "-")}" + tags = [ + "ghcr.io/rstudio/product-base:${builds.os}-r${builds.r_primary}_${builds.r_alternate}-py${builds.py_primary}_${builds.py_alternate}", + "docker.io/rstudio/product-base:${builds.os}-r${builds.r_primary}_${builds.r_alternate}-py${builds.py_primary}_${builds.py_alternate}", + ] + + dockerfile = "Dockerfile.${builds.os}" + context = "product/base" + + matrix = BASE_BUILD_MATRIX + args = { + R_VERSION = builds.r_primary + R_VERSION_ALT = builds.r_alternate + PYTHON_VERSION = builds.py_primary + PYTHON_VERSION_ALT = builds.py_alternate + TINI_VERSION = "0.19.0" + QUARTO_VERSION = "1.3.340" + } +} + +target "product-base-pro" { + inherits = ["base"] + target = "build" + + name = "product-base-pro-${builds.os}-r${replace(builds.r_primary, ".", "-")}_${replace(builds.r_alternate, ".", "-")}-py${replace(builds.py_primary, ".", "-")}_${replace(builds.py_alternate, ".", "-")}" + tags = [ + "ghcr.io/rstudio/product-base-pro:${builds.os}-r${builds.r_primary}_${builds.r_alternate}-py${builds.py_primary}_${builds.py_alternate}", + "docker.io/rstudio/product-base-pro:${builds.os}-r${builds.r_primary}_${builds.r_alternate}-py${builds.py_primary}_${builds.py_alternate}", + ] + + dockerfile = "Dockerfile.${builds.os}" + context = "product/pro" + contexts = { + product-base = "target:product-base-${builds.os}-r${replace(builds.r_primary, ".", "-")}_${replace(builds.r_alternate, ".", "-")}-py${replace(builds.py_primary, ".", "-")}_${replace(builds.py_alternate, ".", "-")}" + } + + matrix = PRO_BUILD_MATRIX + args = { + R_VERSION = builds.r_primary + R_VERSION_ALT = builds.r_alternate + PYTHON_VERSION = builds.py_primary + PYTHON_VERSION_ALT = builds.py_alternate + DRIVERS_VERSION = get_drivers_version(builds.os) + TINI_VERSION = "0.19.0" + QUARTO_VERSION = "1.3.340" + } +} + +### Package Manager targets ### +target "package-manager" { + inherits = ["base"] + target = "build" + + name = "package-manager-${builds.os}-${replace(PACKAGE_MANAGER_VERSION, ".", "-")}" + tags = get_tags(builds.os, "rstudio-package-manager", PACKAGE_MANAGER_VERSION) + + dockerfile = "Dockerfile.${builds.os}" + context = "package-manager" + contexts = { + product-base = "target:product-base-${builds.os}-r${replace(builds.r_primary, ".", "-")}_${replace(builds.r_alternate, ".", "-")}-py${replace(builds.py_primary, ".", "-")}_${replace(builds.py_alternate, ".", "-")}" + } + + matrix = PACKAGE_MANAGER_BUILD_MATRIX + args = { + R_VERSION = builds.r_primary + R_VERSION_ALT = builds.r_alternate + PYTHON_VERSION = builds.py_primary + PYTHON_VERSION_ALT = builds.py_alternate + RSPM_VERSION = PACKAGE_MANAGER_VERSION + } +} + +### Connect targets ### +target "connect" { + inherits = ["base"] + target = "build" + + name = "connect-${builds.os}-${replace(CONNECT_VERSION, ".", "-")}" + tags = get_tags(builds.os, "rstudio-connect", CONNECT_VERSION) + + dockerfile = "Dockerfile.${builds.os}" + context = "connect" + contexts = { + product-base-pro = "target:product-base-pro-${builds.os}-r${replace(builds.r_primary, ".", "-")}_${replace(builds.r_alternate, ".", "-")}-py${replace(builds.py_primary, ".", "-")}_${replace(builds.py_alternate, ".", "-")}" + } + + matrix = CONNECT_BUILD_MATRIX + args = { + R_VERSION = builds.r_primary + R_VERSION_ALT = builds.r_alternate + PYTHON_VERSION = builds.py_primary + PYTHON_VERSION_ALT = builds.py_alternate + RSC_VERSION = CONNECT_VERSION + } +} + +target "connect-content-init" { + inherits = ["base"] + target = "build" + + name = "connect-content-init-${builds.os}-${replace(CONNECT_VERSION, ".", "-")}" + tags = get_tags(builds.os, "rstudio-connect-content-init", CONNECT_VERSION) + + dockerfile = "Dockerfile.${builds.os}" + context = "connect-content-init" + + matrix = CONNECT_CONTENT_INIT_BUILD_MATRIX + + args = { + RSC_VERSION = CONNECT_VERSION + } +} + +target "content-base" { + inherits = ["base"] + name = "content-base-r${replace(builds.r, ".", "-")}-py${replace(builds.py, ".", "-")}-${builds.os}" + + tags = [ + "ghcr.io/rstudio/content-base:r${builds.r}-py${builds.py}-${builds.os}", + "ghcr.io/rstudio/content-base:r${builds.r}-py${builds.py}-${builds.os_alt}", + "docker.io/rstudio/content-base:r${builds.r}-py${builds.py}-${builds.os}", + "docker.io.io/rstudio/content-base:r${builds.r}-py${builds.py}-${builds.os_alt}", + ] + + dockerfile = "Dockerfile.${builds.os}" + context = "content/base" + + matrix = CONTENT_BUILD_MATRIX + args = { + R_VERSION = "${builds.r}" + PYTHON_VERSION = "${builds.py}" + QUARTO_VERSION = "${builds.quarto}" + } +} + +target "content-pro" { + inherits = ["base"] + name = "content-pro-r${replace(builds.r, ".", "-")}-py${replace(builds.py, ".", "-")}-${builds.os}" + + tags = [ + "ghcr.io/rstudio/content-pro:r${builds.r}-py${builds.py}-${builds.os}", + "ghcr.io/rstudio/content-pro:r${builds.r}-py${builds.py}-${builds.os_alt}", + "docker.io/rstudio/content-pro:r${builds.r}-py${builds.py}-${builds.os}", + "docker.io.io/rstudio/content-pro:r${builds.r}-py${builds.py}-${builds.os_alt}", + ] + + contexts = { + content-base = "target:content-base-r${replace(builds.r, ".", "-")}-py${replace(builds.py, ".", "-")}-${builds.os}" + } + + dockerfile = "Dockerfile.${builds.os}" + context = "content/pro" + + matrix = CONTENT_BUILD_MATRIX + args = { + R_VERSION = "${builds.r}" + DRIVERS_VERSION = "${builds.drivers}" + } +} + +### Workbench targets ### +target "r-session-complete" { + inherits = ["base"] + target = "build" + + name = "r-session-complete-${builds.os}-${replace(tag_safe_version(WORKBENCH_VERSION), ".", "-")}" + tags = get_tags(builds.os, "r-session-complete", WORKBENCH_VERSION) + + dockerfile = "Dockerfile.${builds.os}" + context = "r-session-complete" + contexts = { + product-base-pro = "target:product-base-pro-${builds.os}-r${replace(builds.r_primary, ".", "-")}_${replace(builds.r_alternate, ".", "-")}-py${replace(builds.py_primary, ".", "-")}_${replace(builds.py_alternate, ".", "-")}" + } + + matrix = R_SESSION_COMPLETE_BUILD_MATRIX + args = { + R_VERSION = builds.r_primary + R_VERSION_ALT = builds.r_alternate + PYTHON_VERSION = builds.py_primary + PYTHON_VERSION_ALT = builds.py_alternate + JUPYTERLAB_VERSION = "3.6.5" + RSW_VERSION = WORKBENCH_VERSION + RSW_NAME = builds.os == "centos7" ? "rstudio-workbench-rhel" : "rstudio-workbench" + RSW_DOWNLOAD_URL = builds.os == "centos7" ? "https://s3.amazonaws.com/rstudio-ide-build/server/centos7/x86_64" : "https://download2.rstudio.org/server/jammy/amd64" + } +} + +target "workbench" { + inherits = ["base"] + + name = "workbench-${builds.os}-${replace(tag_safe_version(WORKBENCH_VERSION), ".", "-")}" + tags = get_tags(builds.os, "rstudio-workbench", WORKBENCH_VERSION) + + dockerfile = "Dockerfile.${builds.os}" + context = "workbench" + contexts = { + product-base-pro = "target:product-base-pro-${builds.os}-r${replace(builds.r_primary, ".", "-")}_${replace(builds.r_alternate, ".", "-")}-py${replace(builds.py_primary, ".", "-")}_${replace(builds.py_alternate, ".", "-")}" + } + + matrix = WORKBENCH_BUILD_MATRIX + args = { + R_VERSION = builds.r_primary + R_VERSION_ALT = builds.r_alternate + PYTHON_VERSION = builds.py_primary + PYTHON_VERSION_ALT = builds.py_alternate + PYTHON_VERSION_JUPYTER = builds.py_alternate + RSW_VERSION = WORKBENCH_VERSION + RSW_NAME = "rstudio-workbench" + RSW_DOWNLOAD_URL = "https://download2.rstudio.org/server/jammy/amd64" + } +} + +### Workbench for Google Cloud Workstations targets ### +target "workbench-for-google-cloud-workstations" { + inherits = ["base"] + + name = "workbench-for-google-cloud-workstation-${builds.os}-${replace(tag_safe_version(WORKBENCH_VERSION), ".", "-")}" + tags = [ + "us-central1-docker.pkg.dev/posit-images/cloud-workstations/workbench:${tag_safe_version(WORKBENCH_VERSION)}", + "us-central1-docker.pkg.dev/posit-images/cloud-workstations/workbench:latest", + "us-docker.pkg.dev/posit-images/cloud-workstations/workbench:${tag_safe_version(WORKBENCH_VERSION)}", + "us-docker.pkg.dev/posit-images/cloud-workstations/workbench:latest", + "europe-docker.pkg.dev/posit-images/cloud-workstations/workbench:${tag_safe_version(WORKBENCH_VERSION)}", + "europe-docker.pkg.dev/posit-images/cloud-workstations/workbench:latest", + "asia-docker.pkg.dev/posit-images/cloud-workstations/workbench:${tag_safe_version(WORKBENCH_VERSION)}", + "asia-docker.pkg.dev/posit-images/cloud-workstations/workbench:latest", + ] + + dockerfile = "Dockerfile.${builds.os}" + context = "workbench-for-google-cloud-workstations" + + matrix = WORKBENCH_GOOGLE_CLOUD_WORKSTATION_BUILD_MATRIX + args = { + R_VERSION = builds.r_primary + R_VERSION_ALT = builds.r_alternate + PYTHON_VERSION = builds.py_primary + PYTHON_VERSION_ALT = builds.py_alternate + PYTHON_VERSION_JUPYTER = builds.py_alternate + JUPYTERLAB_VERSION = "3.6.5" + QUARTO_VERSION = DEFAULT_QUARTO_VERSION + DRIVERS_VERSION = get_drivers_version(builds.os) + RSW_VERSION = WORKBENCH_VERSION + RSW_NAME = "rstudio-workbench" + RSW_DOWNLOAD_URL = "https://download2.rstudio.org/server/focal/amd64" + } +} + +### Workbench for Microsoft Azure ML targets ### + +target "build-workbench-for-microsoft-azure-ml" { + inherits = ["base"] + target = "build" + + name = "build-workbench-for-microsoft-azure-ml-${builds.os}-${replace(tag_safe_version(WORKBENCH_VERSION), ".", "-")}" + + dockerfile = "Dockerfile.${builds.os}" + context = "workbench-for-microsoft-azure-ml" + contexts = { + product-base-pro = "target:product-base-pro-${builds.os}-r${replace(builds.r_primary, ".", "-")}_${replace(builds.r_alternate, ".", "-")}-py${replace(builds.py_primary, ".", "-")}_${replace(builds.py_alternate, ".", "-")}" + } + + matrix = WORKBENCH_MICROSOFT_AZURE_ML_BUILD_MATRIX + args = { + R_VERSION = builds.r_primary + R_VERSION_ALT = builds.r_alternate + PYTHON_VERSION = builds.py_primary + PYTHON_VERSION_ALT = builds.py_alternate + PYTHON_VERSION_JUPYTER = builds.py_alternate + JUPYTERLAB_VERSION = "3.6.5" + RSW_VERSION = WORKBENCH_VERSION + RSW_NAME = "rstudio-workbench" + RSW_DOWNLOAD_URL = "https://download2.rstudio.org/server/jammy/amd64" + } +} + +target "scan-workbench-for-microsoft-azure-ml" { + inherits = ["build-workbench-for-microsoft-azure-ml-${builds.os}-${replace(tag_safe_version(WORKBENCH_VERSION), ".", "-")}"] + target = "clamav" + + name = "scan-workbench-for-microsoft-azure-ml-${builds.os}-${replace(tag_safe_version(WORKBENCH_VERSION), ".", "-")}" + + contexts = { + build = "target:build-workbench-for-microsoft-azure-ml-${builds.os}-${replace(tag_safe_version(WORKBENCH_VERSION), ".", "-")}" + } + + matrix = WORKBENCH_MICROSOFT_AZURE_ML_BUILD_MATRIX +} + +target "workbench-for-microsoft-azure-ml" { + inherits = ["build-workbench-for-microsoft-azure-ml-${builds.os}-${replace(tag_safe_version(WORKBENCH_VERSION), ".", "-")}"] + target = "final" + + name = "workbench-for-microsoft-azure-ml-${builds.os}-${replace(tag_safe_version(WORKBENCH_VERSION), ".", "-")}" + tags = get_tags(builds.os, "rstudio-workbench-for-microsoft-azure-ml", WORKBENCH_VERSION) + + contexts = { + build = "target:build-workbench-for-microsoft-azure-ml-${builds.os}-${replace(tag_safe_version(WORKBENCH_VERSION), ".", "-")}" + clamav = "target:scan-workbench-for-microsoft-azure-ml-${builds.os}-${replace(tag_safe_version(WORKBENCH_VERSION), ".", "-")}" + } + + matrix = WORKBENCH_MICROSOFT_AZURE_ML_BUILD_MATRIX +} \ No newline at end of file diff --git a/docker-bake.preview.hcl b/docker-bake.preview.hcl new file mode 100644 index 000000000..d7754bbec --- /dev/null +++ b/docker-bake.preview.hcl @@ -0,0 +1,417 @@ +### Variable definitions ### +variable BRANCH { + default = "dev" +} + +variable CONNECT_DAILY_VERSION { + default = null +} + +variable PACKAGE_MANAGER_DAILY_VERSION { + default = null +} + +variable WORKBENCH_DAILY_VERSION { + default = null +} + +variable WORKBENCH_PREVIEW_VERSION { + default = null +} + +variable DRIVERS_VERSION { + default = "2024.03.0" +} + +variable DEFAULT_QUARTO_VERSION { + default = "1.4.553" +} + +variable RSW_PREVIEW_URL_BASE { + default = "https://s3.amazonaws.com/rstudio-ide-build/server/" +} + +function get_rsw_download_url { + params = [os] + result = os == "centos7" ? "${RSW_PREVIEW_URL_BASE}centos7/x86_64" : "${RSW_PREVIEW_URL_BASE}jammy/amd64" +} + +function tag_safe_version { + params = [version] + result = replace(version, "+", "-") +} + +function clean_version { + params = [version] + result = regex_replace(version, "[+|-].*", "") +} + +function get_tag_prefix { + params = [] + result = BRANCH != "main" ? "${BRANCH}-" : "" +} + +function get_drivers_version { + params = [os] + result = os == "centos7" ? "${DRIVERS_VERSION}-1" : DRIVERS_VERSION +} + +function get_os_alt_name { + params = [os] + result = os == "ubuntu2204" ? "jammy" : os +} + +function get_centos_tags { + params = [os, product, product_version, build_type] + result = [ + "ghcr.io/rstudio/${product}:${get_tag_prefix()}${os}-${tag_safe_version(product_version)}", + "ghcr.io/rstudio/${product}:${get_tag_prefix()}${os}-${clean_version(product_version)}", + "ghcr.io/rstudio/${product}:${get_tag_prefix()}${os}-${build_type}", + "docker.io/rstudio/${product}:${get_tag_prefix()}${os}-${tag_safe_version(product_version)}", + "docker.io/rstudio/${product}:${get_tag_prefix()}${os}-${clean_version(product_version)}", + "docker.io/rstudio/${product}:${get_tag_prefix()}${os}-${build_type}", + ] +} + +function get_ubuntu_tags { + params = [os, product, product_version, build_type] + result = [ + "ghcr.io/rstudio/${product}:${get_tag_prefix()}${os}-${tag_safe_version(product_version)}", + "ghcr.io/rstudio/${product}:${get_tag_prefix()}${get_os_alt_name(os)}-${tag_safe_version(product_version)}", + "ghcr.io/rstudio/${product}:${get_tag_prefix()}${os}-${clean_version(product_version)}", + "ghcr.io/rstudio/${product}:${get_tag_prefix()}${get_os_alt_name(os)}-${clean_version(product_version)}", + "ghcr.io/rstudio/${product}:${get_tag_prefix()}${os}-${build_type}", + "ghcr.io/rstudio/${product}:${get_tag_prefix()}${get_os_alt_name(os)}-${build_type}", + "docker.io/rstudio/${product}:${get_tag_prefix()}${os}-${tag_safe_version(product_version)}", + "docker.io/rstudio/${product}:${get_tag_prefix()}${get_os_alt_name(os)}-${tag_safe_version(product_version)}", + "docker.io/rstudio/${product}:${get_tag_prefix()}${os}-${clean_version(product_version)}", + "docker.io/rstudio/${product}:${get_tag_prefix()}${get_os_alt_name(os)}-${clean_version(product_version)}", + "docker.io/rstudio/${product}:${get_tag_prefix()}${os}-${build_type}", + "docker.io/rstudio/${product}:${get_tag_prefix()}${get_os_alt_name(os)}-${build_type}", + ] +} + +# FIXME: There's an obnoxious amount of hardcoding in tag-related functions due to restrictions with what bake can actually interpret from HCL. +function get_tags { + params = [os, product, product_version, build_type] + result = os == "ubuntu2204" ? get_ubuntu_tags(os, product, product_version, build_type) : get_centos_tags(os, product, product_version, build_type) +} + +### Build matrices ### +variable BASE_BUILD_MATRIX { + default = { + builds = [ + {os = "centos7", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14"}, + {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14"}, + ] + } +} + +variable PRO_BUILD_MATRIX { + default = BASE_BUILD_MATRIX +} + +variable PACKAGE_MANAGER_BUILD_MATRIX { + default = { + builds = [ + {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14"}, + ] + } +} + +variable CONNECT_BUILD_MATRIX { + default = { + builds = [ + {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14"}, + ] + } +} + +variable CONNECT_CONTENT_INIT_BUILD_MATRIX { + default = { + builds = [ + {os = "ubuntu2204"}, + ] + } +} + +variable R_SESSION_COMPLETE_BUILD_MATRIX { + default = { + builds = [ + {os = "centos7", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14"}, + {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14"}, + ] + } +} + +variable WORKBENCH_BUILD_MATRIX { + default = { + builds = [ + {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14"}, + ] + } +} + +### Group definitions ### +group "default" { + targets = [ + "product-base-dev", + "product-base-pro-dev", + "connect-daily", + "connect-content-init-daily", + "package-manager-daily", + "r-session-complete-preview", + "r-session-complete-daily", + "workbench-preview", + "workbench-daily", + ] +} + +group "base-dev-images" { + targets = [ + "product-base-dev", + "product-base-pro-dev", + ] +} + +group "r-session-complete-images" { + targets = [ + "r-session-complete-daily", + "r-session-complete-preview", + ] +} + +group "workbench-images" { + targets = [ + "workbench-daily", + "workbench-preview", + ] +} + +### Dev Base Image targets ### +target "base" { + labels = { + "maintainer" = "Posit Docker " + } + output = ["type=image", "type=docker"] +} + +target "product-base-dev" { + inherits = ["base"] + target = "build" + + name = "product-base-dev-${builds.os}-r${replace(builds.r_primary, ".", "-")}_${replace(builds.r_alternate, ".", "-")}-py${replace(builds.py_primary, ".", "-")}_${replace(builds.py_alternate, ".", "-")}" + tags = [ + "ghcr.io/rstudio/product-base-dev:${builds.os}-r${builds.r_primary}_${builds.r_alternate}-py${builds.py_primary}_${builds.py_alternate}", + "docker.io/rstudio/product-base-dev:${builds.os}-r${builds.r_primary}_${builds.r_alternate}-py${builds.py_primary}_${builds.py_alternate}", + ] + + dockerfile = "Dockerfile.${builds.os}" + context = "product/base" + + matrix = BASE_BUILD_MATRIX + args = { + R_VERSION = builds.r_primary + R_VERSION_ALT = builds.r_alternate + PYTHON_VERSION = builds.py_primary + PYTHON_VERSION_ALT = builds.py_alternate + TINI_VERSION = "0.19.0" + QUARTO_VERSION = "1.3.340" + } +} + +target "product-base-pro-dev" { + inherits = ["base"] + target = "build" + + name = "product-base-pro-dev-${builds.os}-r${replace(builds.r_primary, ".", "-")}_${replace(builds.r_alternate, ".", "-")}-py${replace(builds.py_primary, ".", "-")}_${replace(builds.py_alternate, ".", "-")}" + tags = [ + "ghcr.io/rstudio/product-base-pro-dev:${builds.os}-r${builds.r_primary}_${builds.r_alternate}-py${builds.py_primary}_${builds.py_alternate}", + "docker.io/rstudio/product-base-pro-dev:${builds.os}-r${builds.r_primary}_${builds.r_alternate}-py${builds.py_primary}_${builds.py_alternate}", + ] + + dockerfile = "Dockerfile.${builds.os}" + context = "product/pro" + contexts = { + product-base = "target:product-base-dev-${builds.os}-r${replace(builds.r_primary, ".", "-")}_${replace(builds.r_alternate, ".", "-")}-py${replace(builds.py_primary, ".", "-")}_${replace(builds.py_alternate, ".", "-")}" + } + + matrix = PRO_BUILD_MATRIX + args = { + R_VERSION = builds.r_primary + R_VERSION_ALT = builds.r_alternate + PYTHON_VERSION = builds.py_primary + PYTHON_VERSION_ALT = builds.py_alternate + DRIVERS_VERSION = get_drivers_version(builds.os) + TINI_VERSION = "0.19.0" + QUARTO_VERSION = "1.3.340" + } +} + +### Package Manager targets ### +target "package-manager-daily" { + inherits = ["base"] + target = "build" + + name = "package-manager-daily-${builds.os}-${replace(PACKAGE_MANAGER_DAILY_VERSION, ".", "-")}" + tags = get_tags(builds.os, "rstudio-package-manager-preview", PACKAGE_MANAGER_DAILY_VERSION, "daily") + + dockerfile = "Dockerfile.${builds.os}" + context = "package-manager" + contexts = { + product-base = "target:product-base-dev-${builds.os}-r${replace(builds.r_primary, ".", "-")}_${replace(builds.r_alternate, ".", "-")}-py${replace(builds.py_primary, ".", "-")}_${replace(builds.py_alternate, ".", "-")}" + } + + matrix = PACKAGE_MANAGER_BUILD_MATRIX + args = { + R_VERSION = builds.r_primary + R_VERSION_ALT = builds.r_alternate + PYTHON_VERSION = builds.py_primary + PYTHON_VERSION_ALT = builds.py_alternate + RSPM_VERSION = PACKAGE_MANAGER_DAILY_VERSION + } +} + +### Connect targets ### +target "connect-daily" { + inherits = ["base"] + target = "build" + + name = "connect-daily-${builds.os}-${replace(tag_safe_version(CONNECT_DAILY_VERSION), ".", "-")}" + tags = get_tags(builds.os, "rstudio-connect-preview", CONNECT_DAILY_VERSION, "daily") + + dockerfile = "Dockerfile.${builds.os}" + context = "connect" + contexts = { + product-base-pro = "target:product-base-pro-dev-${builds.os}-r${replace(builds.r_primary, ".", "-")}_${replace(builds.r_alternate, ".", "-")}-py${replace(builds.py_primary, ".", "-")}_${replace(builds.py_alternate, ".", "-")}" + } + + matrix = CONNECT_BUILD_MATRIX + args = { + R_VERSION = builds.r_primary + R_VERSION_ALT = builds.r_alternate + PYTHON_VERSION = builds.py_primary + PYTHON_VERSION_ALT = builds.py_alternate + RSC_VERSION = CONNECT_DAILY_VERSION + } +} + +target "connect-content-init-daily" { + inherits = ["base"] + target = "build" + + name = "connect-content-init-daily-${builds.os}-${replace(tag_safe_version(CONNECT_DAILY_VERSION), ".", "-")}" + tags = get_tags(builds.os, "rstudio-connect-content-init-preview", CONNECT_DAILY_VERSION, "daily") + + dockerfile = "Dockerfile.${builds.os}" + context = "connect-content-init" + + matrix = CONNECT_CONTENT_INIT_BUILD_MATRIX + + args = { + RSC_VERSION = CONNECT_DAILY_VERSION + } +} + +### Workbench targets ### +target "r-session-complete-daily" { + inherits = ["base"] + target = "build" + + name = "r-session-complete-daily-${builds.os}-${replace(tag_safe_version(WORKBENCH_DAILY_VERSION), ".", "-")}" + tags = get_tags(builds.os, "r-session-complete-preview", WORKBENCH_DAILY_VERSION, "daily") + + dockerfile = "Dockerfile.${builds.os}" + context = "r-session-complete" + contexts = { + product-base-pro = "target:product-base-pro-dev-${builds.os}-r${replace(builds.r_primary, ".", "-")}_${replace(builds.r_alternate, ".", "-")}-py${replace(builds.py_primary, ".", "-")}_${replace(builds.py_alternate, ".", "-")}" + } + + matrix = R_SESSION_COMPLETE_BUILD_MATRIX + args = { + R_VERSION = builds.r_primary + R_VERSION_ALT = builds.r_alternate + PYTHON_VERSION = builds.py_primary + PYTHON_VERSION_ALT = builds.py_alternate + JUPYTERLAB_VERSION = "3.6.5" + RSW_VERSION = WORKBENCH_DAILY_VERSION + RSW_NAME = builds.os == "centos7" ? "rstudio-workbench-rhel" : "rstudio-workbench" + RSW_DOWNLOAD_URL = get_rsw_download_url(builds.os) + } +} + +target "r-session-complete-preview" { + inherits = ["base"] + target = "build" + + name = "r-session-complete-preview-${builds.os}-${replace(tag_safe_version(WORKBENCH_PREVIEW_VERSION), ".", "-")}" + tags = get_tags(builds.os, "r-session-complete-preview", WORKBENCH_PREVIEW_VERSION, "preview") + + dockerfile = "Dockerfile.${builds.os}" + context = "r-session-complete" + contexts = { + product-base-pro = "target:product-base-pro-dev-${builds.os}-r${replace(builds.r_primary, ".", "-")}_${replace(builds.r_alternate, ".", "-")}-py${replace(builds.py_primary, ".", "-")}_${replace(builds.py_alternate, ".", "-")}" + } + + matrix = R_SESSION_COMPLETE_BUILD_MATRIX + args = { + R_VERSION = builds.r_primary + R_VERSION_ALT = builds.r_alternate + PYTHON_VERSION = builds.py_primary + PYTHON_VERSION_ALT = builds.py_alternate + JUPYTERLAB_VERSION = "3.6.5" + RSW_VERSION = WORKBENCH_PREVIEW_VERSION + RSW_NAME = builds.os == "centos7" ? "rstudio-workbench-rhel" : "rstudio-workbench" + RSW_DOWNLOAD_URL = get_rsw_download_url(builds.os) + } +} + +target "workbench-daily" { + inherits = ["base"] + + name = "workbench-daily-${builds.os}-${replace(tag_safe_version(WORKBENCH_DAILY_VERSION), ".", "-")}" + tags = get_tags(builds.os, "rstudio-workbench-preview", WORKBENCH_DAILY_VERSION, "daily") + + dockerfile = "Dockerfile.${builds.os}" + context = "workbench" + contexts = { + product-base-pro = "target:product-base-pro-dev-${builds.os}-r${replace(builds.r_primary, ".", "-")}_${replace(builds.r_alternate, ".", "-")}-py${replace(builds.py_primary, ".", "-")}_${replace(builds.py_alternate, ".", "-")}" + } + + matrix = WORKBENCH_BUILD_MATRIX + args = { + R_VERSION = builds.r_primary + R_VERSION_ALT = builds.r_alternate + PYTHON_VERSION = builds.py_primary + PYTHON_VERSION_ALT = builds.py_alternate + PYTHON_VERSION_JUPYTER = builds.py_alternate + RSW_VERSION = WORKBENCH_DAILY_VERSION + RSW_NAME = "rstudio-workbench" + RSW_DOWNLOAD_URL = get_rsw_download_url(builds.os) + } +} + +target "workbench-preview" { + inherits = ["base"] + + name = "workbench-preview-${builds.os}-${replace(tag_safe_version(WORKBENCH_PREVIEW_VERSION), ".", "-")}" + tags = get_tags(builds.os, "rstudio-workbench-preview", WORKBENCH_PREVIEW_VERSION, "preview") + + dockerfile = "Dockerfile.${builds.os}" + context = "workbench" + contexts = { + product-base-pro = "target:product-base-pro-dev-${builds.os}-r${replace(builds.r_primary, ".", "-")}_${replace(builds.r_alternate, ".", "-")}-py${replace(builds.py_primary, ".", "-")}_${replace(builds.py_alternate, ".", "-")}" + } + + matrix = WORKBENCH_BUILD_MATRIX + args = { + R_VERSION = builds.r_primary + R_VERSION_ALT = builds.r_alternate + PYTHON_VERSION = builds.py_primary + PYTHON_VERSION_ALT = builds.py_alternate + PYTHON_VERSION_JUPYTER = builds.py_alternate + RSW_VERSION = WORKBENCH_PREVIEW_VERSION + RSW_NAME = "rstudio-workbench" + RSW_DOWNLOAD_URL = get_rsw_download_url(builds.os) + } +} diff --git a/docker-compose.yml b/docker-compose.yml index 149b95df2..20bf3ec58 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,55 +1,31 @@ -version: "3.5" +version: "3" services: - rstudio-workbench: + workbench: container_name: rstudio-workbench - build: - context: ./workbench - dockerfile: "Dockerfile.${IMAGE_OS:-ubuntu2204}" - args: - RSW_VERSION: 2023.12.1+402.pro1 - image: rstudio/rstudio-workbench:2023.12.0 + image: rstudio/rstudio-workbench:${RSW_VERSION:-ubuntu2204} environment: RSW_LICENSE: ${RSW_LICENSE} LICENSE_SERVER: ${RSW_LICENSE_SERVER} ports: - - 8787:8787 - - 5559:5559 - volumes: - - ./workbench/conf/:/etc/rstudio - - ./data/rsw:/home + - "127.0.0.1:8787:8787" + - "127.0.0.1:5559:5559" - rstudio-connect: + connect: container_name: rstudio-connect - build: - context: ./connect - dockerfile: "Dockerfile.${IMAGE_OS:-ubuntu1804}" - args: - RSC_VERSION: 2024.02.0 - image: rstudio/rstudio-connect:2024.02.0 + image: rstudio/rstudio-connect:${RSC_VERSION:-ubuntu2204} privileged: true environment: RSC_LICENSE: ${RSC_LICENSE} LICENSE_SERVER: ${RSC_LICENSE_SERVER} ports: - - 3939:3939 - volumes: - - ./connect/rstudio-connect.gcfg:/etc/rstudio-connect/rstudio-connect.gcfg - - ./data/rsc:/data + - "127.0.0.1:3939:3939" - rstudio-package-manager: + package-manager: container_name: rstudio-package-manager - build: - context: ./package-manager - dockerfile: "Dockerfile.${IMAGE_OS:-ubuntu2204}" - args: - RSPM_VERSION: 2023.12.0-13 - image: rstudio/rstudio-package-manager:2023.12.0 + image: rstudio/rstudio-package-manager:${RSPM_VERSION:-ubuntu2204} environment: RSPM_LICENSE: ${RSPM_LICENSE} LICENSE_SERVER: ${RSPM_LICENSE_SERVER} ports: - - 4242:4242 - volumes: - - ./package-manager/rstudio-pm.gcfg:/etc/rstudio-pm/rstudio-pm.gcfg - - ./data/rspm:/data + - "127.0.0.1:4242:4242" diff --git a/hadolint.yaml b/hadolint.yaml index bf071e06c..6548cc9c6 100644 --- a/hadolint.yaml +++ b/hadolint.yaml @@ -1,5 +1,7 @@ failure-threshold: warning ignored: + # Suppresses warning for not explicitly tagging FROM images. Docker buildx bake is handling FROM image injection. + - DL3006 # Suppresses warning for version pinning on apt installs. We currently do not practice this approach. - DL3008 # Suppresses warning for version pinning on yum installs. We currently do not practice this approach. diff --git a/package-manager/Dockerfile.ubuntu2204 b/package-manager/Dockerfile.ubuntu2204 index 06c052be2..2a2c26902 100644 --- a/package-manager/Dockerfile.ubuntu2204 +++ b/package-manager/Dockerfile.ubuntu2204 @@ -1,11 +1,4 @@ -ARG R_VERSION=4.2.3 -ARG R_VERSION_ALT=4.1.3 -ARG PYTHON_VERSION=3.12.1 -ARG PYTHON_VERSION_ALT=3.11.7 -ARG SRC_IMAGE_NAME=product-base -ARG REGISTRY=ghcr.io -FROM ${REGISTRY}/rstudio/${SRC_IMAGE_NAME}:ubuntu2204-r${R_VERSION}_${R_VERSION_ALT}-py${PYTHON_VERSION}_${PYTHON_VERSION_ALT} -LABEL maintainer="RStudio Docker " +FROM product-base as build ARG PYTHON_VERSION=3.9.17 ARG PYTHON_VERSION_ALT=3.8.17 diff --git a/package-manager/Justfile b/package-manager/Justfile deleted file mode 100644 index cb03a2f40..000000000 --- a/package-manager/Justfile +++ /dev/null @@ -1,98 +0,0 @@ -set positional-arguments - -BUILDX_PATH := "" - -IMAGE_PREFIX := "rstudio-" -PRODUCT := "package-manager" -IMAGE_OS := "ubuntu2204" - -RSPM_VERSION := "2023.12.0-13" -RSPM_LICENSE := "" -RSPM_LICENSE_SERVER := "" - -R_VERSION := "4.2.3" -R_VERSION_ALT := "4.1.3" - -PYTHON_VERSION := "3.12.1" -PYTHON_VERSION_ALT := "3.11.7" - -PERSIST_LICENSE := "false" -PERSIST_LICENSE_DIR := join(justfile_directory(), "tmp-lic") - -_make-default-tag OS=IMAGE_OS: - echo "{{IMAGE_PREFIX}}{{PRODUCT}}:{{OS}}-$(just -f ../Justfile _get-tag-safe-version {{RSPM_VERSION}})" - -# Build Package Manager image - just build ubuntu2204 2022.07.2-11 rstudio/rstudio-package-manager:ubuntu2204-2022.07.2-11 -build OS=IMAGE_OS VERSION=RSPM_VERSION *TAGS="": - #!/usr/bin/env bash - set -euxo pipefail - BUILDX_ARGS="" - if [[ "{{BUILDX_PATH}}" != "" ]]; then - BUILDX_ARGS="--cache-from=type=local,src=/tmp/.buildx-cache --cache-to=type=local,dest=/tmp/.buildx-cache" - fi - - if [[ "{{TAGS}}" == "" ]]; then - raw_tag_array=($(just _make-default-tag {{OS}})) - else - raw_tag_array=("{{TAGS}}") - fi - - tag_array=() - for tag in $raw_tag_array - do - tag_array+=("-t" $tag) - done - - docker buildx --builder="{{ BUILDX_PATH }}" build --load ${BUILDX_ARGS} \ - ${tag_array[@]} \ - --build-arg RSPM_VERSION="{{ VERSION }}" \ - --build-arg R_VERSION="{{ R_VERSION }}" \ - --build-arg R_VERSION_ALT="{{ R_VERSION_ALT }}" \ - --build-arg PYTHON_VERSION="{{ PYTHON_VERSION }}" \ - --build-arg PYTHON_VERSION_ALT="{{ PYTHON_VERSION_ALT }}" \ - --file=./Dockerfile.$(just -f ../Justfile _parse-os {{OS}}) . - -# Test Package Manager image - just test rstudio/rstudio-package-manager:ubuntu2204-2022.07.2-11 2022.07.2-11 -test TAG=`just _make-default-tag` VERSION=RSPM_VERSION CMD="": - #!/usr/bin/env bash - set -euxo pipefail - IMAGE_NAME="{{ TAG }}" \ - RSPM_VERSION="{{ VERSION }}" \ - RSPM_LICENSE="{{ RSPM_LICENSE }}" \ - RSPM_LICENSE_SERVER="{{ RSPM_LICENSE_SERVER }}" \ - R_VERSION="{{ R_VERSION }}" \ - R_VERSION_ALT="{{ R_VERSION_ALT }}" \ - PYTHON_VERSION="{{ PYTHON_VERSION }}" \ - PYTHON_VERSION_ALT="{{ PYTHON_VERSION_ALT }}" \ - docker-compose -f ./docker-compose.test.yml run sut {{ CMD }} - -# Test Package Manager image interactively - just test-i rstudio/rstudio-package-manager:ubuntu2204-2022.07.2-11 2022.07.2-11 -test-i TAG=`just _make-default-tag` VERSION=RSPM_VERSION: - just test {{ TAG }} {{ VERSION }} bash - -# Run Package Manager - just RSPM_LICENSE="" run rstudio/rstudio-package-manager:ubuntu2204-2022.07.2-11 -run TAG=`just _make-default-tag` CMD="": - #!/usr/bin/env bash - set -euxo pipefail - if [ -z "{{ RSPM_LICENSE }}" ] && [ -z "{{ RSPM_LICENSE_SERVER }}" ]; then - echo "Please set RSPM_LICENSE or RSPM_LICENSE_SERVER before running." - exit 1 - fi - - volume_opts=() - if [ {{ PERSIST_LICENSE }} = "true" ]; then - if [ {{RSPM_LICENSE}} ]; then - echo "Volumes will be configured to persist license state data for an activation key." - volume_opts=$(just -f ../Justfile _config-license-persist-volumes key {{PRODUCT}} {{PERSIST_LICENSE_DIR}}) - elif [ {{RSPM_LICENSE_SERVER}} ]; then - echo "Volumes will be configured to persist license state data for a floating license server." - volume_opts=$(just -f ../Justfile _config-license-persist-volumes float {{PRODUCT}} {{PERSIST_LICENSE_DIR}}) - fi - fi - - docker run -it \ - ${volume_opts[@]} \ - -p 4242:4242 \ - -e RSPM_LICENSE="{{ RSPM_LICENSE }}" \ - -e RSPM_LICENSE_SERVER="{{ RSPM_LICENSE_SERVER }}" \ - "{{ TAG }}" {{ CMD }} diff --git a/package-manager/docker-compose.test.yml b/package-manager/docker-compose.test.yml deleted file mode 100644 index d1279b981..000000000 --- a/package-manager/docker-compose.test.yml +++ /dev/null @@ -1,19 +0,0 @@ -version: '2.3' -services: - - sut: - image: $IMAGE_NAME - command: /run_tests.sh - entrypoint: [] - environment: - # uses .env by default - - RSPM_VERSION - - R_VERSION - - R_VERSION_ALT - - PYTHON_VERSION - - PYTHON_VERSION_ALT - - RSPM_LICENSE - - RSPM_LICENSE_SERVER - volumes: - - "./test/run_tests.sh:/run_tests.sh" - - "./test/goss.yaml:/tmp/goss.yaml" diff --git a/package-manager/test/run_tests.sh b/package-manager/test/run_tests.sh index 98227a949..4cf48553d 100755 --- a/package-manager/test/run_tests.sh +++ b/package-manager/test/run_tests.sh @@ -1,5 +1,6 @@ #!/bin/bash +# start connect trap 'err=$?; echo >&2 "run_tests.sh encountered an error: $err"; cat /tmp/startup.log; exit $err' ERR # start package manager @@ -8,16 +9,17 @@ tini -- /usr/local/bin/startup.sh >/tmp/startup.log 2>&1 & echo '--> Waiting for startup' sleep 15 -echo '--> Startup (hopefully) complete' - -GOSS_FILE=${GOSS_FILE:-/tmp/goss.yaml} -GOSS_VARS=${GOSS_VARS:-/tmp/goss_vars.yaml} -GOSS_VERSION=${GOSS_VERSION:-0.3.16} +GOSS_FILE=${GOSS_FILE:-/test/goss.yaml} +GOSS_VERSION=${GOSS_VERSION:-0.4.6} GOSS_MAX_CONCURRENT=${GOSS_MAX_CONCURRENT:-50} -# default to empty var file (since vars are not necessary) -if [ ! -f "$GOSS_VARS" ]; then - touch $GOSS_VARS +if [ -f /etc/debian_version ]; then + OS="ubuntu" +elif [ -f /etc/centos-release ]; then + OS="centos" +else + echo "OS not supported. Exiting" + exit 1 fi # install goss to tmp location and make executable @@ -25,4 +27,4 @@ curl -sL https://github.com/aelsabbahy/goss/releases/download/v$GOSS_VERSION/gos && chmod +x /tmp/goss \ && GOSS=/tmp/goss -GOSS_FILE=$GOSS_FILE GOSS_VARS=$GOSS_VARS $GOSS v --format documentation --max-concurrent $GOSS_MAX_CONCURRENT +OS=$OS GOSS_FILE=$GOSS_FILE $GOSS v --format documentation --max-concurrent $GOSS_MAX_CONCURRENT diff --git a/product/base/Dockerfile.centos7 b/product/base/Dockerfile.centos7 index 273410824..f000c4322 100644 --- a/product/base/Dockerfile.centos7 +++ b/product/base/Dockerfile.centos7 @@ -1,5 +1,4 @@ -FROM centos:7 -LABEL maintainer="Posit Docker " +FROM centos:7 as build ### ARG declarations ### ARG R_VERSION=4.2.0 diff --git a/product/base/Dockerfile.ubuntu2204 b/product/base/Dockerfile.ubuntu2204 index f326b3e31..8e574e524 100644 --- a/product/base/Dockerfile.ubuntu2204 +++ b/product/base/Dockerfile.ubuntu2204 @@ -1,5 +1,4 @@ -FROM ubuntu:22.04 -LABEL maintainer="Posit Docker " +FROM ubuntu:22.04 as build ### ARG declarations ### ARG DEBIAN_FRONTEND=noninteractive diff --git a/product/base/Justfile b/product/base/Justfile deleted file mode 100755 index 00c603788..000000000 --- a/product/base/Justfile +++ /dev/null @@ -1,69 +0,0 @@ -set positional-arguments - -BUILDX_PATH := "" - -PRODUCT := "product-base" -IMAGE_OS := "ubuntu2204" - -IMAGE_REGISTRY := "rstudio" - -R_VERSION := "4.2.3" -R_VERSION_ALT := "4.1.3" - -PYTHON_VERSION := "3.9.17" -PYTHON_VERSION_ALT := "3.8.17" - -TINI_VERSION := "0.19.0" -QUARTO_VERSION := "1.3.340" - -_make-default-tag OS=IMAGE_OS: - echo "{{IMAGE_REGISTRY}}/{{PRODUCT}}:{{OS}}-r{{R_VERSION}}_{{R_VERSION_ALT}}-py{{PYTHON_VERSION}}_{{PYTHON_VERSION_ALT}}" - -# Build base image - just build ubuntu2204 rstudio/product-base:ubuntu2204 -build OS=IMAGE_OS *TAGS="": - #!/usr/bin/env bash - set -euxo pipefail - BUILDX_ARGS="" - if [[ "{{BUILDX_PATH}}" != "" ]]; then - BUILDX_ARGS="--cache-from=type=local,src=/tmp/.buildx-cache --cache-to=type=local,dest=/tmp/.buildx-cache" - fi - - if [[ "{{TAGS}}" == "" ]]; then - raw_tag_array=($(just _make-default-tag {{OS}})) - else - raw_tag_array=("{{TAGS}}") - fi - - tag_array=() - for TAG in {{TAGS}} - do - tag_array+=("-t" $TAG) - done - - docker buildx --builder="{{ BUILDX_PATH }}" build --load ${BUILDX_ARGS} \ - ${tag_array[@]} \ - --build-arg R_VERSION="{{ R_VERSION }}" \ - --build-arg R_VERSION_ALT="{{ R_VERSION_ALT }}" \ - --build-arg PYTHON_VERSION="{{ PYTHON_VERSION }}" \ - --build-arg PYTHON_VERSION_ALT="{{ PYTHON_VERSION_ALT }}" \ - --build-arg TINI_VERSION="{{ TINI_VERSION }}" \ - --build-arg QUARTO_VERSION="{{ QUARTO_VERSION }}" \ - --file=./Dockerfile.$(just -f ../../Justfile _parse-os {{OS}}) . - -# Test base image - just test rstudio/product-base:ubuntu2204 -test TAG=`just _make-default-tag` CMD="": - #!/usr/bin/env bash - set -euxo pipefail - IMAGE_NAME="{{ TAG }}" \ - R_VERSION="{{ R_VERSION }}" \ - R_VERSION_ALT="{{ R_VERSION_ALT }}" \ - PYTHON_VERSION="{{ PYTHON_VERSION }}" \ - PYTHON_VERSION_ALT="{{ PYTHON_VERSION_ALT }}" \ - QUARTO_VERSION="{{ QUARTO_VERSION }}" \ - TINI_VERSION="{{ TINI_VERSION }}" \ - OS="{{ IMAGE_OS }}" \ - docker-compose -f ./docker-compose.test.yml run sut {{ CMD }} - -# Test base image interactively - just test-i rstudio/product-base:ubuntu2204 -test-i TAG=`just _make-default-tag`: - just test {{ TAG }} bash diff --git a/product/base/docker-compose.test.yml b/product/base/docker-compose.test.yml deleted file mode 100644 index bbd42874b..000000000 --- a/product/base/docker-compose.test.yml +++ /dev/null @@ -1,20 +0,0 @@ -version: '2.3' -services: - - sut: - image: $IMAGE_NAME - command: /run_tests.sh - entrypoint: [] - privileged: true - environment: - # uses .env by default - - R_VERSION - - R_VERSION_ALT - - PYTHON_VERSION - - PYTHON_VERSION_ALT - - TINI_VERSION - - QUARTO_VERSION - - OS - volumes: - - "./test/run_tests.sh:/run_tests.sh" - - "./test/goss.yaml:/tmp/goss.yaml" diff --git a/product/base/test/run_tests.sh b/product/base/test/run_tests.sh index 1f355886e..c18d6a8cd 100755 --- a/product/base/test/run_tests.sh +++ b/product/base/test/run_tests.sh @@ -5,14 +5,17 @@ trap 'err=$?; echo >&2 "run_tests.sh encountered an error: $err"; cat /tmp/start echo '--> Startup complete' -GOSS_FILE=${GOSS_FILE:-/tmp/goss.yaml} -GOSS_VARS=${GOSS_VARS:-/tmp/goss_vars.yaml} -GOSS_VERSION=${GOSS_VERSION:-0.3.16} +GOSS_FILE=${GOSS_FILE:-/test/goss.yaml} +GOSS_VERSION=${GOSS_VERSION:-0.4.6} GOSS_MAX_CONCURRENT=${GOSS_MAX_CONCURRENT:-50} -# default to empty var file (since vars are not necessary) -if [ ! -f "$GOSS_VARS" ]; then - touch $GOSS_VARS +if [ -f /etc/debian_version ]; then + OS="ubuntu" +elif [ -f /etc/centos-release ]; then + OS="centos" +else + echo "OS not supported. Exiting" + exit 1 fi # install goss to tmp location and make executable @@ -20,4 +23,4 @@ curl -sL https://github.com/aelsabbahy/goss/releases/download/v$GOSS_VERSION/gos && chmod +x /tmp/goss \ && GOSS=/tmp/goss -GOSS_FILE=$GOSS_FILE GOSS_VARS=$GOSS_VARS $GOSS v --format documentation --max-concurrent $GOSS_MAX_CONCURRENT +OS=$OS GOSS_FILE=$GOSS_FILE $GOSS v --format documentation --max-concurrent $GOSS_MAX_CONCURRENT diff --git a/product/pro/Dockerfile.centos7 b/product/pro/Dockerfile.centos7 index 0214e2ab9..936611e8c 100644 --- a/product/pro/Dockerfile.centos7 +++ b/product/pro/Dockerfile.centos7 @@ -1,11 +1,4 @@ -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 SRC_IMAGE_NAME=product-base -ARG REGISTRY=ghcr.io -FROM ${REGISTRY}/rstudio/${SRC_IMAGE_NAME}:centos7-r${R_VERSION}_${R_VERSION_ALT}-py${PYTHON_VERSION}_${PYTHON_VERSION_ALT} -LABEL maintainer="Posit Docker " +FROM product-base as build ARG R_VERSION=4.2.0 ARG R_VERSION_ALT=3.6.2 diff --git a/product/pro/Dockerfile.ubuntu2204 b/product/pro/Dockerfile.ubuntu2204 index 3914cffbb..f17dbfc22 100644 --- a/product/pro/Dockerfile.ubuntu2204 +++ b/product/pro/Dockerfile.ubuntu2204 @@ -1,11 +1,4 @@ -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 SRC_IMAGE_NAME=product-base -ARG REGISTRY=ghcr.io -FROM ${REGISTRY}/rstudio/${SRC_IMAGE_NAME}:ubuntu2204-r${R_VERSION}_${R_VERSION_ALT}-py${PYTHON_VERSION}_${PYTHON_VERSION_ALT} -LABEL maintainer="Posit Docker " +FROM product-base as build ARG DEBIAN_FRONTEND=noninteractive ARG R_VERSION=4.2.3 diff --git a/product/pro/Justfile b/product/pro/Justfile deleted file mode 100644 index d07474f01..000000000 --- a/product/pro/Justfile +++ /dev/null @@ -1,79 +0,0 @@ -set positional-arguments - -BUILDX_PATH := "" - -PRODUCT := "product-base-pro" -IMAGE_OS := "ubuntu2204" - -IMAGE_REGISTRY := "rstudio" - -R_VERSION := "4.2.3" -R_VERSION_ALT := "4.1.3" - -PYTHON_VERSION := "3.9.17" -PYTHON_VERSION_ALT := "3.8.17" - -TINI_VERSION := "0.19.0" -QUARTO_VERSION := "1.3.340" - -DRIVERS_VERSION := "2024.03.0" -DRIVERS_VERSION_RHEL := DRIVERS_VERSION + "-1" - -_make-default-tag OS=IMAGE_OS: - echo "{{IMAGE_REGISTRY}}/{{PRODUCT}}:{{OS}}-r{{R_VERSION}}_{{R_VERSION_ALT}}-py{{PYTHON_VERSION}}_{{PYTHON_VERSION_ALT}}" - -# Build base pro image - just build ubuntu2204 rstudio/product-base-pro:ubuntu2204 -build OS=IMAGE_OS *TAGS="": - #!/usr/bin/env bash - set -euxo pipefail - BUILDX_ARGS="" - if [[ "{{BUILDX_PATH}}" != "" ]]; then - BUILDX_ARGS="--cache-from=type=local,src=/tmp/.buildx-cache --cache-to=type=local,dest=/tmp/.buildx-cache" - fi - - if [[ "{{TAGS}}" == "" ]]; then - raw_tag_array=($(just _make-default-tag {{OS}})) - else - raw_tag_array=("{{TAGS}}") - fi - - if [[ "{{ OS }}" == "centos7" ]]; then - _DRIVERS_VERSION="{{ DRIVERS_VERSION_RHEL }}" - else - _DRIVERS_VERSION="{{ DRIVERS_VERSION }}" - fi - - tag_array=() - for TAG in $raw_tag_array - do - tag_array+=("-t" $TAG) - done - - docker buildx --builder="{{ BUILDX_PATH }}" build --load ${BUILDX_ARGS} \ - ${tag_array[@]} \ - --build-arg R_VERSION="{{ R_VERSION }}" \ - --build-arg R_VERSION_ALT="{{ R_VERSION_ALT }}" \ - --build-arg PYTHON_VERSION="{{ PYTHON_VERSION }}" \ - --build-arg PYTHON_VERSION_ALT="{{ PYTHON_VERSION_ALT }}" \ - --build-arg DRIVERS_VERSION="${_DRIVERS_VERSION}" \ - --file=./Dockerfile.$(just -f ../../Justfile _parse-os {{OS}}) . - -# Test base image - just test rstudio/product-base-pro:ubuntu2204 -test TAG=`just _make-default-tag` CMD="": - #!/usr/bin/env bash - set -euxo pipefail - - IMAGE_NAME="{{ TAG }}" \ - R_VERSION="{{ R_VERSION }}" \ - R_VERSION_ALT="{{ R_VERSION_ALT }}" \ - PYTHON_VERSION="{{ PYTHON_VERSION }}" \ - PYTHON_VERSION_ALT="{{ PYTHON_VERSION_ALT }}" \ - QUARTO_VERSION="{{ QUARTO_VERSION }}" \ - TINI_VERSION="{{ TINI_VERSION }}" \ - DRIVERS_VERSION="{{ DRIVERS_VERSION }}" \ - OS="{{ IMAGE_OS }}" \ - docker-compose -f ./docker-compose.test.yml run sut {{ CMD }} - -# Test base image interactively - just test-i rstudio/product-base-pro:ubuntu2204 -test-i TAG=`just _make-default-tag`: - just test {{ TAG }} bash diff --git a/product/pro/docker-compose.test.yml b/product/pro/docker-compose.test.yml deleted file mode 100644 index e34b86fa5..000000000 --- a/product/pro/docker-compose.test.yml +++ /dev/null @@ -1,22 +0,0 @@ -version: '2.3' -services: - - sut: - image: $IMAGE_NAME - command: /run_tests.sh - entrypoint: [] - privileged: true - environment: - # uses .env by default - - R_VERSION - - R_VERSION_ALT - - PYTHON_VERSION - - PYTHON_VERSION_ALT - - TINI_VERSION - - QUARTO_VERSION - - DRIVERS_VERSION - - DRIVERS_VERSION_RHEL - - OS - volumes: - - "./test/run_tests.sh:/run_tests.sh" - - "./test/goss.yaml:/tmp/goss.yaml" diff --git a/product/pro/test/goss.yaml b/product/pro/test/goss.yaml index 53ea2a34a..8670095d9 100644 --- a/product/pro/test/goss.yaml +++ b/product/pro/test/goss.yaml @@ -22,7 +22,12 @@ package: rstudio-drivers: installed: true versions: - - {{ trimSuffix "-1" .Env.DRIVERS_VERSION }} # RHEL driver doesn't print the "-1" suffix in the package name + {{if .Env.OS | regexMatch "ubuntu.*"}} + - {{ .Env.DRIVERS_VERSION }} # RHEL driver doesn't print the "-1" suffix in the package name + {{end}} + {{if .Env.OS | regexMatch "centos.*"}} + - {{ .Env.DRIVERS_VERSION }}.el + {{end}} file: /opt/R/{{.Env.R_VERSION}}/bin/R: diff --git a/product/pro/test/run_tests.sh b/product/pro/test/run_tests.sh index 1f355886e..c18d6a8cd 100755 --- a/product/pro/test/run_tests.sh +++ b/product/pro/test/run_tests.sh @@ -5,14 +5,17 @@ trap 'err=$?; echo >&2 "run_tests.sh encountered an error: $err"; cat /tmp/start echo '--> Startup complete' -GOSS_FILE=${GOSS_FILE:-/tmp/goss.yaml} -GOSS_VARS=${GOSS_VARS:-/tmp/goss_vars.yaml} -GOSS_VERSION=${GOSS_VERSION:-0.3.16} +GOSS_FILE=${GOSS_FILE:-/test/goss.yaml} +GOSS_VERSION=${GOSS_VERSION:-0.4.6} GOSS_MAX_CONCURRENT=${GOSS_MAX_CONCURRENT:-50} -# default to empty var file (since vars are not necessary) -if [ ! -f "$GOSS_VARS" ]; then - touch $GOSS_VARS +if [ -f /etc/debian_version ]; then + OS="ubuntu" +elif [ -f /etc/centos-release ]; then + OS="centos" +else + echo "OS not supported. Exiting" + exit 1 fi # install goss to tmp location and make executable @@ -20,4 +23,4 @@ curl -sL https://github.com/aelsabbahy/goss/releases/download/v$GOSS_VERSION/gos && chmod +x /tmp/goss \ && GOSS=/tmp/goss -GOSS_FILE=$GOSS_FILE GOSS_VARS=$GOSS_VARS $GOSS v --format documentation --max-concurrent $GOSS_MAX_CONCURRENT +OS=$OS GOSS_FILE=$GOSS_FILE $GOSS v --format documentation --max-concurrent $GOSS_MAX_CONCURRENT diff --git a/r-session-complete/Dockerfile.centos7 b/r-session-complete/Dockerfile.centos7 index ae766c0ba..b3ec72edb 100644 --- a/r-session-complete/Dockerfile.centos7 +++ b/r-session-complete/Dockerfile.centos7 @@ -1,11 +1,4 @@ -ARG R_VERSION=4.2.3 -ARG R_VERSION_ALT=4.1.3 -ARG PYTHON_VERSION=3.9.14 -ARG PYTHON_VERSION_ALT=3.8.15 -ARG SRC_IMAGE_NAME=product-base-pro -ARG REGISTRY=ghcr.io -FROM ${REGISTRY}/rstudio/${SRC_IMAGE_NAME}:centos7-r${R_VERSION}_${R_VERSION_ALT}-py${PYTHON_VERSION}_${PYTHON_VERSION_ALT} -LABEL maintainer="RStudio Docker "` +FROM product-base-pro as build ARG R_VERSION=4.2.3 ARG R_VERSION_ALT=4.1.3 diff --git a/r-session-complete/Dockerfile.ubuntu2204 b/r-session-complete/Dockerfile.ubuntu2204 index 1f3018b24..9bef24ac4 100644 --- a/r-session-complete/Dockerfile.ubuntu2204 +++ b/r-session-complete/Dockerfile.ubuntu2204 @@ -1,11 +1,4 @@ -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 SRC_IMAGE_NAME=product-base-pro -ARG REGISTRY=ghcr.io -FROM ${REGISTRY}/rstudio/${SRC_IMAGE_NAME}:ubuntu2204-r${R_VERSION}_${R_VERSION_ALT}-py${PYTHON_VERSION}_${PYTHON_VERSION_ALT} -LABEL maintainer="RStudio Docker " +FROM product-base-pro as build ARG DEBIAN_FRONTEND=noninteractive ARG R_VERSION=4.2.3 diff --git a/r-session-complete/Justfile b/r-session-complete/Justfile deleted file mode 100755 index da24d8304..000000000 --- a/r-session-complete/Justfile +++ /dev/null @@ -1,87 +0,0 @@ -set positional-arguments - -BUILDX_PATH := "" - -IMAGE_PREFIX := "" -PRODUCT := "r-session-complete" -IMAGE_OS := "ubuntu2204" - -RSW_VERSION := "2023.12.1+402.pro1" -RSW_LICENSE := "" - -DRIVERS_VERSION := "2024.03.0" -DRIVERS_VERSION_RHEL := DRIVERS_VERSION + "-1" - -R_VERSION := "4.2.3" -R_VERSION_ALT := "4.1.3" - -PYTHON_VERSION := "3.9.14" -PYTHON_VERSION_ALT := "3.8.15" - -_make-default-tag OS=IMAGE_OS: - echo "{{IMAGE_PREFIX}}{{PRODUCT}}:{{OS}}-$(just -f ../Justfile _get-tag-safe-version {{RSW_VERSION}})" - -# Build r-session-complete image - just build ubuntu2204 2022.07.2+576.pro12 rstudio/r-session-complete:ubuntu2204-2022.07.2-576.pro12 -build OS=IMAGE_OS VERSION=RSW_VERSION *TAGS="": - #!/usr/bin/env bash - set -euxo pipefail - BUILDX_ARGS="" - if [[ "{{BUILDX_PATH}}" != "" ]]; then - BUILDX_ARGS="--cache-from=type=local,src=/tmp/.buildx-cache --cache-to=type=local,dest=/tmp/.buildx-cache" - fi - if [[ "{{ OS }}" == "centos7" ]]; then - _DRIVERS_VERSION="{{ DRIVERS_VERSION_RHEL }}" - else - _DRIVERS_VERSION="{{ DRIVERS_VERSION }}" - fi - - if [[ "{{TAGS}}" == "" ]]; then - raw_tag_array=($(just _make-default-tag {{OS}})) - else - raw_tag_array=("{{TAGS}}") - fi - - tag_array=() - for tag in $raw_tag_array - do - tag_array+=("-t" $tag) - done - - docker buildx --builder="{{ BUILDX_PATH }}" build --load ${BUILDX_ARGS} \ - ${tag_array[@]} \ - --build-arg RSW_VERSION="{{ VERSION }}" \ - --build-arg DRIVERS_VERSION="${_DRIVERS_VERSION}" \ - --build-arg R_VERSION="{{ R_VERSION }}" \ - --build-arg R_VERSION_ALT="{{ R_VERSION_ALT }}" \ - --build-arg PYTHON_VERSION="{{ PYTHON_VERSION }}" \ - --build-arg PYTHON_VERSION_ALT="{{ PYTHON_VERSION_ALT }}" \ - --file=./Dockerfile.$(just -f ../Justfile _parse-os {{OS}}) . - -# Test r-session-complete image - just test rstudio/r-session-complete:ubuntu2204-2022.07.2-576.pro12 2022.07.2+576.pro12 -test TAG=`just _make-default-tag` VERSION=RSW_VERSION CMD="": - #!/usr/bin/env bash - set -euxo pipefail - IMAGE_NAME="{{ TAG }}" \ - RSW_VERSION="{{ VERSION }}" \ - R_VERSION="{{ R_VERSION }}" \ - R_VERSION_ALT="{{ R_VERSION_ALT }}" \ - PYTHON_VERSION="{{ PYTHON_VERSION }}" \ - PYTHON_VERSION_ALT="{{ PYTHON_VERSION_ALT }}" \ - docker-compose -f ./docker-compose.test.yml run sut {{ CMD }} - -# Test r-session-complete image interactively - just test-i rstudio/r-session-complete:ubuntu2204-2022.07.2-576.pro12 2022.07.2+576.pro12 -test-i TAG=`just _make-default-tag` VERSION=RSW_VERSION: - just test {{ TAG }} {{ VERSION }} bash - -# Run r-session-complete - just run rstudio/r-session-complete:ubuntu2204-2022.07.2-576.pro12 -run TAG=`just _make-default-tag` CMD="": - #!/usr/bin/env bash - set -euxo pipefail - if [ -z "{{ RSW_LICENSE }}" ]; then - echo "Please set RSW_LICENSE to a valid RStudio Workbench license before running." - exit 1 - fi - docker run -it --privileged \ - -p 8788:8788 \ - -e RSW_LICENSE="{{ RSW_LICENSE }}" \ - "{{ TAG }}" {{ CMD }} diff --git a/r-session-complete/test/goss.yaml b/r-session-complete/test/goss.yaml index 94637931e..09760e7c0 100644 --- a/r-session-complete/test/goss.yaml +++ b/r-session-complete/test/goss.yaml @@ -22,6 +22,7 @@ file: command: "echo '{ \"cells\": [], \"metadata\": {}, \"nbformat\": 4, \"nbformat_minor\": 2}' | /opt/python/{{.Env.PYTHON_VERSION}}/bin/jupyter nbconvert --to notebook --stdin --stdout": title: jupyter_works + timeout: 60000 exit-status: 0 # Ensure correct R version @@ -49,4 +50,5 @@ command: "jupyter --version": title: jupyter_in_path_var + timeout: 60000 exit-status: 0 diff --git a/r-session-complete/test/run_tests.sh b/r-session-complete/test/run_tests.sh index 16568e9c0..e292db061 100755 --- a/r-session-complete/test/run_tests.sh +++ b/r-session-complete/test/run_tests.sh @@ -1,14 +1,16 @@ #!/bin/bash -# install goss - -GOSS_FILE=${GOSS_FILE:-/tmp/goss.yaml} -GOSS_VERSION=${GOSS_VERSION:-0.3.16} +GOSS_FILE=${GOSS_FILE:-/test/goss.yaml} +GOSS_VERSION=${GOSS_VERSION:-0.4.6} GOSS_MAX_CONCURRENT=${GOSS_MAX_CONCURRENT:-50} -# default to empty var file (since vars are not necessary) -if [ ! -f "$GOSS_VARS" ]; then - touch $GOSS_VARS +if [ -f /etc/debian_version ]; then + OS="ubuntu" +elif [ -f /etc/centos-release ]; then + OS="centos" +else + echo "OS not supported. Exiting" + exit 1 fi # install goss to tmp location and make executable @@ -16,4 +18,4 @@ curl -sL https://github.com/aelsabbahy/goss/releases/download/v$GOSS_VERSION/gos && chmod +x /tmp/goss \ && GOSS=/tmp/goss -GOSS_FILE=$GOSS_FILE GOSS_VARS=$GOSS_VARS $GOSS v --format documentation --max-concurrent $GOSS_MAX_CONCURRENT +OS=$OS GOSS_FILE=$GOSS_FILE $GOSS v --format documentation --max-concurrent $GOSS_MAX_CONCURRENT diff --git a/share/buildkitd.toml b/share/buildkitd.toml new file mode 100644 index 000000000..ac746f6f2 --- /dev/null +++ b/share/buildkitd.toml @@ -0,0 +1 @@ +insecure-entitlements = ["security.insecure"] \ No newline at end of file diff --git a/share/local_buildkitd.toml b/share/local_buildkitd.toml new file mode 100644 index 000000000..a775e7ff7 --- /dev/null +++ b/share/local_buildkitd.toml @@ -0,0 +1,4 @@ +insecure-entitlements = ["security.insecure"] + +[worker.oci] + max-parallelism = 4 \ No newline at end of file diff --git a/tools/export_bake_artifacts.py b/tools/export_bake_artifacts.py new file mode 100644 index 000000000..2a970dc50 --- /dev/null +++ b/tools/export_bake_artifacts.py @@ -0,0 +1,69 @@ +#!/usr/bin/env python3 +""" +Export bake artifacts as tar files for later reuse. + +./export_bake_artifacts.py --file --target --output-path +""" + +import argparse +import json +import logging +import subprocess +from pathlib import Path + +LOGGER = logging.getLogger(__name__) +PROJECT_DIR = Path(__file__).resolve().parents[1] + + +parser = argparse.ArgumentParser( + description="Export one or more bake artifacts to tar files for reuse" +) +parser.add_argument("--file", default="docker-bake.hcl") +parser.add_argument("--target", default="default") +parser.add_argument("--output-path", default=PROJECT_DIR / ".out") + + +def get_bake_plan(bake_file="docker-bake.hcl", target="default"): + cmd = ["docker", "buildx", "bake", "-f", str(PROJECT_DIR / bake_file), "--print", target] + p = subprocess.run(cmd, capture_output=True) + if p.returncode != 0: + LOGGER.error(f"Failed to get bake plan: {p.stderr}") + exit(1) + return json.loads(p.stdout.decode("utf-8")) + + +def build_export_command(target_name, target_spec, output_path): + output_file = Path(output_path) / f"{target_name}.tar" + cmd = [ + "docker", + "image", + "save", + "--output", + f"{output_file}", + " ".join(target_spec["tags"]), + ] + return cmd + + +def run_cmd(target_name, cmd): + p = subprocess.run(" ".join(cmd), shell=True) + if p.returncode != 0: + LOGGER.error(f"{target_name} failed to export: {p.returncode}") + return p.returncode + + +def main(): + args = parser.parse_args() + plan = get_bake_plan(args.file, args.target) + output = args.output_path + if not Path(output).exists(): + Path(output).mkdir(parents=True) + LOGGER.info(f"Exporting {len(plan['target'].keys())} targets: {plan['target'].keys()}") + for target_name, target_spec in plan["target"].items(): + LOGGER.info(f"Exporting {target_name}") + cmd = build_export_command(target_name, target_spec, output) + run_cmd(target_name, cmd) + + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/tools/import_bake_artifacts.py b/tools/import_bake_artifacts.py new file mode 100644 index 000000000..5120433bb --- /dev/null +++ b/tools/import_bake_artifacts.py @@ -0,0 +1,35 @@ +#!/usr/bin/env python3 +""" +Run tests against bake artifacts by group/target and build definition. + +./test_bake_artifacts.py --file --target +""" + +import argparse +import logging +import subprocess +from pathlib import Path + +LOGGER = logging.getLogger(__name__) +PROJECT_DIR = Path(__file__).resolve().parents[1] + + +parser = argparse.ArgumentParser( + description="Import one or more bake artifacts from tar files for reuse" +) +parser.add_argument("--archive-path", type=Path, default=PROJECT_DIR / ".out") + + +def main(): + args = parser.parse_args() + if args.archive_path: + for archive in args.archive_path.glob("*.tar"): + LOGGER.info(f"Importing {archive}") + cmd = ["docker", "image", "load", "--input", archive] + p = subprocess.run(cmd) + if p.returncode != 0: + LOGGER.error(f"Failed to import {archive}: {p.returncode}") + + +if __name__ == "__main__": + main() diff --git a/tools/test_bake_artifacts.py b/tools/test_bake_artifacts.py new file mode 100644 index 000000000..f664cbafb --- /dev/null +++ b/tools/test_bake_artifacts.py @@ -0,0 +1,114 @@ +#!/usr/bin/env python3 +""" +Run tests against bake artifacts by group/target and build definition. + +./test_bake_artifacts.py --file --target +""" + +import argparse +import json +import logging +import os +import re +import subprocess +import sys +from pathlib import Path + +logging.basicConfig(stream=sys.stdout, level=logging.INFO) +LOGGER = logging.getLogger(__name__) + +PROJECT_DIR = Path(__file__).resolve().parents[1] +SKIP = [ + "^content.*", # Content images don't have tests right now! + "(build|scan)-workbench-for-microsoft.*", # Intermediary WAML layers aren't exported or tested +] + + +parser = argparse.ArgumentParser( + description="Extract a test command from a bake plan" +) +parser.add_argument("--file", default="docker-bake.hcl") +parser.add_argument("--target", default="default") + + +def get_bake_plan(bake_file="docker-bake.hcl", target="default"): + cmd = ["docker", "buildx", "bake", "-f", str(PROJECT_DIR / bake_file), "--print", target] + run_env = os.environ.copy() + p = subprocess.run(cmd, capture_output=True, env=run_env) + if p.returncode != 0: + LOGGER.error(f"Failed to get bake plan: {p.stderr}") + exit(1) + return json.loads(p.stdout.decode("utf-8")) + + +def custom_options(target_name, context_path): + opts = [] + if "workbench-for-google-cloud-workstation" in target_name: + deps_path = context_path / "deps" + opts.extend([ + "--mount=type=bind,source=/var/run/docker.sock,destination=/var/run/docker.sock", + f"--mount=type=bind,source={deps_path},destination=/tmp/deps", + ]) + return opts + + +def build_test_command(target_name, target_spec): + context_path = PROJECT_DIR / target_spec["context"] + test_path = context_path / "test" + cmd = [ + "docker", + "run", + "-t", + "--init", + "--rm", + "--entrypoint=''", + "--privileged", + f"--mount=type=bind,source={test_path},destination=/test", + ] + cmd.extend(custom_options(target_name, context_path)) + for name, value in target_spec["args"].items(): + cmd.extend(["--env", f'{name}="{value}"']) + cmd.append(target_spec["tags"][0]) + cmd.extend(["/test/run_tests.sh"]) + return cmd + + +def run_cmd(target_name, cmd): + LOGGER.info(f"Running tests for {target_name}") + LOGGER.info(f"{' '.join(cmd)}") + p = subprocess.run(" ".join(cmd), shell=True) + if p.returncode != 0: + LOGGER.error(f"{target_name} test failed with exit code {p.returncode}") + return p.returncode + + +def main(): + args = parser.parse_args() + plan = get_bake_plan(args.file, args.target) + result = 0 + skip_targets = [] + failed_targets = [] + targets = {} + for k in plan["group"][args.target]["targets"]: + for target_name, target_spec in plan["target"].items(): + if target_name.startswith(k): + targets[target_name] = target_spec + LOGGER.info(f"Testing {len(targets.keys())} targets: {targets.keys()}") + for target_name, target_spec in targets.items(): + if any(re.search(pattern, target_name) is not None for pattern in SKIP): + LOGGER.info(f"Skipping {target_name}") + skip_targets.append(target_name) + continue + cmd = build_test_command(target_name, target_spec) + LOGGER.debug(" ".join(cmd)) + return_code = run_cmd(target_name, cmd) + if return_code != 0: + failed_targets.append(target_name) + result = 1 + LOGGER.info(f"Skipped targets: {skip_targets}") + LOGGER.info(f"Failed targets: {failed_targets}") + exit(result) + + +if __name__ == "__main__": + main() diff --git a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 index b612a6a97..ddec0969c 100644 --- a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 +++ b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 @@ -1,4 +1,4 @@ -FROM us-central1-docker.pkg.dev/cloud-workstations-images/predefined/base:public-image-current +FROM us-central1-docker.pkg.dev/cloud-workstations-images/predefined/base:public-image-current as build ### ARG declarations ### ARG DEBIAN_FRONTEND=noninteractive @@ -147,8 +147,7 @@ RUN /opt/python/"${PYTHON_VERSION_JUPYTER}"/bin/python -m venv /opt/python/jupyt && /opt/python/${PYTHON_VERSION}/bin/python3 -m pip cache purge \ && /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip cache purge -RUN curl -L -o /usr/local/bin/wait-for-it.sh https://raw.githubusercontent.com/rstudio/wait-for-it/master/wait-for-it.sh \ - && chmod +x /usr/local/bin/wait-for-it.sh +ADD --chmod=755 https://raw.githubusercontent.com/rstudio/wait-for-it/master/wait-for-it.sh /usr/local/bin/wait-for-it.sh RUN mkdir -p /var/lib/rstudio-server/monitor/log \ && chown -R rstudio-server:rstudio-server /var/lib/rstudio-server/monitor \ diff --git a/workbench-for-google-cloud-workstations/Justfile b/workbench-for-google-cloud-workstations/Justfile deleted file mode 100644 index ce026a86f..000000000 --- a/workbench-for-google-cloud-workstations/Justfile +++ /dev/null @@ -1,116 +0,0 @@ -set dotenv-load -set positional-arguments - -BUILDX_PATH := "" - -PRODUCT := "workbench" -IMAGE_OS := "ubuntu2004" - -RSW_LICENSE := "" -RSW_LICENSE_SERVER := "" - -_make-default-tag: - echo "${IMAGE_REGISTRY_NAME}:$(just -f ../Justfile _get-tag-safe-version "${RSW_VERSION}")" - -get-version: - echo "${RSW_VERSION}" - -get-build-args: - #!/usr/bin/env bash - printf "RSW_VERSION=${RSW_VERSION} - R_VERSION=${R_VERSION} - R_VERSION_ALT=${R_VERSION_ALT} - PYTHON_VERSION=${PYTHON_VERSION} - PYTHON_VERSION_ALT=${PYTHON_VERSION_ALT} - PYTHON_VERSION_JUPYTER=${PYTHON_VERSION_JUPYTER} - QUARTO_VERSION=${QUARTO_VERSION} - DRIVERS_VERSION=${DRIVERS_VERSION} - SRC_IMAGE_NAME=${SRC_IMAGE_NAME} - RSW_DOWNLOAD_URL=${RSW_DOWNLOAD_URL}" - -get-build-tags: - #!/usr/bin/env bash - set -eu - regions=("us-central1" "asia" "europe" "us") - tag_array=() - for region in "${regions[@]}"; do - tag_array+=("$region-docker.pkg.dev/posit-images/cloud-workstations/workbench:${RSW_TAG_VERSION}") - tag_array+=("$region-docker.pkg.dev/posit-images/cloud-workstations/workbench:latest") - done - IFS="," - echo "${tag_array[*]}" - -# Build Workbench image - just build 2022.07.2+576.pro12 rstudio/rstudio-workbench-gcw:2022.07.2 -build *TAGS="": - #!/usr/bin/env bash - set -euxo pipefail - CACHE_PATH=${GITHUB_WORKSPACE:-/tmp} - BUILDX_ARGS="" - if [[ "{{BUILDX_PATH}}" != "" ]]; then - BUILDX_ARGS="--cache-from=type=local,src=${CACHE_PATH}/.buildx-cache --cache-to=type=local,dest=${CACHE_PATH}/.buildx-cache-new,mode=max" - fi - - if [[ "{{TAGS}}" == "" ]]; then - raw_tag_array=($(just _make-default-tag)) - else - raw_tag_array=("{{TAGS}}") - fi - - tag_array=() - for tag in ${raw_tag_array[@]}; - do - tag_array+=("-t" $tag) - done - - docker buildx --builder="{{ BUILDX_PATH }}" build --load ${BUILDX_ARGS} \ - ${tag_array[@]} \ - --build-arg RSW_VERSION="${RSW_VERSION}" \ - --build-arg R_VERSION="${R_VERSION}" \ - --build-arg R_VERSION_ALT="${R_VERSION_ALT}" \ - --build-arg PYTHON_VERSION="${PYTHON_VERSION}" \ - --build-arg PYTHON_VERSION_ALT="${PYTHON_VERSION_ALT}" \ - --build-arg PYTHON_VERSION_JUPYTER="${PYTHON_VERSION_JUPYTER}" \ - --build-arg QUARTO_VERSION="${QUARTO_VERSION}" \ - --build-arg DRIVERS_VERSION="${DRIVERS_VERSION}" \ - --build-arg RSW_DOWNLOAD_URL="${RSW_DOWNLOAD_URL}" \ - --file=./Dockerfile.ubuntu2004 . - - echo ${raw_tag_array[@]} - -# Test Workbench image - just test rstudio/rstudio-workbench:ubuntu1804-2022.07.2-576.pro12 2022.07.2+576.pro12 -test TAG=`just _make-default-tag` CMD="": - #!/usr/bin/env bash - set -euxo pipefail - RSW_VERSION_CLEAN=$(sed "s/daily-/daily+/" <<<"${RSW_VERSION}") - IMAGE_NAME="{{ TAG }}" \ - RSW_VERSION="${RSW_VERSION_CLEAN}" \ - RSW_LICENSE="{{ RSW_LICENSE }}" \ - RSW_LICENSE_SERVER="{{ RSW_LICENSE_SERVER }}" \ - DRIVERS_VERSION="${DRIVERS_VERSION}" \ - R_VERSION="${R_VERSION}" \ - R_VERSION_ALT="${R_VERSION_ALT}" \ - PYTHON_VERSION="${PYTHON_VERSION}" \ - PYTHON_VERSION_ALT="${PYTHON_VERSION_ALT}" \ - PYTHON_VERSION_JUPYTER="${PYTHON_VERSION_JUPYTER}" \ - QUARTO_VERSION="${QUARTO_VERSION}" \ - docker-compose -f ./docker-compose.test.yml run sut {{ CMD }} - -# Test Workbench image interactively - just test-i rstudio/rstudio-workbench:ubuntu1804-2022.07.2-576.pro12 2022.07.2+576.pro12 -test-i TAG=`just _make-default-tag`: - just test {{ TAG }} bash - -# Run Workbench - just RSW_LICENSE="" run rstudio/r-session-complete:ubuntu1804-2022.07.2-576.pro12 -run TAG=`just _make-default-tag` CMD="": - #!/usr/bin/env bash - set -euo pipefail - if [ -z "{{ RSW_LICENSE }}" ] && [ -z "{{ RSW_LICENSE_SERVER }}" ]; then - echo "Please set RSW_LICENSE or RSW_LICENSE_SERVER before running." - exit 1 - fi - - docker run -it --privileged \ - ${volume_opts[@]} \ - -p 8787:80 \ - -e RSW_LICENSE="{{ RSW_LICENSE }}" \ - -e RSW_LICENSE_SERVER="{{ RSW_LICENSE_SERVER }}" \ - "{{ TAG }}" {{ CMD }} diff --git a/workbench-for-google-cloud-workstations/docker-compose.test.yml b/workbench-for-google-cloud-workstations/docker-compose.test.yml deleted file mode 100644 index 8de098c6d..000000000 --- a/workbench-for-google-cloud-workstations/docker-compose.test.yml +++ /dev/null @@ -1,24 +0,0 @@ -version: '2.3' -services: - - sut: - image: $IMAGE_NAME - command: /run_tests.sh - entrypoint: [] - environment: - # uses .env by default - - RSW_VERSION - - R_VERSION - - R_VERSION_ALT - - PYTHON_VERSION - - PYTHON_VERSION_ALT - - PYTHON_VERSION_JUPYTER - - QUARTO_VERSION - - DRIVERS_VERSION - - RSW_LICENSE - - RSW_LICENSE_SERVER - volumes: - - "./test/run_tests.sh:/run_tests.sh" - - "./test/goss.yaml:/tmp/goss.yaml" - - "./deps/py_packages.txt:/tmp/py_packages.txt" - - "./deps/r_packages.txt:/tmp/r_packages.txt" diff --git a/workbench-for-google-cloud-workstations/test/goss.yaml b/workbench-for-google-cloud-workstations/test/goss.yaml index 674665ef4..412fae9d0 100644 --- a/workbench-for-google-cloud-workstations/test/goss.yaml +++ b/workbench-for-google-cloud-workstations/test/goss.yaml @@ -35,19 +35,14 @@ port: tcp:80: listening: true ip: - - 0.0.0.0 - skip: false - tcp:5559: - listening: true - ip: - - 127.0.0.1 + - 0.0.0.0 skip: false process: rserver: running: true skip: false - rstudio-launche: + rserver-launche: running: true skip: false @@ -88,14 +83,14 @@ file: exists: true /etc/rstudio/jupyter.conf: exists: true - contains: + contents: - --LabApp.token="" - --no-browser - --allow-root - --ip=0.0.0.0 /etc/rstudio/rserver.conf: exists: true - contains: + contents: - www-port=80 - launcher-sessions-callback-address=http://0.0.0.0:80 - auth-proxy=1 @@ -103,21 +98,21 @@ file: - auth-proxy-user-header=x-custom-user-name /etc/rstudio/nginx.site.conf: exists: true - contains: + contents: - proxy_set_header X-CUSTOM-USER-NAME user/google; - proxy_set_header Host $http_x_forwarded_host; /etc/rstudio/vscode.extensions.conf: exists: true - contains: + contents: - quarto.quarto - GoogleCloudTools.cloudcode /tmp/startup.log: exists: true - contains: + contents: - "!Error reading /etc/rstudio/rserver.conf:" /etc/pam.d/common-session: exists: true - contains: + contents: - "/^session required pam_mkhomedir.so skel=/etc/skel umask=0022$/" /etc/sssd/sssd.conf: exists: true @@ -135,7 +130,7 @@ file: group: root mode: "0755" filetype: file - contains: [ + contents: [ "useradd -m user" ] /etc/workstation-startup.d/110_config-jupyter.sh: @@ -144,7 +139,7 @@ file: group: root mode: "0755" filetype: file - contains: [ + contents: [ # Checks that we're setting the Jupyter shell to /bin/bash "echo \"c.ServerApp.terminado_settings = {'shell_command': ['/bin/bash']}\" > /home/user/.jupyter/jupyter_notebook_config.py" ] @@ -154,7 +149,7 @@ file: group: root mode: "0755" filetype: file - contains: [ + contents: [ "/usr/bin/supervisord -c /etc/supervisor/supervisord.conf" ] @@ -182,21 +177,25 @@ command: ] Test Jupyter works: exec: "echo '{ \"cells\": [], \"metadata\": {}, \"nbformat\": 4, \"nbformat_minor\": 2}' | /opt/python/jupyter/bin/jupyter nbconvert --to notebook --stdin --stdout" + timeout: 60000 exit-status: 0 Check primary Python is version {{.Env.PYTHON_VERSION}}: exec: /opt/python/{{.Env.PYTHON_VERSION}}/bin/python --version + timeout: 60000 exit-status: 0 stdout: [ "{{.Env.PYTHON_VERSION}}" ] Check alternate Python is version {{.Env.PYTHON_VERSION_ALT}}: exec: /opt/python/{{.Env.PYTHON_VERSION_ALT}}/bin/python --version + timeout: 60000 exit-status: 0 stdout: [ "{{.Env.PYTHON_VERSION_ALT}}" ] Check Jupyter venv uses Python {{.Env.PYTHON_VERSION_JUPYTER}}: exec: /opt/python/jupyter/bin/python --version + timeout: 60000 exit-status: 0 stdout: [ "{{.Env.PYTHON_VERSION_JUPYTER}}" @@ -209,18 +208,20 @@ command: ] {{ $python_version := .Env.PYTHON_VERSION }} {{ $python_version_alt := .Env.PYTHON_VERSION_ALT }} - {{ $py_package_list := readFile "/tmp/py_packages.txt" | splitList "\n" }} + {{ $py_package_list := readFile "/tmp/deps/py_packages.txt" | splitList "\n" }} {{- range $py_package_list }} Check Python {{ $python_version }} has "{{.}}" installed: exec: /opt/python/{{$python_version}}/bin/pip show {{.}} + timeout: 60000 exit-status: 0 Check Python {{ $python_version_alt }} has "{{.}}" installed: exec: /opt/python/{{$python_version_alt}}/bin/pip show {{.}} + timeout: 60000 exit-status: 0 {{end}} {{ $r_version := .Env.R_VERSION }} {{ $r_version_alt := .Env.R_VERSION_ALT }} - {{ $r_package_list := readFile "/tmp/r_packages.txt" | splitList "\n" }} + {{ $r_package_list := readFile "/tmp/deps/r_packages.txt" | splitList "\n" }} {{- range $r_package_list }} Check R {{ $r_version }} has "{{.}}" installed: exec: /opt/R/{{$r_version}}/bin/R --slave -e "library(\"{{.}}\")" diff --git a/workbench-for-google-cloud-workstations/test/run_tests.sh b/workbench-for-google-cloud-workstations/test/run_tests.sh index 02c2cd04f..9e86f1287 100755 --- a/workbench-for-google-cloud-workstations/test/run_tests.sh +++ b/workbench-for-google-cloud-workstations/test/run_tests.sh @@ -9,25 +9,29 @@ trap 'err=$?; echo >&2 "run_tests.sh encountered an error: $err"; cat /tmp/start # start rstudio-server echo "--> Starting RStudio Workbench" /usr/bin/supervisord -c /etc/supervisor/supervisord.conf > /tmp/startup.log 2>&1 & +sleep 15 + +if [ -f /etc/debian_version ]; then + OS="ubuntu" +elif [ -f /etc/centos-release ]; then + OS="centos" +else + echo "OS not supported. Exiting" + exit 1 +fi echo "--> Waiting for workbench to startup... with RSW_TIMEOUT: $RSW_TIMEOUT" wait-for-it.sh localhost:80 -t $RSW_TIMEOUT wait-for-it.sh localhost:5559 -t $RSW_TIMEOUT echo "--> Startup complete" -GOSS_FILE=${GOSS_FILE:-/tmp/goss.yaml} -GOSS_VARS=${GOSS_VARS:-/tmp/goss_vars.yaml} -GOSS_VERSION=${GOSS_VERSION:-0.3.22} -GOSS_MAX_CONCURRENT=${GOSS_MAX_CONCURRENT:-50} - -# default to empty var file (since vars are not necessary) -if [ ! -f "$GOSS_VARS" ]; then - touch $GOSS_VARS -fi +GOSS_FILE=${GOSS_FILE:-/test/goss.yaml} +GOSS_VERSION=${GOSS_VERSION:-0.4.6} +GOSS_MAX_CONCURRENT=${GOSS_MAX_CONCURRENT:-5} # install goss to tmp location and make executable curl -sL https://github.com/aelsabbahy/goss/releases/download/v$GOSS_VERSION/goss-linux-amd64 -o /tmp/goss \ && chmod +x /tmp/goss \ && GOSS=/tmp/goss -GOSS_FILE=$GOSS_FILE GOSS_VARS=$GOSS_VARS $GOSS v --format documentation --max-concurrent $GOSS_MAX_CONCURRENT +OS=$OS GOSS_FILE=$GOSS_FILE $GOSS v --format documentation --max-concurrent $GOSS_MAX_CONCURRENT diff --git a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 index 4a8156945..81ae1f884 100644 --- a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 +++ b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 @@ -1,11 +1,4 @@ -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 SRC_IMAGE_NAME=product-base-pro -ARG REGISTRY=ghcr.io -FROM ${REGISTRY}/rstudio/${SRC_IMAGE_NAME}:ubuntu2204-r${R_VERSION}_${R_VERSION_ALT}-py${PYTHON_VERSION}_${PYTHON_VERSION_ALT} AS workbench -LABEL maintainer="RStudio Docker " +FROM product-base-pro AS build ARG DEBIAN_FRONTEND=noninteractive ARG R_VERSION=4.2.3 @@ -115,8 +108,7 @@ RUN /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install -r /tmp/py_packages && /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip cache purge \ && rm /tmp/py_packages.txt -RUN curl -L -o /usr/local/bin/wait-for-it.sh https://raw.githubusercontent.com/rstudio/wait-for-it/master/wait-for-it.sh \ - && chmod +x /usr/local/bin/wait-for-it.sh +ADD --chmod=755 https://raw.githubusercontent.com/rstudio/wait-for-it/master/wait-for-it.sh /usr/local/bin/wait-for-it.sh RUN curl -sL https://aka.ms/InstallAzureCLIDeb | bash \ && az extension add -n ml -y @@ -131,8 +123,7 @@ ENTRYPOINT [] CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"] - -FROM workbench AS clamav +FROM build AS clamav # Set up ClamAV RUN apt-get update \ @@ -169,7 +160,7 @@ RUN clamscan \ # with ClamAV installed. Avoid adding changes in this stage unless they are related # to the ClamAV stage. Since the ClamAV stage may be cached, you can't guarantee # another full scan if you change anything beyond this point. -FROM workbench AS final +FROM build AS final # Copy ClamAV scan logs so the end user can see them. COPY --from=clamav /var/log/clamav/clamscan.log /var/log/clamav/clamupdate.log / diff --git a/workbench-for-microsoft-azure-ml/Justfile b/workbench-for-microsoft-azure-ml/Justfile deleted file mode 100644 index cd9a2fa08..000000000 --- a/workbench-for-microsoft-azure-ml/Justfile +++ /dev/null @@ -1,78 +0,0 @@ -set positional-arguments - -BUILDX_PATH := "" - -IMAGE_PREFIX := "rstudio-" -PRODUCT := "workbench" -IMAGE_OS := "ubuntu2204" - -RSW_VERSION := "2023.12.1+402.pro1" -RSW_LICENSE := "" - -R_VERSION := "4.2.3" -R_VERSION_ALT := "4.1.3" - -PYTHON_VERSION := "3.9.17" -PYTHON_VERSION_ALT := "3.8.17" - -_make-default-tag OS=IMAGE_OS: - echo "{{IMAGE_PREFIX}}{{PRODUCT}}:{{OS}}-$(just -f ../Justfile _get-tag-safe-version {{RSW_VERSION}})" - -# Build Workbench for Azure ML image - just build ubuntu2204 2022.07.2+576.pro12 rstudio/rstudio-workbench:ubuntu2204-2022.07.2-576.pro12 -build OS=IMAGE_OS VERSION=RSW_VERSION *TAGS="": - #!/usr/bin/env bash - set -euxo pipefail - BUILDX_ARGS="" - if [[ "{{BUILDX_PATH}}" != "" ]]; then - BUILDX_ARGS="--cache-from=type=local,src=/tmp/.buildx-cache --cache-to=type=local,dest=/tmp/.buildx-cache" - fi - - if [[ "{{TAGS}}" == "" ]]; then - raw_tag_array=($(just _make-default-tag {{OS}})) - else - raw_tag_array=("{{TAGS}}") - fi - - tag_array=() - for tag in $raw_tag_array - do - tag_array+=("-t" $tag) - done - - docker buildx --builder="{{ BUILDX_PATH }}" build --load ${BUILDX_ARGS} \ - ${tag_array[@]} \ - --build-arg RSW_VERSION="{{ VERSION }}" \ - --build-arg R_VERSION="{{ R_VERSION }}" \ - --build-arg R_VERSION_ALT="{{ R_VERSION_ALT }}" \ - --build-arg PYTHON_VERSION="{{ PYTHON_VERSION }}" \ - --build-arg PYTHON_VERSION_ALT="{{ PYTHON_VERSION_ALT }}" \ - --file=./Dockerfile.$(just -f ../Justfile _parse-os {{OS}}) . - -# Test Workbench for Azure ML image - just test rstudio/rstudio-workbench:ubuntu2204-2022.07.2-576.pro12 2022.07.2+576.pro12 -test TAG=`just _make-default-tag` VERSION=RSW_VERSION CMD="": - #!/usr/bin/env bash - set -euxo pipefail - IMAGE_NAME="{{ TAG }}" \ - RSW_VERSION="{{ VERSION }}" \ - R_VERSION="{{ R_VERSION }}" \ - R_VERSION_ALT="{{ R_VERSION_ALT }}" \ - PYTHON_VERSION="{{ PYTHON_VERSION }}" \ - PYTHON_VERSION_ALT="{{ PYTHON_VERSION_ALT }}" \ - docker-compose -f ./docker-compose.test.yml run sut {{ CMD }} - -# Test Workbench for Azure ML image interactively - just test-i rstudio/rstudio-workbench:ubuntu2204-2022.07.2-576.pro12 2022.07.2+576.pro12 -test-i TAG=`just _make-default-tag` VERSION=RSW_VERSION: - just test {{ TAG }} {{ VERSION }} bash - -# Run Workbench for Azure ML - just RSW_LICENSE="" run rstudio/r-session-complete:ubuntu2204-2022.07.2-576.pro12 -run TAG=`just _make-default-tag` CMD="": - #!/usr/bin/env bash - set -euxo pipefail - if [ -z "{{ RSW_LICENSE }}" ]; then - echo "Please set RSW_LICENSE to a valid RStudio Workbench license before running." - exit 1 - fi - docker run -it --privileged \ - -p 8787:8787 \ - -e RSW_LICENSE="{{ RSW_LICENSE }}" \ - "{{ TAG }}" {{ CMD }} diff --git a/workbench-for-microsoft-azure-ml/docker-compose.test.yml b/workbench-for-microsoft-azure-ml/docker-compose.test.yml deleted file mode 100644 index 53a1d86d0..000000000 --- a/workbench-for-microsoft-azure-ml/docker-compose.test.yml +++ /dev/null @@ -1,20 +0,0 @@ -version: '2.3' -services: - - sut: - image: $IMAGE_NAME - command: /run_tests.sh - entrypoint: [] - environment: - # uses .env by default - - RSW_VERSION - - R_VERSION - - PYTHON_VERSION - - PYTHON_VERSION_ALT - - PYTHON_VERSION_JUPYTER - - R_VERSION_ALT - - RSW_LICENSE - volumes: - - "./test/run_tests.sh:/run_tests.sh" - - "./test/goss.yaml:/tmp/goss.yaml" - - "./test/goss_vars.yaml:/tmp/goss_vars.yaml" diff --git a/workbench-for-microsoft-azure-ml/test/goss.yaml b/workbench-for-microsoft-azure-ml/test/goss.yaml index 05269e7d9..2c8ba3fea 100644 --- a/workbench-for-microsoft-azure-ml/test/goss.yaml +++ b/workbench-for-microsoft-azure-ml/test/goss.yaml @@ -101,6 +101,7 @@ command: ] "echo '{ \"cells\": [], \"metadata\": {}, \"nbformat\": 4, \"nbformat_minor\": 2}' | /opt/python/jupyter/bin/jupyter nbconvert --to notebook --stdin --stdout": title: jupyter_works + timeout: 60000 exit-status: 0 # Ensure correct python version "/opt/python/{{.Env.PYTHON_VERSION_ALT}}/bin/python --version": diff --git a/workbench-for-microsoft-azure-ml/test/goss_vars.yaml b/workbench-for-microsoft-azure-ml/test/goss_vars.yaml index 2669ba18b..65f2d26c5 100644 --- a/workbench-for-microsoft-azure-ml/test/goss_vars.yaml +++ b/workbench-for-microsoft-azure-ml/test/goss_vars.yaml @@ -19,7 +19,6 @@ syspkgs: - libglib2.0-0 - libpq5 - libsm6 - - libssl-dev - openssl - libssl-dev - libuser diff --git a/workbench-for-microsoft-azure-ml/test/run_tests.sh b/workbench-for-microsoft-azure-ml/test/run_tests.sh index 9dc299cb2..8c14be699 100755 --- a/workbench-for-microsoft-azure-ml/test/run_tests.sh +++ b/workbench-for-microsoft-azure-ml/test/run_tests.sh @@ -1,7 +1,7 @@ #!/bin/bash set -xe -RSW_TIMEOUT=${RSW_TIMEOUT:-15} +RSW_TIMEOUT=${RSW_TIMEOUT:-60} touch /tmp/startup.log trap 'err=$?; echo >&2 "run_tests.sh encountered an error: $err"; cat /tmp/startup.log; exit $err' ERR @@ -9,24 +9,30 @@ trap 'err=$?; echo >&2 "run_tests.sh encountered an error: $err"; cat /tmp/start # start rstudio-server echo "--> Starting RStudio Workbench" /usr/bin/supervisord -c /etc/supervisor/supervisord.conf > /tmp/startup.log 2>&1 & +sleep 15 echo "--> Waiting for workbench to startup... with RSW_TIMEOUT: $RSW_TIMEOUT" wait-for-it.sh localhost:8787 -t $RSW_TIMEOUT +wait-for-it.sh localhost:5559 -t $RSW_TIMEOUT echo "--> Startup complete" -GOSS_FILE=${GOSS_FILE:-/tmp/goss.yaml} -GOSS_VARS=${GOSS_VARS:-/tmp/goss_vars.yaml} -GOSS_VERSION=${GOSS_VERSION:-0.3.16} -GOSS_MAX_CONCURRENT=${GOSS_MAX_CONCURRENT:-50} - -# default to empty var file (since vars are not necessary) -if [ ! -f "$GOSS_VARS" ]; then - touch $GOSS_VARS +if [ -f /etc/debian_version ]; then + OS="ubuntu" +elif [ -f /etc/centos-release ]; then + OS="centos" +else + echo "OS not supported. Exiting" + exit 1 fi +GOSS_FILE=${GOSS_FILE:-/test/goss.yaml} +GOSS_VARS_FILE=${GOSS_VARS_FILE:-/test/goss_vars.yaml} +GOSS_VERSION=${GOSS_VERSION:-0.4.6} +GOSS_MAX_CONCURRENT=${GOSS_MAX_CONCURRENT:-5} + # install goss to tmp location and make executable curl -sL https://github.com/aelsabbahy/goss/releases/download/v$GOSS_VERSION/goss-linux-amd64 -o /tmp/goss \ && chmod +x /tmp/goss \ && GOSS=/tmp/goss -GOSS_FILE=$GOSS_FILE GOSS_VARS=$GOSS_VARS $GOSS v --format documentation --max-concurrent $GOSS_MAX_CONCURRENT +OS=$OS GOSS_FILE=$GOSS_FILE GOSS_VARS=$GOSS_VARS_FILE $GOSS v --format documentation --max-concurrent $GOSS_MAX_CONCURRENT diff --git a/workbench/Dockerfile.ubuntu2204 b/workbench/Dockerfile.ubuntu2204 index 64edfed12..8234397ee 100644 --- a/workbench/Dockerfile.ubuntu2204 +++ b/workbench/Dockerfile.ubuntu2204 @@ -1,11 +1,4 @@ -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 SRC_IMAGE_NAME=product-base-pro -ARG REGISTRY=ghcr.io -FROM ${REGISTRY}/rstudio/${SRC_IMAGE_NAME}:ubuntu2204-r${R_VERSION}_${R_VERSION_ALT}-py${PYTHON_VERSION}_${PYTHON_VERSION_ALT} -LABEL maintainer="RStudio Docker " +FROM product-base-pro as build ARG DEBIAN_FRONTEND=noninteractive ARG R_VERSION=4.2.3 @@ -108,3 +101,5 @@ EXPOSE 5559/tcp ENTRYPOINT [] CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"] + + diff --git a/workbench/Justfile b/workbench/Justfile deleted file mode 100644 index 785e0ad75..000000000 --- a/workbench/Justfile +++ /dev/null @@ -1,100 +0,0 @@ -set positional-arguments - -BUILDX_PATH := "" - -IMAGE_PREFIX := "rstudio-" -PRODUCT := "workbench" -IMAGE_OS := "ubuntu2204" - -RSW_VERSION := "2023.12.1+402.pro1" -RSW_RELEASE_TYPE := "release" -RSW_LICENSE := "" -RSW_LICENSE_SERVER := "" - -R_VERSION := "4.2.3" -R_VERSION_ALT := "4.1.3" - -PYTHON_VERSION := "3.9.17" -PYTHON_VERSION_ALT := "3.8.17" - -PERSIST_LICENSE := "false" -PERSIST_LICENSE_DIR := join(justfile_directory(), "tmp-lic") - -_make-default-tag OS=IMAGE_OS VERSION=RSW_VERSION: - echo "{{IMAGE_PREFIX}}{{PRODUCT}}:{{OS}}-$(just -f ../Justfile _get-tag-safe-version {{VERSION}})" - -# Build Workbench image - just build ubuntu2204 2022.07.2+576.pro12 rstudio/rstudio-workbench:ubuntu2204-2022.07.2-576.pro12 -build OS=IMAGE_OS VERSION=RSW_VERSION *TAGS="": - #!/usr/bin/env bash - set -euxo pipefail - BUILDX_ARGS="" - if [[ "{{BUILDX_PATH}}" != "" ]]; then - BUILDX_ARGS="--cache-from=type=local,src=/tmp/.buildx-cache --cache-to=type=local,dest=/tmp/.buildx-cache" - fi - - if [[ "{{TAGS}}" == "" ]]; then - raw_tag_array=($(just _make-default-tag {{OS}} {{VERSION}})) - else - raw_tag_array=("{{TAGS}}") - fi - - tag_array=() - for tag in $raw_tag_array - do - tag_array+=("-t" $tag) - done - - docker buildx --builder="{{ BUILDX_PATH }}" build --load ${BUILDX_ARGS} \ - ${tag_array[@]} \ - --build-arg RSW_VERSION="{{ VERSION }}" \ - --build-arg R_VERSION="{{ R_VERSION }}" \ - --build-arg R_VERSION_ALT="{{ R_VERSION_ALT }}" \ - --build-arg PYTHON_VERSION="{{ PYTHON_VERSION }}" \ - --build-arg PYTHON_VERSION_ALT="{{ PYTHON_VERSION_ALT }}" \ - --build-arg RSW_DOWNLOAD_URL="$(just -f ../ci.Justfile _get-rsw-download-url {{RSW_RELEASE_TYPE}} {{OS}})" \ - --file=./Dockerfile.$(just -f ../Justfile _parse-os {{OS}}) . - -# Test Workbench image - just test rstudio/rstudio-workbench:ubuntu2204-2022.07.2-576.pro12 2022.07.2+576.pro12 -test TAG=`just _make-default-tag` VERSION=RSW_VERSION CMD="": - #!/usr/bin/env bash - set -euxo pipefail - IMAGE_NAME="{{ TAG }}" \ - RSW_VERSION="{{ VERSION }}" \ - RSW_LICENSE="{{ RSW_LICENSE }}" \ - RSW_LICENSE_SERVER="{{ RSW_LICENSE_SERVER }}" \ - R_VERSION="{{ R_VERSION }}" \ - R_VERSION_ALT="{{ R_VERSION_ALT }}" \ - PYTHON_VERSION="{{ PYTHON_VERSION }}" \ - PYTHON_VERSION_ALT="{{ PYTHON_VERSION_ALT }}" \ - docker-compose -f ./docker-compose.test.yml run sut {{ CMD }} - -# Test Workbench image interactively - just test-i rstudio/rstudio-workbench:ubuntu2204-2022.07.2-576.pro12 2022.07.2+576.pro12 -test-i TAG=`just _make-default-tag` VERSION=RSW_VERSION: - just test {{ TAG }} {{ VERSION }} bash - -# Run Workbench - just RSW_LICENSE="" run rstudio/r-session-complete:ubuntu2204-2022.07.2-576.pro12 -run TAG=`just _make-default-tag` CMD="": - #!/usr/bin/env bash - set -euxo pipefail - if [ -z "{{ RSW_LICENSE }}" ] && [ -z "{{ RSW_LICENSE_SERVER }}" ]; then - echo "Please set RSW_LICENSE or RSW_LICENSE_SERVER before running." - exit 1 - fi - - volume_opts=() - if [ {{ PERSIST_LICENSE }} = "true" ]; then - if [ {{RSW_LICENSE}} ]; then - echo "Volumes will be configured to persist license state data for an activation key." - volume_opts=$(just -f ../Justfile _config-license-persist-volumes key {{PRODUCT}} {{PERSIST_LICENSE_DIR}}) - elif [ {{RSW_LICENSE_SERVER}} ]; then - echo "Volumes will be configured to persist license state data for a floating license server." - volume_opts=$(just -f ../Justfile _config-license-persist-volumes float {{PRODUCT}} {{PERSIST_LICENSE_DIR}}) - fi - fi - - docker run -it --privileged \ - ${volume_opts[@]} \ - -p 8787:8787 \ - -e RSW_LICENSE="{{ RSW_LICENSE }}" \ - -e RSW_LICENSE_SERVER="{{ RSW_LICENSE_SERVER }}" \ - "{{ TAG }}" {{ CMD }} diff --git a/workbench/docker-compose.test.yml b/workbench/docker-compose.test.yml deleted file mode 100644 index db54a879d..000000000 --- a/workbench/docker-compose.test.yml +++ /dev/null @@ -1,20 +0,0 @@ -version: '2.3' -services: - - sut: - image: $IMAGE_NAME - command: /run_tests.sh - entrypoint: [] - environment: - # uses .env by default - - RSW_VERSION - - R_VERSION - - PYTHON_VERSION - - PYTHON_VERSION_ALT - - PYTHON_VERSION_JUPYTER - - R_VERSION_ALT - - RSW_LICENSE - - RSW_LICENSE_SERVER - volumes: - - "./test/run_tests.sh:/run_tests.sh" - - "./test/goss.yaml:/tmp/goss.yaml" diff --git a/workbench/test/goss.yaml b/workbench/test/goss.yaml index 0a9a78c70..a1339ce33 100644 --- a/workbench/test/goss.yaml +++ b/workbench/test/goss.yaml @@ -112,6 +112,7 @@ command: ] "echo '{ \"cells\": [], \"metadata\": {}, \"nbformat\": 4, \"nbformat_minor\": 2}' | /opt/python/jupyter/bin/jupyter nbconvert --to notebook --stdin --stdout": title: jupyter_works + timeout: 60000 exit-status: 0 # Ensure correct python version "/opt/python/{{.Env.PYTHON_VERSION_ALT}}/bin/python --version": diff --git a/workbench/test/run_tests.sh b/workbench/test/run_tests.sh index 9dc299cb2..ccec65e4b 100755 --- a/workbench/test/run_tests.sh +++ b/workbench/test/run_tests.sh @@ -9,24 +9,29 @@ trap 'err=$?; echo >&2 "run_tests.sh encountered an error: $err"; cat /tmp/start # start rstudio-server echo "--> Starting RStudio Workbench" /usr/bin/supervisord -c /etc/supervisor/supervisord.conf > /tmp/startup.log 2>&1 & +sleep 15 echo "--> Waiting for workbench to startup... with RSW_TIMEOUT: $RSW_TIMEOUT" wait-for-it.sh localhost:8787 -t $RSW_TIMEOUT +wait-for-it.sh localhost:5559 -t $RSW_TIMEOUT echo "--> Startup complete" -GOSS_FILE=${GOSS_FILE:-/tmp/goss.yaml} -GOSS_VARS=${GOSS_VARS:-/tmp/goss_vars.yaml} -GOSS_VERSION=${GOSS_VERSION:-0.3.16} -GOSS_MAX_CONCURRENT=${GOSS_MAX_CONCURRENT:-50} - -# default to empty var file (since vars are not necessary) -if [ ! -f "$GOSS_VARS" ]; then - touch $GOSS_VARS +if [ -f /etc/debian_version ]; then + OS="ubuntu" +elif [ -f /etc/centos-release ]; then + OS="centos" +else + echo "OS not supported. Exiting" + exit 1 fi +GOSS_FILE=${GOSS_FILE:-/test/goss.yaml} +GOSS_VERSION=${GOSS_VERSION:-0.4.6} +GOSS_MAX_CONCURRENT=${GOSS_MAX_CONCURRENT:-5} + # install goss to tmp location and make executable curl -sL https://github.com/aelsabbahy/goss/releases/download/v$GOSS_VERSION/goss-linux-amd64 -o /tmp/goss \ && chmod +x /tmp/goss \ && GOSS=/tmp/goss -GOSS_FILE=$GOSS_FILE GOSS_VARS=$GOSS_VARS $GOSS v --format documentation --max-concurrent $GOSS_MAX_CONCURRENT +OS=$OS GOSS_FILE=$GOSS_FILE $GOSS v --format documentation --max-concurrent $GOSS_MAX_CONCURRENT From 490e786e9b1a750a6084cf8495100e5b125018b8 Mon Sep 17 00:00:00 2001 From: Cole Arendt Date: Thu, 18 Apr 2024 05:33:20 -0400 Subject: [PATCH 049/165] add the libarchive-dev package to image builds This is important for the installation of the r-lib/archive package, which is used by shinylive, for instance. --- content/base/Dockerfile.ubuntu2204 | 1 + product/base/Dockerfile.ubuntu2204 | 1 + 2 files changed, 2 insertions(+) diff --git a/content/base/Dockerfile.ubuntu2204 b/content/base/Dockerfile.ubuntu2204 index 118fc171c..87e440982 100644 --- a/content/base/Dockerfile.ubuntu2204 +++ b/content/base/Dockerfile.ubuntu2204 @@ -39,6 +39,7 @@ RUN apt-get update \ git \ gsfonts \ imagemagick \ + libarchive-dev \ libcairo2-dev \ libcurl4-openssl-dev \ libfontconfig1-dev \ diff --git a/product/base/Dockerfile.ubuntu2204 b/product/base/Dockerfile.ubuntu2204 index 8e574e524..ae5e655ea 100644 --- a/product/base/Dockerfile.ubuntu2204 +++ b/product/base/Dockerfile.ubuntu2204 @@ -30,6 +30,7 @@ RUN apt-get update --fix-missing \ gpg-agent \ gsfonts \ imagemagick \ + libarchive-dev \ libcairo2-dev \ libcurl4-openssl-dev \ libev-dev \ From 01586af72ccdf1f35c3c1d031ccc1627cc9e547a Mon Sep 17 00:00:00 2001 From: Cole Arendt Date: Thu, 18 Apr 2024 05:41:10 -0400 Subject: [PATCH 050/165] fix spacing --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index bbe161715..20bf3ec58 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,7 +13,7 @@ services: connect: container_name: rstudio-connect - image: rstudio/rstudio-connect:${RSC_VERSION:-ubuntu2204} + image: rstudio/rstudio-connect:${RSC_VERSION:-ubuntu2204} privileged: true environment: RSC_LICENSE: ${RSC_LICENSE} From 1cfd3a36a28b365aa671a52df7c87dca03f26699 Mon Sep 17 00:00:00 2001 From: Cole Arendt Date: Thu, 18 Apr 2024 09:35:32 -0400 Subject: [PATCH 051/165] =?UTF-8?q?add=20a=20sleep=20to=20workbench=20star?= =?UTF-8?q?tup...=20=F0=9F=98=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We discussed this offline. Workbench apparently has a race condition where it starts up and provisions files. If it shuts down before complete, you can end up with failing tests and a weird `launcher.pem` file with no data and the wrong file permissions. Hopefully this "fix" will not be long lived. --- workbench/Dockerfile.ubuntu2204 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/workbench/Dockerfile.ubuntu2204 b/workbench/Dockerfile.ubuntu2204 index 8234397ee..28f40f275 100644 --- a/workbench/Dockerfile.ubuntu2204 +++ b/workbench/Dockerfile.ubuntu2204 @@ -53,6 +53,8 @@ RUN apt-get update \ && gpg --keyserver keys.openpgp.org --recv-keys 51C0B5BB19F92D60 \ && dpkg-sig --verify ./rstudio-workbench.deb \ && apt-get install -yq --no-install-recommends ./rstudio-workbench.deb \ + # a wild hack to ensure that workbench can install _and start_ completely before shutdown + && sleep 30 \ && rm ./rstudio-workbench.deb \ && apt-get autoremove -y \ && apt-get clean \ From 1c0c92fe0e85207e7bbd09c65da85822c8559368 Mon Sep 17 00:00:00 2001 From: Cole Arendt Date: Thu, 18 Apr 2024 09:43:38 -0400 Subject: [PATCH 052/165] add TZ env var to prevent system-looking errors As discussed in #720, these errors are resolved by setting the TZ variable. Setting that variable in the images should ensure that these errors are not seen across a wide array of environments. --- content/base/Dockerfile.ubuntu2204 | 1 + product/base/Dockerfile.ubuntu2204 | 1 + 2 files changed, 2 insertions(+) diff --git a/content/base/Dockerfile.ubuntu2204 b/content/base/Dockerfile.ubuntu2204 index 118fc171c..e96fdcb17 100644 --- a/content/base/Dockerfile.ubuntu2204 +++ b/content/base/Dockerfile.ubuntu2204 @@ -18,6 +18,7 @@ RUN apt-get update \ ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en ENV LC_ALL en_US.UTF-8 +ENV TZ=UTC # Installation prerequisites --------------------------------------------------# # curl is used to download things. diff --git a/product/base/Dockerfile.ubuntu2204 b/product/base/Dockerfile.ubuntu2204 index 8e574e524..24104fcad 100644 --- a/product/base/Dockerfile.ubuntu2204 +++ b/product/base/Dockerfile.ubuntu2204 @@ -129,6 +129,7 @@ RUN localedef -i en_US -f UTF-8 en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en ENV LC_ALL en_US.UTF-8 +ENV TZ=UTC ### Clean up ### RUN apt-get install -yqf --no-install-recommends \ From 0d64e870af1f862dda7d0c7d98586f3dfdf3a2ea Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Thu, 18 Apr 2024 14:04:42 -0700 Subject: [PATCH 053/165] Extract common operations to reusable scripts in base images (#716) * Fix/exclude goss tests for buildx bake * Implement separate test for Connect * Implement bake preview builds * Provision buildx in preview * Do not cache or output tests for preview Provide a buildx config for GHA Unify test sleep behavior of Workbench images * Remove test targets * Remove test layers from Dockerfiles * Change test running to be orchestrated by a Python script * Update preview builds for new test script * Create common use scripts in base image for Ubuntu 22.04 images * Create common use scripts in base image for CentOS 7 images * Move deps to subdirectory Fix hadolint issues * Ignore hadolint issue * Update permissions hex for tests * Remove build.justfile * Remove unnecessary buildx setup from build-bake-preview.yaml * Move libarchive-dev to ubuntu2204_packages.txt --- product/base/Dockerfile.centos7 | 65 ++---- product/base/Dockerfile.ubuntu2204 | 114 ++-------- product/base/deps/centos7_packages.txt | 20 ++ product/base/deps/requirements.txt | 2 + product/base/deps/ubuntu2204_packages.txt | 66 ++++++ product/base/scripts/rhel/install_drivers.sh | 21 ++ product/base/scripts/rhel/install_python.sh | 118 ++++++++++ product/base/scripts/rhel/install_quarto.sh | 75 +++++++ product/base/scripts/rhel/install_r.sh | 173 +++++++++++++++ product/base/scripts/rhel/yum.sh | 112 ++++++++++ product/base/scripts/ubuntu/apt.sh | 118 ++++++++++ .../base/scripts/ubuntu/install_drivers.sh | 21 ++ product/base/scripts/ubuntu/install_python.sh | 115 ++++++++++ product/base/scripts/ubuntu/install_quarto.sh | 75 +++++++ product/base/scripts/ubuntu/install_r.sh | 208 ++++++++++++++++++ product/base/test/goss.yaml | 22 ++ product/pro/Dockerfile.centos7 | 17 +- product/pro/Dockerfile.ubuntu2204 | 20 +- product/pro/deps/r_packages.txt | 1 + 19 files changed, 1203 insertions(+), 160 deletions(-) create mode 100644 product/base/deps/centos7_packages.txt create mode 100644 product/base/deps/requirements.txt create mode 100644 product/base/deps/ubuntu2204_packages.txt create mode 100755 product/base/scripts/rhel/install_drivers.sh create mode 100755 product/base/scripts/rhel/install_python.sh create mode 100755 product/base/scripts/rhel/install_quarto.sh create mode 100755 product/base/scripts/rhel/install_r.sh create mode 100755 product/base/scripts/rhel/yum.sh create mode 100755 product/base/scripts/ubuntu/apt.sh create mode 100755 product/base/scripts/ubuntu/install_drivers.sh create mode 100755 product/base/scripts/ubuntu/install_python.sh create mode 100755 product/base/scripts/ubuntu/install_quarto.sh create mode 100755 product/base/scripts/ubuntu/install_r.sh create mode 100644 product/pro/deps/r_packages.txt diff --git a/product/base/Dockerfile.centos7 b/product/base/Dockerfile.centos7 index f000c4322..a0c51b31e 100644 --- a/product/base/Dockerfile.centos7 +++ b/product/base/Dockerfile.centos7 @@ -8,30 +8,17 @@ ARG PYTHON_VERSION_ALT=3.8.15 ARG TINI_VERSION=0.19.0 ARG QUARTO_VERSION=1.3.340 +ARG SCRIPTS_DIR=/opt/positscripts + +COPY scripts/rhel/* ${SCRIPTS_DIR}/ + ### Update/upgrade system packages ### -RUN yum upgrade -y -q \ - && yum install -y -q \ - epel-release \ - && yum install -y -q \ - bzip2 \ - git \ - gpg \ - gpg-agent \ - libcurl-devel \ - libuser-devel \ - libxml2-devel \ - openssl-devel \ - openssh-clients \ - pandoc \ - perl-Digest-MD5 \ - postgresql-libs \ - rrdtool \ - sudo \ - unixODBC \ - unixODBC-devel \ - wget \ - which \ - && yum clean all +COPY deps/centos7_packages.txt /tmp/packages.txt +# hadolint ignore=SC2046 +RUN ${SCRIPTS_DIR}/yum.sh --update upgrade \ + && ${SCRIPTS_DIR}/yum.sh install epel-release \ + && ${SCRIPTS_DIR}/yum.sh install $(cat /tmp/packages.txt) \ + && ${SCRIPTS_DIR}/yum.sh --clean ### Install tini ### ADD https://cdn.rstudio.com/platform/tini/v${TINI_VERSION}/tini-amd64 /tini @@ -50,37 +37,22 @@ RUN curl -sL "https://yihui.org/tinytex/install-bin-unix.sh" | sh \ && /opt/TinyTeX/bin/*/tlmgr path add ### Install Quarto ### -RUN curl -o quarto.tar.gz -L https://github.com/quarto-dev/quarto-cli/releases/download/v${QUARTO_VERSION}/quarto-${QUARTO_VERSION}-linux-amd64.tar.gz \ - && mkdir -p /opt/quarto/${QUARTO_VERSION} \ - && tar -zxvf quarto.tar.gz -C "/opt/quarto/${QUARTO_VERSION}" --strip-components=1 \ - && rm -f quarto.tar.gz \ +RUN QUARTO_VERSION=${QUARTO_VERSION} ${SCRIPTS_DIR}/install_quarto.sh \ && ln -s /opt/quarto/${QUARTO_VERSION}/bin/quarto /usr/local/bin/quarto ### Install R versions ### -RUN curl -O https://cdn.rstudio.com/r/centos-7/pkgs/R-${R_VERSION}-1-1.x86_64.rpm \ - && curl -O https://cdn.rstudio.com/r/centos-7/pkgs/R-${R_VERSION_ALT}-1-1.x86_64.rpm \ - && yum install -y R-${R_VERSION}-1-1.x86_64.rpm \ - && yum install -y R-${R_VERSION_ALT}-1-1.x86_64.rpm \ - && yum clean all \ - && rm -rf R-${R_VERSION}-1-1.x86_64.rpm \ - && rm -rf R-${R_VERSION_ALT}-1-1.x86_64.rpm \ +RUN R_VERSION=${R_VERSION} ${SCRIPTS_DIR}/install_r.sh \ + && R_VERSION=${R_VERSION_ALT} ${SCRIPTS_DIR}/install_r.sh \ && ln -s /opt/R/${R_VERSION} /opt/R/default \ && ln -s /opt/R/default/bin/R /usr/local/bin/R \ && ln -s /opt/R/default/bin/Rscript /usr/local/bin/Rscript ### Install Python versions ### -RUN curl -O https://cdn.rstudio.com/python/centos-7/pkgs/python-${PYTHON_VERSION}-1-1.x86_64.rpm \ - && curl -O https://cdn.rstudio.com/python/centos-7/pkgs/python-${PYTHON_VERSION_ALT}-1-1.x86_64.rpm \ - && yum install -y python-${PYTHON_VERSION}-1-1.x86_64.rpm \ - && yum install -y python-${PYTHON_VERSION_ALT}-1-1.x86_64.rpm \ - && yum clean all \ - && rm -rf python-${PYTHON_VERSION}-1-1.x86_64.rpm \ - && rm -rf python-${PYTHON_VERSION_ALT}-1-1.x86_64.rpm \ - && /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install 'virtualenv<20' \ - && /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install --upgrade setuptools \ - && /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install 'virtualenv<20' \ - && /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install --upgrade setuptools \ - && ln -s /opt/python/${PYTHON_VERSION} /opt/python/default +COPY deps/requirements.txt /tmp/requirements.txt +RUN PYTHON_VERSION=${PYTHON_VERSION} ${SCRIPTS_DIR}/install_python.sh -r /tmp/requirements.txt \ + && PYTHON_VERSION=${PYTHON_VERSION_ALT} ${SCRIPTS_DIR}/install_python.sh -r /tmp/requirements.txt \ + && ln -s /opt/python/${PYTHON_VERSION} /opt/python/default \ + && rm -f /tmp/requirements.txt ### Locale configuration ### RUN localedef -i en_US -f UTF-8 en_US.UTF-8 @@ -88,7 +60,6 @@ ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en ENV LC_ALL en_US.UTF-8 - LABEL posit.r.version="${R_VERSION}" \ posit.r.version_alt="${R_VERSION_ALT}" \ posit.python.version="${PYTHON_VERSION}" \ diff --git a/product/base/Dockerfile.ubuntu2204 b/product/base/Dockerfile.ubuntu2204 index e848521fd..8f21bc19e 100644 --- a/product/base/Dockerfile.ubuntu2204 +++ b/product/base/Dockerfile.ubuntu2204 @@ -9,74 +9,18 @@ ARG PYTHON_VERSION_ALT=3.8.17 ARG TINI_VERSION=0.19.0 ARG QUARTO_VERSION=1.3.340 +ARG SCRIPTS_DIR=/opt/positscripts + +COPY scripts/ubuntu/* ${SCRIPTS_DIR}/ + ### Update/upgrade system packages ### -RUN apt-get update --fix-missing \ - && apt-get upgrade -yq \ - && apt-get install -yq --no-install-recommends \ - apt-transport-https \ - ca-certificates \ - cmake \ - cracklib-runtime \ - curl \ - default-jdk \ - dirmngr \ - dpkg-sig \ - g++ \ - gcc \ - gdal-bin \ - gfortran \ - git \ - gpg \ - gpg-agent \ - gsfonts \ - imagemagick \ - libarchive-dev \ - libcairo2-dev \ - libcurl4-openssl-dev \ - libev-dev \ - libfontconfig1-dev \ - libfreetype6-dev \ - libfribidi-dev \ - libgdal-dev \ - libgeos-dev \ - libgl1-mesa-dev \ - libglpk-dev \ - libglu1-mesa-dev \ - libgmp3-dev \ - libharfbuzz-dev \ - libicu-dev \ - libjpeg-dev \ - libmagick++-dev \ - libmysqlclient-dev \ - libopenblas-dev \ - libpaper-utils \ - libpcre2-dev \ - libpng-dev \ - libproj-dev \ - libsodium-dev \ - libssh2-1-dev \ - libssl-dev \ - libtiff-dev \ - libudunits2-dev \ - libv8-dev \ - libxml2-dev \ - locales \ - make \ - openssh-client \ - pandoc \ - perl \ - sudo \ - tcl \ - tk \ - tk-dev \ - tk-table \ - tzdata \ - unixodbc-dev \ - unzip \ - wget \ - zip \ - zlib1g-dev \ - && rm -rf /var/lib/apt/lists/* +COPY deps/ubuntu2204_packages.txt /tmp/apt_packages.txt +# hadolint ignore=SC2046 +RUN ${SCRIPTS_DIR}/apt.sh --update install lsof \ + && ${SCRIPTS_DIR}/apt.sh --update upgrade \ + && ${SCRIPTS_DIR}/apt.sh install $(cat /tmp/apt_packages.txt) \ + && ${SCRIPTS_DIR}/apt.sh --clean \ + && rm -f /tmp/apt_packages.txt ### Install tini ### ADD https://cdn.rstudio.com/platform/tini/v${TINI_VERSION}/tini-amd64 /tini @@ -95,35 +39,22 @@ RUN curl -sL "https://yihui.org/tinytex/install-bin-unix.sh" | sh \ && /opt/TinyTeX/bin/*/tlmgr path add ### Install Quarto ### -RUN curl -o quarto.tar.gz -L https://github.com/quarto-dev/quarto-cli/releases/download/v${QUARTO_VERSION}/quarto-${QUARTO_VERSION}-linux-amd64.tar.gz \ - && mkdir -p /opt/quarto/${QUARTO_VERSION} \ - && tar -zxvf quarto.tar.gz -C "/opt/quarto/${QUARTO_VERSION}" --strip-components=1 \ - && rm -f quarto.tar.gz \ +RUN QUARTO_VERSION=${QUARTO_VERSION} ${SCRIPTS_DIR}/install_quarto.sh \ && ln -s /opt/quarto/${QUARTO_VERSION}/bin/quarto /usr/local/bin/quarto ### Install R versions ### -RUN curl -O https://cdn.rstudio.com/r/ubuntu-2204/pkgs/r-${R_VERSION}_1_amd64.deb \ - && curl -O https://cdn.rstudio.com/r/ubuntu-2204/pkgs/r-${R_VERSION_ALT}_1_amd64.deb \ - && apt-get install -yq --no-install-recommends ./r-${R_VERSION}_1_amd64.deb \ - && apt-get install -yq --no-install-recommends ./r-${R_VERSION_ALT}_1_amd64.deb \ - && rm -f ./r-${R_VERSION}_1_amd64.deb \ - && rm -f ./r-${R_VERSION_ALT}_1_amd64.deb \ +RUN R_VERSION=${R_VERSION} ${SCRIPTS_DIR}/install_r.sh \ + && R_VERSION=${R_VERSION_ALT} ${SCRIPTS_DIR}/install_r.sh \ && ln -s /opt/R/${R_VERSION} /opt/R/default \ && ln -s /opt/R/default/bin/R /usr/local/bin/R \ && ln -s /opt/R/default/bin/Rscript /usr/local/bin/Rscript ### Install Python versions ### -RUN curl -O https://cdn.rstudio.com/python/ubuntu-2204/pkgs/python-${PYTHON_VERSION}_1_amd64.deb \ - && curl -O https://cdn.rstudio.com/python/ubuntu-2204/pkgs/python-${PYTHON_VERSION_ALT}_1_amd64.deb \ - && apt-get install -yq --no-install-recommends ./python-${PYTHON_VERSION}_1_amd64.deb \ - && apt-get install -yq --no-install-recommends ./python-${PYTHON_VERSION_ALT}_1_amd64.deb \ - && rm -rf python-${PYTHON_VERSION}_1_amd64.deb \ - && rm -rf python-${PYTHON_VERSION_ALT}_1_amd64.deb \ - && /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install 'virtualenv<20' \ - && /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install --upgrade setuptools \ - && /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install 'virtualenv<20' \ - && /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install --upgrade setuptools \ - && ln -s /opt/python/${PYTHON_VERSION} /opt/python/default +COPY deps/requirements.txt /tmp/requirements.txt +RUN PYTHON_VERSION=${PYTHON_VERSION} ${SCRIPTS_DIR}/install_python.sh -r /tmp/requirements.txt \ + && PYTHON_VERSION=${PYTHON_VERSION_ALT} ${SCRIPTS_DIR}/install_python.sh -r /tmp/requirements.txt \ + && ln -s /opt/python/${PYTHON_VERSION} /opt/python/default \ + && rm -f /tmp/requirements.txt ### Locale configuration ### RUN localedef -i en_US -f UTF-8 en_US.UTF-8 @@ -132,13 +63,6 @@ ENV LANGUAGE en_US:en ENV LC_ALL en_US.UTF-8 ENV TZ=UTC -### Clean up ### -RUN apt-get install -yqf --no-install-recommends \ - && apt-get autoremove \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - - LABEL posit.r.version="${R_VERSION}" \ posit.r.version_alt="${R_VERSION_ALT}" \ posit.python.version="${PYTHON_VERSION}" \ diff --git a/product/base/deps/centos7_packages.txt b/product/base/deps/centos7_packages.txt new file mode 100644 index 000000000..cd91ab88b --- /dev/null +++ b/product/base/deps/centos7_packages.txt @@ -0,0 +1,20 @@ +bzip2 +curl +git +gpg +gpg-agent +libcurl-devel +libuser-devel +libxml2-devel +openssl-devel +openssh-clients +pandoc +perl-Digest-MD5 +postgresql-libs +redhat-lsb-core +rrdtool +sudo +unixODBC +unixODBC-devel +wget +which \ No newline at end of file diff --git a/product/base/deps/requirements.txt b/product/base/deps/requirements.txt new file mode 100644 index 000000000..0df1a18f1 --- /dev/null +++ b/product/base/deps/requirements.txt @@ -0,0 +1,2 @@ +virtualenv<20 +setuptools diff --git a/product/base/deps/ubuntu2204_packages.txt b/product/base/deps/ubuntu2204_packages.txt new file mode 100644 index 000000000..3a836e5c7 --- /dev/null +++ b/product/base/deps/ubuntu2204_packages.txt @@ -0,0 +1,66 @@ +apt-transport-https +build-essential +ca-certificates +cmake +cracklib-runtime +curl +default-jdk +dirmngr +dpkg-sig +g++ +gcc +gdal-bin +gfortran +git +gnupg2 +gpg +gpg-agent +gsfonts +imagemagick +libarchive-dev +libcairo2-dev +libcurl4-openssl-dev +libev-dev +libfontconfig1-dev +libfreetype6-dev +libfribidi-dev +libgdal-dev +libgeos-dev +libgl1-mesa-dev +libglpk-dev +libglu1-mesa-dev +libgmp3-dev +libharfbuzz-dev +libicu-dev +libjpeg-dev +libmagick++-dev +libmysqlclient-dev +libopenblas-dev +libpaper-utils +libpcre2-dev +libpng-dev +libproj-dev +libsodium-dev +libssh2-1-dev +libssl-dev +libtiff-dev +libudunits2-dev +libv8-dev +libxml2-dev +locales +lsb-release +make +openssh-client +pandoc +perl +sudo +tcl +tk +tk-dev +tk-table +tzdata +unixodbc-dev +unzip +wget +zip +zlib1g-dev \ No newline at end of file diff --git a/product/base/scripts/rhel/install_drivers.sh b/product/base/scripts/rhel/install_drivers.sh new file mode 100755 index 000000000..40538b100 --- /dev/null +++ b/product/base/scripts/rhel/install_drivers.sh @@ -0,0 +1,21 @@ +#!/bin/bash +set -exo pipefail +export DEBIAN_FRONTEND=noninteractive + +# Output delimiter +d="====" + +if [ -z "$DRIVERS_VERSION" ]; then + echo "$d No DRIVERS_VERSION specified $d" + exit 1 +fi + +echo "$d$d Installing Professional Drivers ${DRIVERS_VERSION} $d$d" + +drivers_url="https://cdn.rstudio.com/drivers/7C152C12/installer/rstudio-drivers-${DRIVERS_VERSION}.el.x86_64.rpm" +curl -sL "$drivers_url" -o "/tmp/rstudio-drivers_${DRIVERS_VERSION}.el.x86_64.rpm" + +yum install -y -q "/tmp/rstudio-drivers_${DRIVERS_VERSION}.el.x86_64.rpm" +cat /opt/rstudio-drivers/odbcinst.ini.sample > /etc/odbcinst.ini + +rm /tmp/rstudio-drivers_${DRIVERS_VERSION}.el.x86_64.rpm diff --git a/product/base/scripts/rhel/install_python.sh b/product/base/scripts/rhel/install_python.sh new file mode 100755 index 000000000..ecf32923f --- /dev/null +++ b/product/base/scripts/rhel/install_python.sh @@ -0,0 +1,118 @@ +#!/bin/bash +set -eo pipefail +export DEBIAN_FRONTEND=noninteractive + +# Output delimiter +d="====" + +usage() { + echo "Usage:" + echo " $0 [OPTIONS]" + echo "" + echo "Examples:" + echo " # Install Python version specified by PYTHON_VERSION environment variable" + echo " $0" + echo " # Install Python 3.10.4" + echo " PYTHON_VERSION=3.10.4 $0" + echo " # Install Python and packages listed in /tmp/pythonh_packages.txt" + echo " PYTHON_VERSION=3.11.1 $0 -r /tmp/r_packages.txt" + echo "" + echo "Options:" + echo " -d, --debug Enable debug output" + echo " -h, --help Print usage and exit" + echo " --prefix Install Python to a custom prefix" + echo " Each version of Python will have its own subdirectory" + echo " Default: /opt/python" + echo " -r, --requirement " + echo " Install python packages from a requirements file" +} + + +# Set defaults +if [ -z "${DISTRO}" ]; then + DISTRO=$(lsb_release -is | tr '[:upper:]' '[:lower:]') +fi +if [ -z "${OS_VERSION}" ]; then + OS_VERSION=$(rpm -E %{rhel}) +fi +YUM_ARGS="-y -q" +PREFIX="/opt/python" + +OPTIONS=$(getopt -o hdr: --long help,debug,prefix:,requirement: -- "$@") +# shellcheck disable=SC2181 +if [[ $? -ne 0 ]]; then + exit 1; +fi + +eval set -- "$OPTIONS" +while true; do + case "$1" in + -d | --debug) + set -x + shift + ;; + -h | --help) + usage + shift + exit + ;; + --prefix) + PREFIX="$2" + shift 2 + ;; + -r | --requirement) + PYTHON_PKG_FILE="$2" + shift 2 + ;; + --) shift; + break + ;; + esac +done + +if [ -z "$PYTHON_VERSION" ]; then + usage + exit 1 +fi + +# Set python binary path +PYTHON_BIN="${PREFIX}/${PYTHON_VERSION}/bin/python" + +# Set yum options +YUM_ARGS="-y -q" + +install_python() { + # Check if Python is already installed + if $PYTHON_BIN --version | grep -qE "^Python ${PYTHON_VERSION}" ; then + echo "$d Python $PYTHON_VERSION is already installed in $PREFIX/$PYTHON_VERSION $d" + return + fi + + echo "$d$d Installing Python $PYTHON_VERSION to $PREFIX/$PYTHON_VERSION $d$d" + mkdir -p "$PREFIX" + + local python_url="https://cdn.rstudio.com/python/${DISTRO}-${OS_VERSION}/pkgs/python-${PYTHON_VERSION}-1-1.x86_64.rpm" + curl -sL "$python_url" -o "/tmp/python-${PYTHON_VERSION}.rpm" + + # shellcheck disable=SC2086 + yum install $YUM_ARGS "/tmp/python-${PYTHON_VERSION}.rpm" + rm "/tmp/python-${PYTHON_VERSION}.rpm" + # Upgrade pip to latest version + $PYTHON_BIN -m pip install -U pip +} + +install_python_packages() { + if [ ! -f "$PYTHON_PKG_FILE" ]; then + echo "$d Python package file $PYTHON_PKG_FILE does not exist $d" + exit 1 + fi + + echo "$d$d Installing python-${PYTHON_VERSION} packages from ${PYTHON_PKG_FILE} $d$d" + $PYTHON_BIN -m pip install -U pip + $PYTHON_BIN -m pip install -r "$PYTHON_PKG_FILE" +} + +install_python +if [ -n "$PYTHON_PKG_FILE" ]; then + install_python_packages +fi diff --git a/product/base/scripts/rhel/install_quarto.sh b/product/base/scripts/rhel/install_quarto.sh new file mode 100755 index 000000000..e6071b137 --- /dev/null +++ b/product/base/scripts/rhel/install_quarto.sh @@ -0,0 +1,75 @@ +#!/bin/bash +set -eo pipefail +export DEBIAN_FRONTEND=noninteractive + +# Output delimiter +d="====" + +usage() { + echo "Usage:" + echo " $0 [OPTIONS]" + echo "" + echo "Examples:" + echo " # Install Quarto version specified by QUARTO_VERSION environment variable" + echo " $0" + echo " # Install Quarto 1.3.340" + echo " QUARTO_VERSION=1.3.340 $0" + echo "" + echo "Options:" + echo " -d, --debug Enable debug output" + echo " -h, --help Print usage and exit" + echo " --prefix Install Quarto to a custom prefix" + echo " Each version of Quarto will have its own subdirectory" + echo " Default: /opt/quarto" +} + + +# Set defaults +PREFIX="/opt/quarto" + +OPTIONS=$(getopt -o hdr: --long help,debug,prefix: -- "$@") +# shellcheck disable=SC2181 +if [[ $? -ne 0 ]]; then + exit 1; +fi + +eval set -- "$OPTIONS" +while true; do + case "$1" in + -d | --debug) + set -x + shift + ;; + -h | --help) + usage + shift + exit + ;; + --prefix) + PREFIX="$2" + shift 2 + ;; + --) shift; + break + ;; + esac +done + +if [ -z "$QUARTO_VERSION" ]; then + usage + exit 1 +fi + +install_quarto() { + # Check if Quarto is already installed + # shellcheck disable=SC2086 + if ${PREFIX}/${QUARTO_VERSION}/bin/quarto --version | grep -qE "^${QUARTO_VERSION}" ; then + echo "$d Quarto $QUARTO_VERSION is already installed in $PREFIX/$QUARTO_VERSION $d" + return + fi + + mkdir -p "/opt/quarto/${QUARTO_VERSION}" + wget -q -O - "https://github.com/quarto-dev/quarto-cli/releases/download/v${QUARTO_VERSION}/quarto-${QUARTO_VERSION}-linux-amd64.tar.gz" | tar xzf - -C "/opt/quarto/${QUARTO_VERSION}" --strip-components=1 +} + +install_quarto diff --git a/product/base/scripts/rhel/install_r.sh b/product/base/scripts/rhel/install_r.sh new file mode 100755 index 000000000..b346ea123 --- /dev/null +++ b/product/base/scripts/rhel/install_r.sh @@ -0,0 +1,173 @@ +#!/bin/bash +set -eo pipefail +export DEBIAN_FRONTEND=noninteractive + +# Output delimiter +d="====" + +usage() { + echo "Usage:" + echo " $0 [OPTIONS]" + echo "" + echo "Examples:" + echo " # Install R version specified by R_VERSION environment variable" + echo " $0" + echo " # Install R 4.1.2" + echo " R_VERSION=4.1.2 $0" + echo " # Install R 4.2.3 and packages listed in /tmp/r_packages.txt" + echo " R_VERSION=4.2.3 $0 -r /tmp/r_packages.txt" + echo "" + echo "Options:" + echo " -d, --debug Enable debug output" + echo " -h, --help Print usage and exit" + echo " --prefix Install R to a custom prefix" + echo " Each version of R will have its own subdirectory" + echo " Default: /opt/R" + echo " --r-exists Expect R version to already be installed" + echo " -r, --requirement " + echo " Install R packages from a requirements file" + echo " --with-source Also download the R source code" +} + + +# Set defaults +if [ -z "${DISTRO}" ]; then + DISTRO=$(lsb_release -is | tr '[:upper:]' '[:lower:]') +fi +if [ -z "${OS_VERSION}" ]; then + OS_VERSION=$(rpm -E %{rhel}) +fi +YUM_ARGS="-y -q" +PREFIX="/opt/R" +R_EXISTS=0 +WITH_SOURCE=0 + +OPTIONS=$(getopt -o hdr: --long help,debug,distro:,prefix:,r-exists,requirement:,with-source -- "$@") +# shellcheck disable=SC2181 +if [[ $? -ne 0 ]]; then + exit 1; +fi + +eval set -- "$OPTIONS" +while true; do + case "$1" in + -d | --debug) + set -x + shift + ;; + -h | --help) + usage + shift + exit + ;; + --prefix) + PREFIX="$2" + shift 2 + ;; + --r-exists) + R_EXISTS=1 + shift + ;; + -r | --requirement) + R_PKG_FILE="$2" + shift 2 + ;; + --with-source) + WITH_SOURCE=1 + shift + ;; + --) shift; + break + ;; + esac +done + +if [ -z "$R_VERSION" ]; then + usage + exit 1 +fi + +# Set R binary path +R_BIN="${PREFIX}/${R_VERSION}/bin/R" + +# Set yum options +YUM_ARGS="-y -q" + +install_r() { + echo "$d$d Installing R $R_VERSION to $PREFIX/$R_VERSION $d$d" + mkdir -p "$PREFIX" + + local r_url="https://cdn.rstudio.com/r/${DISTRO}-${OS_VERSION}/pkgs/R-${R_VERSION}-1-1.x86_64.rpm" + curl -sL "$r_url" -o "/tmp/r-${R_VERSION}.rpm" + + # shellcheck disable=SC2086 + yum install $YUM_ARGS "/tmp/r-${R_VERSION}.rpm" + rm "/tmp/r-${R_VERSION}.rpm" +} + +install_r_dependencies() { + # RHEL installs are more straightforward than Ubuntu. Installing epel-release should cover us well. + local r_deps="epel-release" + + # Check whether dependencies are already installed + # shellcheck disable=2086 + if rpm -q $r_deps >/dev/null 2>&1 ; then + echo "$d R dependencies already installed $d" + return + fi + + echo "$d$d Installng R depencencies $d$d" + + # Install R dependencies + # shellcheck disable=2086 + yum install $YUM_ARGS epel-release +} + +install_r_packages() { + if [ ! -f "$R_PKG_FILE" ]; then + echo "$d R package file $R_PKG_FILE does not exist $d" + exit 1 + fi + + echo "$d$d Installing R-${R_VERSION} packages from ${R_PKG_FILE} $d$d" + local cran_repo="https://packagemanager.rstudio.com/cran/__linux__/${DISTRO}${OS_VERSION}/latest" + + $R_BIN --vanilla --no-echo < /dev/null +install.packages(readLines("$R_PKG_FILE"), repos = "$cran_repo") +EOF + +} + +get_r_source() { + local r_prefix=${R_VERSION:0:1} + local r_source_dir="/opt/r-sources" + local r_source_url="https://cloud.r-project.org/src/base/R-${r_prefix}/R-${R_VERSION}.tar.gz" + + echo "$d Fetching R-${R_VERSION} source code into $r_source_dir $d" + mkdir -p "$r_source_dir" + + curl -sL "$r_source_url" -o "$r_source_dir/R-${R_VERSION}.tar.gz" +} + + +# Only add the dependencies if we don't expect R to exist +if [ "$R_EXISTS" -eq 0 ]; then + install_r_dependencies +fi + +# Check if R is already installed +if $R_BIN --version | grep -qE "^R version ${R_VERSION}" ; then + echo "$d R $R_VERSION is already installed in $PREFIX/$R_VERSION $d" +elif [ "$R_EXISTS" -eq 1 ]; then + echo "$d R $R_VERSION is not installed in $PREFIX/$R_VERSION $d" + exit 1 +else + install_r +fi + +if [ -n "$R_PKG_FILE" ]; then + install_r_packages +fi +if [ "$WITH_SOURCE" -eq 1 ]; then + get_r_source +fi diff --git a/product/base/scripts/rhel/yum.sh b/product/base/scripts/rhel/yum.sh new file mode 100755 index 000000000..af70f94f2 --- /dev/null +++ b/product/base/scripts/rhel/yum.sh @@ -0,0 +1,112 @@ +#!/bin/bash +set -eo pipefail + +# Output delimiter +d="====" + +usage() { + echo "Usage:" + echo " $0 [OPTIONS] [COMMAND [ARG...]]" + echo "" + echo "Options:" + echo " -d, --debug Enable debug output" + echo " -h, --help Print usage and exit" + echo " --clean Clean yum cache (yum clean all)" + echo " --update Update yum cache (yum check-update)" + echo "" + echo "Commands:" + echo " install Install packages (yum install)" + echo " upgrade Upgrade all packages (yum upgrade)" +} + +# Set defaults +YUM_ARGS="-y -q" +CLEAN=0 +UPDATE=0 + +OPTIONS=$(getopt -o hd --long debug,help,clean,update -- "$@") +if [[ $? -ne 0 ]]; then + exit 1; +fi + +eval set -- "$OPTIONS" +while true; do + case "$1" in + -d | --debug) + set -x + shift + ;; + -h | --help) + usage + shift + exit + ;; + --clean) + CLEAN=1 + shift + ;; + --update) + UPDATE=1 + shift + ;; + --) + shift + break + ;; + *) + echo "Unexpected option: $1" + exit 1 + ;; + esac +done + +# Wait for yum to be done before continuing +# The Deep learning AMI runs an extremely long yum update-install on first boot. +echo "$d Waiting for yum to finish $d" + +# lsof is not installed by default in all images +# We install lsof if it is not already installed, but we don't want the check +# to fail when we invoke this script to install lsof. Chicken & egg problem. +if command -v lsof >/dev/null; then + lsof_result="\$(lsof /var/run/yum.pid)" +else + lsof_result="" +fi +sleep 10 +while [ -n "$lsof_result" ] && [ "$(lslocks | grep "yum")" != "" ]; do + sleep 10 +done + +# Clean yum cache +if [ "$CLEAN" -eq 1 ]; then + echo "$d Cleaning yum cache $d" + yum clean all $YUM_ARGS +fi + +# Update yum cache +if [ "$UPDATE" -eq 1 ]; then + echo "$d Updating yum cache $d" + yum update $YUM_ARGS +fi + +case "$1" in + install) + shift + echo "$d$d Installing yum packages $d$d" + # shellcheck disable=SC2086 + yum install $YUM_ARGS "$@" + ;; + upgrade) + echo "$d$d Upgrading yum packages $d$d" + # shellcheck disable=SC2086 + yum upgrade $YUM_ARGS + ;; + *) + # Allow clean, update to be used as commands + if [ "$UPDATE" -eq 1 ] || [ "$CLEAN" -eq 1 ]; then + exit 0 + fi + usage + exit 1 + ;; +esac diff --git a/product/base/scripts/ubuntu/apt.sh b/product/base/scripts/ubuntu/apt.sh new file mode 100755 index 000000000..e67877d66 --- /dev/null +++ b/product/base/scripts/ubuntu/apt.sh @@ -0,0 +1,118 @@ +#!/bin/bash +set -eo pipefail +export DEBIAN_FRONTEND=noninteractive + +# Output delimiter +d="====" + +usage() { + echo "Usage:" + echo " $0 [OPTIONS] [COMMAND [ARG...]]" + echo "" + echo "Options:" + echo " -d, --debug Enable debug output" + echo " -h, --help Print usage and exit" + echo " --clean Clean apt cache (apt-get clean)" + echo " --update Update apt cache (apt-get update)" + echo "" + echo "Commands:" + echo " install Install packages (apt-get install)" + echo " upgrade Upgrade all packages (apt-get upgrade)" +} + +# Set defaults +APT_ARGS="-o DPkg::Lock::Timeout=60 -y -qq" +CLEAN=0 +UPDATE=0 + +OPTIONS=$(getopt -o hd --long debug,help,clean,update -- "$@") +if [[ $? -ne 0 ]]; then + exit 1; +fi + +eval set -- "$OPTIONS" +while true; do + case "$1" in + -d | --debug) + set -x + shift + ;; + -h | --help) + usage + shift + exit + ;; + --clean) + CLEAN=1 + shift + ;; + --update) + UPDATE=1 + shift + ;; + --) + shift + break + ;; + *) + echo "Unexpected option: $1" + exit 1 + ;; + esac +done + +# Wait for apt to be done before continuing +# The Deep learning AMI runs an extremely long apt update-install on first boot. +echo "$d Waiting for apt to finish $d" + +# lsof is not installed by default in all images +# We install lsof if it is not already installed, but we don't want the check +# to fail when we invoke this script to install lsof. Chicken & egg problem. +if command -v lsof >/dev/null; then + lsof_result="\$(lsof /var/lib/apt/lists/lock)" +else + lsof_result="" +fi +sleep 10 +while [ -n "$lsof_result" ] && [ "$(lslocks | grep "apt")" != "" ]; do + sleep 10 +done + +# Clean apt cache +if [ "$CLEAN" -eq 1 ]; then + echo "$d Cleaning apt cache $d" + # shellcheck disable=SC2086 + apt-get clean $APT_ARGS + rm -rf /var/lib/apt/lists/* +fi + +# Update apt cache +if [ "$UPDATE" -eq 1 ]; then + echo "$d Updating apt cache $d" + # shellcheck disable=SC2086 + apt-get update --fix-missing $APT_ARGS +fi + +case "$1" in + install) + shift + echo "$d$d Installing apt packages $d$d" + # shellcheck disable=SC2086 + apt-get install $APT_ARGS "$@" + ;; + upgrade) + echo "$d$d Upgrading apt packages $d$d" + # shellcheck disable=SC2086 + apt-get upgrade $APT_ARGS + # shellcheck disable=SC2086 + apt-get dist-upgrade $APT_ARGS + ;; + *) + # Allow clean, update to be used as commands + if [ "$UPDATE" -eq 1 ] || [ "$CLEAN" -eq 1 ]; then + exit 0 + fi + usage + exit 1 + ;; +esac diff --git a/product/base/scripts/ubuntu/install_drivers.sh b/product/base/scripts/ubuntu/install_drivers.sh new file mode 100755 index 000000000..68d332d97 --- /dev/null +++ b/product/base/scripts/ubuntu/install_drivers.sh @@ -0,0 +1,21 @@ +#!/bin/bash +set -eo pipefail +export DEBIAN_FRONTEND=noninteractive + +# Output delimiter +d="====" + +if [ -z "$DRIVERS_VERSION" ]; then + echo "$d No DRIVERS_VERSION specified $d" + exit 1 +fi + +echo "$d$d Installing Professional Drivers ${DRIVERS_VERSION} $d$d" + +drivers_url="https://cdn.rstudio.com/drivers/7C152C12/installer/rstudio-drivers_${DRIVERS_VERSION}_amd64.deb" +curl -sL "$drivers_url" -o "/tmp/rstudio-drivers_${DRIVERS_VERSION}_amd64.deb" + +apt-get install -y -qq "/tmp/rstudio-drivers_${DRIVERS_VERSION}_amd64.deb" +cat /opt/rstudio-drivers/odbcinst.ini.sample > /etc/odbcinst.ini + +rm /tmp/rstudio-drivers_${DRIVERS_VERSION}_amd64.deb diff --git a/product/base/scripts/ubuntu/install_python.sh b/product/base/scripts/ubuntu/install_python.sh new file mode 100755 index 000000000..06b6e12c6 --- /dev/null +++ b/product/base/scripts/ubuntu/install_python.sh @@ -0,0 +1,115 @@ +#!/bin/bash +set -eo pipefail +export DEBIAN_FRONTEND=noninteractive + +# Output delimiter +d="====" + +usage() { + echo "Usage:" + echo " $0 [OPTIONS]" + echo "" + echo "Examples:" + echo " # Install Python version specified by PYTHON_VERSION environment variable" + echo " $0" + echo " # Install Python 3.10.4" + echo " PYTHON_VERSION=3.10.4 $0" + echo " # Install Python and packages listed in /tmp/pythonh_packages.txt" + echo " PYTHON_VERSION=3.11.1 $0 -r /tmp/r_packages.txt" + echo "" + echo "Options:" + echo " -d, --debug Enable debug output" + echo " -h, --help Print usage and exit" + echo " --prefix Install Python to a custom prefix" + echo " Each version of Python will have its own subdirectory" + echo " Default: /opt/python" + echo " -r, --requirement " + echo " Install python packages from a requirements file" +} + + +# Set defaults +APT_ARGS="-o DPkg::Lock::Timeout=60 -y -qq" +PREFIX="/opt/python" + +OPTIONS=$(getopt -o hdr: --long help,debug,prefix:,requirement: -- "$@") +# shellcheck disable=SC2181 +if [[ $? -ne 0 ]]; then + exit 1; +fi + +eval set -- "$OPTIONS" +while true; do + case "$1" in + -d | --debug) + set -x + shift + ;; + -h | --help) + usage + shift + exit + ;; + --prefix) + PREFIX="$2" + shift 2 + ;; + -r | --requirement) + PYTHON_PKG_FILE="$2" + shift 2 + ;; + --) shift; + break + ;; + esac +done + +if [ -z "$PYTHON_VERSION" ]; then + usage + exit 1 +fi + +# Set python binary path +PYTHON_BIN="${PREFIX}/${PYTHON_VERSION}/bin/python" + +# Set apt options +APT_ARGS="-o DPkg::Lock::Timeout=60 -y -qq" + +# Set ubuntu version +UBUNTU_VERSION=$(lsb_release -rs) + +install_python() { + # Check if Python is already installed + if $PYTHON_BIN --version | grep -qE "^Python ${PYTHON_VERSION}" ; then + echo "$d Python $PYTHON_VERSION is already installed in $PREFIX/$PYTHON_VERSION $d" + return + fi + + echo "$d$d Installing Python $PYTHON_VERSION to $PREFIX/$PYTHON_VERSION $d$d" + mkdir -p "$PREFIX" + + local python_url="https://cdn.rstudio.com/python/ubuntu-${UBUNTU_VERSION//./}/pkgs/python-${PYTHON_VERSION}_1_amd64.deb" + curl -sL "$python_url" -o "/tmp/python-${PYTHON_VERSION}.deb" + + # shellcheck disable=SC2086 + apt-get install $APT_ARGS "/tmp/python-${PYTHON_VERSION}.deb" + rm "/tmp/python-${PYTHON_VERSION}.deb" + # Upgrade pip to latest version + $PYTHON_BIN -m pip install -U pip +} + +install_python_packages() { + if [ ! -f "$PYTHON_PKG_FILE" ]; then + echo "$d Python package file $PYTHON_PKG_FILE does not exist $d" + exit 1 + fi + + echo "$d$d Installing python-${PYTHON_VERSION} packages from ${PYTHON_PKG_FILE} $d$d" + $PYTHON_BIN -m pip install -U pip + $PYTHON_BIN -m pip install -r "$PYTHON_PKG_FILE" +} + +install_python +if [ -n "$PYTHON_PKG_FILE" ]; then + install_python_packages +fi diff --git a/product/base/scripts/ubuntu/install_quarto.sh b/product/base/scripts/ubuntu/install_quarto.sh new file mode 100755 index 000000000..e6071b137 --- /dev/null +++ b/product/base/scripts/ubuntu/install_quarto.sh @@ -0,0 +1,75 @@ +#!/bin/bash +set -eo pipefail +export DEBIAN_FRONTEND=noninteractive + +# Output delimiter +d="====" + +usage() { + echo "Usage:" + echo " $0 [OPTIONS]" + echo "" + echo "Examples:" + echo " # Install Quarto version specified by QUARTO_VERSION environment variable" + echo " $0" + echo " # Install Quarto 1.3.340" + echo " QUARTO_VERSION=1.3.340 $0" + echo "" + echo "Options:" + echo " -d, --debug Enable debug output" + echo " -h, --help Print usage and exit" + echo " --prefix Install Quarto to a custom prefix" + echo " Each version of Quarto will have its own subdirectory" + echo " Default: /opt/quarto" +} + + +# Set defaults +PREFIX="/opt/quarto" + +OPTIONS=$(getopt -o hdr: --long help,debug,prefix: -- "$@") +# shellcheck disable=SC2181 +if [[ $? -ne 0 ]]; then + exit 1; +fi + +eval set -- "$OPTIONS" +while true; do + case "$1" in + -d | --debug) + set -x + shift + ;; + -h | --help) + usage + shift + exit + ;; + --prefix) + PREFIX="$2" + shift 2 + ;; + --) shift; + break + ;; + esac +done + +if [ -z "$QUARTO_VERSION" ]; then + usage + exit 1 +fi + +install_quarto() { + # Check if Quarto is already installed + # shellcheck disable=SC2086 + if ${PREFIX}/${QUARTO_VERSION}/bin/quarto --version | grep -qE "^${QUARTO_VERSION}" ; then + echo "$d Quarto $QUARTO_VERSION is already installed in $PREFIX/$QUARTO_VERSION $d" + return + fi + + mkdir -p "/opt/quarto/${QUARTO_VERSION}" + wget -q -O - "https://github.com/quarto-dev/quarto-cli/releases/download/v${QUARTO_VERSION}/quarto-${QUARTO_VERSION}-linux-amd64.tar.gz" | tar xzf - -C "/opt/quarto/${QUARTO_VERSION}" --strip-components=1 +} + +install_quarto diff --git a/product/base/scripts/ubuntu/install_r.sh b/product/base/scripts/ubuntu/install_r.sh new file mode 100755 index 000000000..67914952a --- /dev/null +++ b/product/base/scripts/ubuntu/install_r.sh @@ -0,0 +1,208 @@ +#!/bin/bash +set -eo pipefail +export DEBIAN_FRONTEND=noninteractive + +# Output delimiter +d="====" + +usage() { + echo "Usage:" + echo " $0 [OPTIONS]" + echo "" + echo "Examples:" + echo " # Install R version specified by R_VERSION environment variable" + echo " $0" + echo " # Install R 4.1.2" + echo " R_VERSION=4.1.2 $0" + echo " # Install R 4.2.3 and packages listed in /tmp/r_packages.txt" + echo " R_VERSION=4.2.3 $0 -r /tmp/r_packages.txt" + echo "" + echo "Options:" + echo " -d, --debug Enable debug output" + echo " -h, --help Print usage and exit" + echo " --prefix Install R to a custom prefix" + echo " Each version of R will have its own subdirectory" + echo " Default: /opt/R" + echo " --r-exists Expect R version to already be installed" + echo " -r, --requirement " + echo " Install R packages from a requirements file" + echo " --with-source Also download the R source code" +} + + +# Set defaults +APT_ARGS="-o DPkg::Lock::Timeout=60 -y -qq" +PREFIX="/opt/R" +R_EXISTS=0 +WITH_SOURCE=0 + +OPTIONS=$(getopt -o hdr: --long help,debug,distro:,prefix:,r-exists,requirement:,with-source -- "$@") +# shellcheck disable=SC2181 +if [[ $? -ne 0 ]]; then + exit 1; +fi + +eval set -- "$OPTIONS" +while true; do + case "$1" in + -d | --debug) + set -x + shift + ;; + -h | --help) + usage + shift + exit + ;; + --prefix) + PREFIX="$2" + shift 2 + ;; + --r-exists) + R_EXISTS=1 + shift + ;; + -r | --requirement) + R_PKG_FILE="$2" + shift 2 + ;; + --with-source) + WITH_SOURCE=1 + shift + ;; + --) shift; + break + ;; + esac +done + +if [ -z "$R_VERSION" ]; then + usage + exit 1 +fi + +# Set R binary path +R_BIN="${PREFIX}/${R_VERSION}/bin/R" + +# Set apt options +APT_ARGS="-o DPkg::Lock::Timeout=60 -y -qq" +APT_KEY="0x51716619e084dab9" +APT_KEY_FILE="/usr/share/keyrings/cran-rstudio-keyring.gpg" +APT_FILE="/etc/apt/sources.list.d/cran-rstudio.list" + +UBUNTU_CODENAME=$(lsb_release -cs) +UBUNTU_VERSION=$(lsb_release -rs) + +add_cran_apt_source() { + # Ensure we have gnupg2 & dirmngr installed + # shellcheck disable=SC2086 + apt-get install $APT_ARGS --install-recommends gnupg2 dirmngr + # Create ~/.gnupg and start dirmngr in the background + gpg --list-keys >/dev/null 2>&1 + eval "$(dirmngr --daemon)" + + # Add the apt-key to the keyring + gpg --no-default-keyring --keyring $APT_KEY_FILE --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys $APT_KEY + kill "$(echo "$DIRMNGR_INFO" | cut -d: -f2)" + + echo "deb [signed-by=${APT_KEY_FILE}] https://cran.rstudio.com/bin/linux/ubuntu ${UBUNTU_CODENAME}-cran40/" >> $APT_FILE + echo "deb-src [signed-by=${APT_KEY_FILE}] https://cran.rstudio.com/bin/linux/ubuntu ${UBUNTU_CODENAME}-cran40/" >> $APT_FILE + + # shellcheck disable=SC2086 + apt-get update $APT_ARGS +} + +remove_cran_apt_source() { + rm -f $APT_FILE $APT_KEY_FILE + # shellcheck disable=SC2086 + apt-get update $APT_ARGS +} + +install_r() { + echo "$d$d Installing R $R_VERSION to $PREFIX/$R_VERSION $d$d" + mkdir -p "$PREFIX" + + local r_url="https://cdn.rstudio.com/r/ubuntu-${UBUNTU_VERSION//./}/pkgs/r-${R_VERSION}_1_amd64.deb" + curl -sL "$r_url" -o "/tmp/r-${R_VERSION}.deb" + + # shellcheck disable=SC2086 + apt-get install $APT_ARGS "/tmp/r-${R_VERSION}.deb" + rm "/tmp/r-${R_VERSION}.deb" +} + +install_r_dependencies() { + # There are many dependencies that R users may rely on that we want to + # include in the images. These include things like a functional X server, + # fonts, and other libraries that are commonly used by R packages. + local r_deps="r-base-core r-base-dev" + + # Check whether dependencies are already installed + # shellcheck disable=2086 + if dpkg -s $r_deps >/dev/null 2>&1 ; then + echo "$d R dependencies already installed $d" + return + fi + + echo "$d$d Installng R depencencies $d$d" + # Ensure we have apt-transport-https installed + # shellcheck disable=SC2086 + apt-get install $APT_ARGS apt-transport-https + + # Install R dependencies + # shellcheck disable=2086 + apt-get install $APT_ARGS $r_deps +} + +install_r_packages() { + if [ ! -f "$R_PKG_FILE" ]; then + echo "$d R package file $R_PKG_FILE does not exist $d" + exit 1 + fi + + echo "$d$d Installing R-${R_VERSION} packages from ${R_PKG_FILE} $d$d" + local cran_repo="https://packagemanager.rstudio.com/cran/__linux__/${UBUNTU_CODENAME}/latest" + + $R_BIN --vanilla --no-echo < /dev/null +install.packages(readLines("$R_PKG_FILE"), repos = "$cran_repo") +EOF + +} + +get_r_source() { + local r_prefix=${R_VERSION:0:1} + local r_source_dir="/opt/r-sources" + local r_source_url="https://cloud.r-project.org/src/base/R-${r_prefix}/R-${R_VERSION}.tar.gz" + + echo "$d Fetching R-${R_VERSION} source code into $r_source_dir $d" + mkdir -p "$r_source_dir" + + curl -sL "$r_source_url" -o "$r_source_dir/R-${R_VERSION}.tar.gz" +} + + +# Only add the CRAN apt source & dependencies if we don't expect R to exist +if [ "$R_EXISTS" -eq 0 ]; then + add_cran_apt_source + install_r_dependencies +fi + +# Check if R is already installed +if $R_BIN --version | grep -qE "^R version ${R_VERSION}" ; then + echo "$d R $R_VERSION is already installed in $PREFIX/$R_VERSION $d" +elif [ "$R_EXISTS" -eq 1 ]; then + echo "$d R $R_VERSION is not installed in $PREFIX/$R_VERSION $d" + exit 1 +else + install_r +fi + +if [ -n "$R_PKG_FILE" ]; then + install_r_packages +fi +if [ "$WITH_SOURCE" -eq 1 ]; then + get_r_source +fi + +if [ "$R_EXISTS" -eq 0 ]; then + remove_cran_apt_source +fi diff --git a/product/base/test/goss.yaml b/product/base/test/goss.yaml index 18e338a56..e321ebe0a 100644 --- a/product/base/test/goss.yaml +++ b/product/base/test/goss.yaml @@ -15,6 +15,28 @@ package: {{end}} file: + {{if .Env.OS | regexMatch "ubuntu.*"}} + /opt/positscripts/apt.sh: + exists: true + mode: "0755" + {{end}} + {{if .Env.OS | regexMatch "centos.*"}} + /opt/positscripts/yum.sh: + exists: true + mode: "0755" + {{end}} + /opt/positscripts/install_drivers.sh: + exists: true + mode: "0755" + /opt/positscripts/install_python.sh: + exists: true + mode: "0755" + /opt/positscripts/install_quarto.sh: + exists: true + mode: "0755" + /opt/positscripts/install_r.sh: + exists: true + mode: "0755" /opt/R/{{.Env.R_VERSION}}/bin/R: exists: true /opt/R/{{.Env.R_VERSION_ALT}}/bin/R: diff --git a/product/pro/Dockerfile.centos7 b/product/pro/Dockerfile.centos7 index 936611e8c..254456dcf 100644 --- a/product/pro/Dockerfile.centos7 +++ b/product/pro/Dockerfile.centos7 @@ -6,14 +6,15 @@ ARG PYTHON_VERSION=3.9.14 ARG PYTHON_VERSION_ALT=3.8.15 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}.el.x86_64.rpm \ - && yum install -y ./rstudio-drivers-${DRIVERS_VERSION}.el.x86_64.rpm \ - && yum clean all \ - && 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")' +ARG SCRIPTS_DIR=/opt/positscripts + +COPY deps/r_packages.txt /tmp/r_packages.txt +RUN ${SCRIPTS_DIR}/yum.sh --update upgrade \ + && ${SCRIPTS_DIR}/yum.sh install unixODBC unixODBC-devel \ + && DRIVERS_VERSION=${DRIVERS_VERSION} ${SCRIPTS_DIR}/install_drivers.sh \ + && ${SCRIPTS_DIR}/yum.sh --clean \ + && R_VERSION=${R_VERSION} ${SCRIPTS_DIR}/install_r.sh -r /tmp/r_packages.txt \ + && rm -f /tmp/r_packages.txt LABEL rstudio.pro-drivers.version="${DRIVERS_VERSION}" diff --git a/product/pro/Dockerfile.ubuntu2204 b/product/pro/Dockerfile.ubuntu2204 index f17dbfc22..7e36f8569 100644 --- a/product/pro/Dockerfile.ubuntu2204 +++ b/product/pro/Dockerfile.ubuntu2204 @@ -7,16 +7,16 @@ ARG PYTHON_VERSION=3.9.17 ARG PYTHON_VERSION_ALT=3.8.17 ARG DRIVERS_VERSION=2024.03.0 -RUN apt-get update \ - && apt-get install -yq --no-install-recommends unixodbc unixodbc-dev \ - && curl -O https://cdn.rstudio.com/drivers/7C152C12/installer/rstudio-drivers_${DRIVERS_VERSION}_amd64.deb \ - && apt-get update \ - && apt-get install -yq --no-install-recommends ./rstudio-drivers_${DRIVERS_VERSION}_amd64.deb \ - && rm -f ./rstudio-drivers_${DRIVERS_VERSION}_amd64.deb \ - && rm -rf /var/lib/apt/lists/* \ - && 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__/jammy/latest")' +ARG SCRIPTS_DIR=/opt/positscripts -LABEL rstudio.pro-drivers.version="${DRIVERS_VERSION}" +COPY deps/r_packages.txt /tmp/r_packages.txt +RUN ${SCRIPTS_DIR}/apt.sh --update upgrade \ + && ${SCRIPTS_DIR}/apt.sh install unixodbc unixodbc-dev \ + && DRIVERS_VERSION=${DRIVERS_VERSION} ${SCRIPTS_DIR}/install_drivers.sh \ + && ${SCRIPTS_DIR}/apt.sh --clean \ + && R_VERSION=${R_VERSION} ${SCRIPTS_DIR}/install_r.sh -r /tmp/r_packages.txt \ + && rm -f /tmp/r_packages.txt + +LABEL posit.pro-drivers.version="${DRIVERS_VERSION}" ENTRYPOINT ["/tini", "--"] diff --git a/product/pro/deps/r_packages.txt b/product/pro/deps/r_packages.txt new file mode 100644 index 000000000..478698686 --- /dev/null +++ b/product/pro/deps/r_packages.txt @@ -0,0 +1 @@ +odbc \ No newline at end of file From 162c0de51becc6fb1017062364a089403378942e Mon Sep 17 00:00:00 2001 From: Craig Date: Thu, 18 Apr 2024 15:21:28 -0600 Subject: [PATCH 054/165] Stop building centos7 r-session-complete images --- docker-bake.hcl | 5 ++- docker-bake.preview.hcl | 5 ++- r-session-complete/Dockerfile.centos7 | 52 --------------------------- r-session-complete/test/run_tests.sh | 2 -- 4 files changed, 4 insertions(+), 60 deletions(-) delete mode 100644 r-session-complete/Dockerfile.centos7 diff --git a/docker-bake.hcl b/docker-bake.hcl index 2a521eae7..f5e2ef405 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -141,7 +141,6 @@ variable CONTENT_BUILD_MATRIX { variable R_SESSION_COMPLETE_BUILD_MATRIX { default = { builds = [ - {os = "centos7", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.14", py_alternate = "3.8.15"}, {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.14", py_alternate = "3.8.15"}, ] } @@ -402,8 +401,8 @@ target "r-session-complete" { PYTHON_VERSION_ALT = builds.py_alternate JUPYTERLAB_VERSION = "3.6.5" RSW_VERSION = WORKBENCH_VERSION - RSW_NAME = builds.os == "centos7" ? "rstudio-workbench-rhel" : "rstudio-workbench" - RSW_DOWNLOAD_URL = builds.os == "centos7" ? "https://s3.amazonaws.com/rstudio-ide-build/server/centos7/x86_64" : "https://download2.rstudio.org/server/jammy/amd64" + RSW_NAME = "rstudio-workbench" + RSW_DOWNLOAD_URL = "https://download2.rstudio.org/server/jammy/amd64" } } diff --git a/docker-bake.preview.hcl b/docker-bake.preview.hcl index d7754bbec..a7ce0c18b 100644 --- a/docker-bake.preview.hcl +++ b/docker-bake.preview.hcl @@ -138,7 +138,6 @@ variable CONNECT_CONTENT_INIT_BUILD_MATRIX { variable R_SESSION_COMPLETE_BUILD_MATRIX { default = { builds = [ - {os = "centos7", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14"}, {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14"}, ] } @@ -335,7 +334,7 @@ target "r-session-complete-daily" { PYTHON_VERSION_ALT = builds.py_alternate JUPYTERLAB_VERSION = "3.6.5" RSW_VERSION = WORKBENCH_DAILY_VERSION - RSW_NAME = builds.os == "centos7" ? "rstudio-workbench-rhel" : "rstudio-workbench" + RSW_NAME = "rstudio-workbench" RSW_DOWNLOAD_URL = get_rsw_download_url(builds.os) } } @@ -361,7 +360,7 @@ target "r-session-complete-preview" { PYTHON_VERSION_ALT = builds.py_alternate JUPYTERLAB_VERSION = "3.6.5" RSW_VERSION = WORKBENCH_PREVIEW_VERSION - RSW_NAME = builds.os == "centos7" ? "rstudio-workbench-rhel" : "rstudio-workbench" + RSW_NAME = "rstudio-workbench" RSW_DOWNLOAD_URL = get_rsw_download_url(builds.os) } } diff --git a/r-session-complete/Dockerfile.centos7 b/r-session-complete/Dockerfile.centos7 deleted file mode 100644 index b3ec72edb..000000000 --- a/r-session-complete/Dockerfile.centos7 +++ /dev/null @@ -1,52 +0,0 @@ -FROM product-base-pro as build - -ARG R_VERSION=4.2.3 -ARG R_VERSION_ALT=4.1.3 -ARG PYTHON_VERSION=3.9.14 -ARG PYTHON_VERSION_ALT=3.8.15 -ARG JUPYTERLAB_VERSION=3.2.9 -ARG RSW_VERSION=2023.12.1+402.pro1 -ARG RSW_NAME=rstudio-workbench-rhel -ARG RSW_DOWNLOAD_URL=https://s3.amazonaws.com/rstudio-ide-build/server/centos7/x86_64 - -SHELL ["/bin/bash", "-o", "pipefail", "-c"] -RUN yum install -y subversion \ - && RSW_VERSION_URL=$(echo -n "${RSW_VERSION}" | sed 's/+/-/g') \ - && curl -o rstudio-workbench.rpm "${RSW_DOWNLOAD_URL}/${RSW_NAME}-${RSW_VERSION_URL}-x86_64.rpm" \ - # Pre 7/25/23 packages - && gpg --keyserver keyserver.ubuntu.com --recv-keys 3F32EE77E331692F \ - && gpg --export --armor 3F32EE77E331692F > rstudio-signing.key \ - && rpm --import rstudio-signing.key \ - # Post 7/25 packages - && gpg --keyserver hkps://keys.openpgp.org --recv-keys 51C0B5BB19F92D60 \ - && gpg --export --armor 51C0B5BB19F92D60 > rstudio-signing.key \ - && rpm --import rstudio-signing.key \ - && rpm -K rstudio-workbench.rpm \ - && yum install -y rstudio-workbench.rpm \ - && rm rstudio-workbench.rpm \ - && yum clean all \ - && rm -rf /var/lib/rstudio-server/r-versions - -COPY maybe_install_vs_code.sh /tmp/maybe_install_vs_code.sh -RUN /tmp/maybe_install_vs_code.sh \ - && rm /tmp/maybe_install_vs_code.sh - -RUN /opt/python/"${PYTHON_VERSION}"/bin/pip3 install \ - jupyter \ - jupyterlab=="${JUPYTERLAB_VERSION}" \ - rsconnect_jupyter \ - rsconnect_python \ - rsp_jupyter \ - workbench_jupyterlab \ - && ln -s /opt/python/"${PYTHON_VERSION}"/bin/jupyter /usr/local/bin/jupyter \ - && /opt/python/"${PYTHON_VERSION}"/bin/jupyter-nbextension install --sys-prefix --py rsp_jupyter \ - && /opt/python/"${PYTHON_VERSION}"/bin/jupyter-nbextension enable --sys-prefix --py rsp_jupyter \ - && /opt/python/"${PYTHON_VERSION}"/bin/jupyter-nbextension install --sys-prefix --py rsconnect_jupyter \ - && /opt/python/"${PYTHON_VERSION}"/bin/jupyter-nbextension enable --sys-prefix --py rsconnect_jupyter \ - && /opt/python/"${PYTHON_VERSION}"/bin/jupyter-serverextension enable --sys-prefix --py rsconnect_jupyter - -ENV PATH="/opt/python/${PYTHON_VERSION}/bin:${PATH}" - -COPY vscode.extensions.conf /etc/rstudio/vscode.extensions.conf - -EXPOSE 8788/tcp diff --git a/r-session-complete/test/run_tests.sh b/r-session-complete/test/run_tests.sh index e292db061..f5744551d 100755 --- a/r-session-complete/test/run_tests.sh +++ b/r-session-complete/test/run_tests.sh @@ -6,8 +6,6 @@ GOSS_MAX_CONCURRENT=${GOSS_MAX_CONCURRENT:-50} if [ -f /etc/debian_version ]; then OS="ubuntu" -elif [ -f /etc/centos-release ]; then - OS="centos" else echo "OS not supported. Exiting" exit 1 From 89c958625f256ba49021d325f682dcec9d9d008e Mon Sep 17 00:00:00 2001 From: Craig Date: Thu, 18 Apr 2024 15:32:21 -0600 Subject: [PATCH 055/165] Don't lint r-session-complete centos7 image --- .github/workflows/lint.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index c00fa3ff8..54f9f6d3f 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -24,7 +24,6 @@ jobs: - {product: 'connect', os: 'ubuntu2204'} - {product: 'connect-content-init', os: 'ubuntu2204'} - {product: 'package-manager', os: 'ubuntu2204'} - - {product: 'r-session-complete', os: 'centos7'} - {product: 'r-session-complete', os: 'ubuntu2204'} - {product: 'workbench-for-microsoft-azure-ml', os: 'ubuntu2204'} - {product: 'content/base', os: 'ubuntu1804'} From c27cd0715b854cc309b8a5b4c71870c5590e8756 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Fri, 19 Apr 2024 12:15:23 -0700 Subject: [PATCH 056/165] Upgrade setuptools on Python install (#731) --- product/base/Dockerfile.centos7 | 2 +- product/base/Dockerfile.ubuntu2204 | 2 +- product/base/scripts/rhel/install_python.sh | 3 ++- product/base/scripts/ubuntu/install_python.sh | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/product/base/Dockerfile.centos7 b/product/base/Dockerfile.centos7 index a0c51b31e..5e667f12c 100644 --- a/product/base/Dockerfile.centos7 +++ b/product/base/Dockerfile.centos7 @@ -10,7 +10,7 @@ ARG QUARTO_VERSION=1.3.340 ARG SCRIPTS_DIR=/opt/positscripts -COPY scripts/rhel/* ${SCRIPTS_DIR}/ +COPY --chmod=0755 scripts/rhel/* ${SCRIPTS_DIR}/ ### Update/upgrade system packages ### COPY deps/centos7_packages.txt /tmp/packages.txt diff --git a/product/base/Dockerfile.ubuntu2204 b/product/base/Dockerfile.ubuntu2204 index 8f21bc19e..93c0b1bf6 100644 --- a/product/base/Dockerfile.ubuntu2204 +++ b/product/base/Dockerfile.ubuntu2204 @@ -11,7 +11,7 @@ ARG QUARTO_VERSION=1.3.340 ARG SCRIPTS_DIR=/opt/positscripts -COPY scripts/ubuntu/* ${SCRIPTS_DIR}/ +COPY --chmod=0755 scripts/ubuntu/* ${SCRIPTS_DIR}/ ### Update/upgrade system packages ### COPY deps/ubuntu2204_packages.txt /tmp/apt_packages.txt diff --git a/product/base/scripts/rhel/install_python.sh b/product/base/scripts/rhel/install_python.sh index ecf32923f..8ee269607 100755 --- a/product/base/scripts/rhel/install_python.sh +++ b/product/base/scripts/rhel/install_python.sh @@ -97,7 +97,8 @@ install_python() { # shellcheck disable=SC2086 yum install $YUM_ARGS "/tmp/python-${PYTHON_VERSION}.rpm" rm "/tmp/python-${PYTHON_VERSION}.rpm" - # Upgrade pip to latest version + # Upgrade pip and setuptools to latest version + $PYTHON_BIN -m pip install -U setuptools $PYTHON_BIN -m pip install -U pip } diff --git a/product/base/scripts/ubuntu/install_python.sh b/product/base/scripts/ubuntu/install_python.sh index 06b6e12c6..cb84e4e0e 100755 --- a/product/base/scripts/ubuntu/install_python.sh +++ b/product/base/scripts/ubuntu/install_python.sh @@ -94,7 +94,8 @@ install_python() { # shellcheck disable=SC2086 apt-get install $APT_ARGS "/tmp/python-${PYTHON_VERSION}.deb" rm "/tmp/python-${PYTHON_VERSION}.deb" - # Upgrade pip to latest version + # Upgrade pip and setuptools to latest version + $PYTHON_BIN -m pip install -U setuptools $PYTHON_BIN -m pip install -U pip } From 5fed7b9834814f77aa8210a6596d00720062f120 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Fri, 19 Apr 2024 12:50:35 -0700 Subject: [PATCH 057/165] [CVE-2024-22421] Patch jupyterlab to 3.6.7 (#730) --- docker-bake.hcl | 10 +++++++--- docker-bake.preview.hcl | 8 ++++++-- r-session-complete/Dockerfile.centos7 | 2 +- .../Dockerfile.ubuntu2004 | 2 +- workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 | 2 +- workbench/Dockerfile.ubuntu2204 | 2 +- 6 files changed, 17 insertions(+), 9 deletions(-) diff --git a/docker-bake.hcl b/docker-bake.hcl index 2a521eae7..6bd1d6965 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -19,6 +19,10 @@ variable DEFAULT_QUARTO_VERSION { default = "1.4.553" } +variable DEFAULT_JUPYTERLAB_VERSION { + default = "3.6.7" +} + function tag_safe_version { params = [version] result = replace(version, "+", "-") @@ -400,7 +404,7 @@ target "r-session-complete" { R_VERSION_ALT = builds.r_alternate PYTHON_VERSION = builds.py_primary PYTHON_VERSION_ALT = builds.py_alternate - JUPYTERLAB_VERSION = "3.6.5" + JUPYTERLAB_VERSION = DEFAULT_JUPYTERLAB_VERSION RSW_VERSION = WORKBENCH_VERSION RSW_NAME = builds.os == "centos7" ? "rstudio-workbench-rhel" : "rstudio-workbench" RSW_DOWNLOAD_URL = builds.os == "centos7" ? "https://s3.amazonaws.com/rstudio-ide-build/server/centos7/x86_64" : "https://download2.rstudio.org/server/jammy/amd64" @@ -458,7 +462,7 @@ target "workbench-for-google-cloud-workstations" { PYTHON_VERSION = builds.py_primary PYTHON_VERSION_ALT = builds.py_alternate PYTHON_VERSION_JUPYTER = builds.py_alternate - JUPYTERLAB_VERSION = "3.6.5" + JUPYTERLAB_VERSION = DEFAULT_JUPYTERLAB_VERSION QUARTO_VERSION = DEFAULT_QUARTO_VERSION DRIVERS_VERSION = get_drivers_version(builds.os) RSW_VERSION = WORKBENCH_VERSION @@ -488,7 +492,7 @@ target "build-workbench-for-microsoft-azure-ml" { PYTHON_VERSION = builds.py_primary PYTHON_VERSION_ALT = builds.py_alternate PYTHON_VERSION_JUPYTER = builds.py_alternate - JUPYTERLAB_VERSION = "3.6.5" + JUPYTERLAB_VERSION = DEFAULT_JUPYTERLAB_VERSION RSW_VERSION = WORKBENCH_VERSION RSW_NAME = "rstudio-workbench" RSW_DOWNLOAD_URL = "https://download2.rstudio.org/server/jammy/amd64" diff --git a/docker-bake.preview.hcl b/docker-bake.preview.hcl index d7754bbec..171c02870 100644 --- a/docker-bake.preview.hcl +++ b/docker-bake.preview.hcl @@ -27,6 +27,10 @@ variable DEFAULT_QUARTO_VERSION { default = "1.4.553" } +variable DEFAULT_JUPYTERLAB_VERSION { + default = "3.6.7" +} + variable RSW_PREVIEW_URL_BASE { default = "https://s3.amazonaws.com/rstudio-ide-build/server/" } @@ -333,7 +337,7 @@ target "r-session-complete-daily" { R_VERSION_ALT = builds.r_alternate PYTHON_VERSION = builds.py_primary PYTHON_VERSION_ALT = builds.py_alternate - JUPYTERLAB_VERSION = "3.6.5" + JUPYTERLAB_VERSION = DEFAULT_JUPYTERLAB_VERSION RSW_VERSION = WORKBENCH_DAILY_VERSION RSW_NAME = builds.os == "centos7" ? "rstudio-workbench-rhel" : "rstudio-workbench" RSW_DOWNLOAD_URL = get_rsw_download_url(builds.os) @@ -359,7 +363,7 @@ target "r-session-complete-preview" { R_VERSION_ALT = builds.r_alternate PYTHON_VERSION = builds.py_primary PYTHON_VERSION_ALT = builds.py_alternate - JUPYTERLAB_VERSION = "3.6.5" + JUPYTERLAB_VERSION = DEFAULT_JUPYTERLAB_VERSION RSW_VERSION = WORKBENCH_PREVIEW_VERSION RSW_NAME = builds.os == "centos7" ? "rstudio-workbench-rhel" : "rstudio-workbench" RSW_DOWNLOAD_URL = get_rsw_download_url(builds.os) diff --git a/r-session-complete/Dockerfile.centos7 b/r-session-complete/Dockerfile.centos7 index b3ec72edb..6bb34d884 100644 --- a/r-session-complete/Dockerfile.centos7 +++ b/r-session-complete/Dockerfile.centos7 @@ -4,7 +4,7 @@ ARG R_VERSION=4.2.3 ARG R_VERSION_ALT=4.1.3 ARG PYTHON_VERSION=3.9.14 ARG PYTHON_VERSION_ALT=3.8.15 -ARG JUPYTERLAB_VERSION=3.2.9 +ARG JUPYTERLAB_VERSION=3.6.7 ARG RSW_VERSION=2023.12.1+402.pro1 ARG RSW_NAME=rstudio-workbench-rhel ARG RSW_DOWNLOAD_URL=https://s3.amazonaws.com/rstudio-ide-build/server/centos7/x86_64 diff --git a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 index ddec0969c..91418fee4 100644 --- a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 +++ b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 @@ -7,7 +7,7 @@ ARG R_VERSION_ALT=4.1.3 ARG PYTHON_VERSION=3.11.7 ARG PYTHON_VERSION_ALT=3.10.13 ARG PYTHON_VERSION_JUPYTER=3.10.13 -ARG JUPYTERLAB_VERSION=3.6.5 +ARG JUPYTERLAB_VERSION=3.6.7 ARG QUARTO_VERSION=1.3.450 ARG DRIVERS_VERSION=2023.05.0 ARG RSW_VERSION=2023.12.1+402.pro1 diff --git a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 index 81ae1f884..11f93d3df 100644 --- a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 +++ b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 @@ -6,7 +6,7 @@ ARG R_VERSION_ALT=4.1.3 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.5 +ARG JUPYTERLAB_VERSION=3.6.7 ARG RSW_VERSION=2023.12.1+402.pro1 ARG RSW_NAME=rstudio-workbench ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64 diff --git a/workbench/Dockerfile.ubuntu2204 b/workbench/Dockerfile.ubuntu2204 index 28f40f275..ad8dc96b5 100644 --- a/workbench/Dockerfile.ubuntu2204 +++ b/workbench/Dockerfile.ubuntu2204 @@ -6,7 +6,7 @@ ARG R_VERSION_ALT=4.1.3 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.5 +ARG JUPYTERLAB_VERSION=3.6.7 ARG RSW_VERSION=2023.12.1+402.pro1 ARG RSW_NAME=rstudio-workbench ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64 From 4bef13545b9ccee9748ef0aad22b8f7cbe6ab476 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Fri, 19 Apr 2024 13:56:29 -0700 Subject: [PATCH 058/165] Move Quarto installation/configuration to downstream images (#727) * Fix/exclude goss tests for buildx bake * Implement separate test for Connect * Implement bake preview builds * Provision buildx in preview * Do not cache or output tests for preview Provide a buildx config for GHA Unify test sleep behavior of Workbench images * Remove test targets * Remove test layers from Dockerfiles * Change test running to be orchestrated by a Python script * Update preview builds for new test script * Create common use scripts in base image for Ubuntu 22.04 images * Create common use scripts in base image for CentOS 7 images * Move deps to subdirectory Fix hadolint issues * Ignore hadolint issue * Remove build.justfile * Remove unnecessary buildx setup from build-bake-preview.yaml * Move Quarto installation downstream Upgrade Connect and WGCW to 1.4.552 Pin remaining products back to 1.3.340 or lower * Add SCRIPTS_DIR to downstream Dockerfiles * Leave original Quarto install for WGCW * Fix hardcoded QUARTO_VERSION in rstudio-connect.gcfg * Remove unnecessary Quarto tests from base-pro tests * Symlink bundled Quarto for Workbench installations * Fix quarto config replacement in Connect * Remove QUARTO_VERSION arg from base in bake definition * Add quarto check command to Connect goss tests * Remove Quarto build arg from Workbench and r-session-complete * Update preview Connect build matrix with Quarto version * Remove Quarto install from CentOS 7 r-session-complete * Remove package check for Quarto in WGCW * Use DEFAULT_QUARTO_VERSION for Connect matrix * Use DEFAULT_QUARTO_VERSION for Connect matrix * Revert Quarto to 1.3.340 for Connect --- connect/Dockerfile.ubuntu2204 | 13 ++- connect/rstudio-connect-float.gcfg | 7 +- connect/rstudio-connect.gcfg | 2 +- connect/test/goss.yaml | 27 ++++++ content/docker-bake.hcl | 82 ------------------- docker-bake.hcl | 12 ++- docker-bake.preview.hcl | 5 +- product/base/Dockerfile.centos7 | 5 -- product/base/Dockerfile.ubuntu2204 | 4 - product/base/test/goss.yaml | 10 --- product/pro/test/goss.yaml | 10 --- r-session-complete/Dockerfile.centos7 | 4 + r-session-complete/Dockerfile.ubuntu2204 | 4 + r-session-complete/test/goss.yaml | 12 ++- .../Dockerfile.ubuntu2004 | 10 +-- .../test/goss.yaml | 14 ++-- .../Dockerfile.ubuntu2204 | 5 +- .../test/goss.yaml | 8 ++ workbench/Dockerfile.ubuntu2204 | 4 + workbench/test/goss.yaml | 8 ++ 20 files changed, 108 insertions(+), 138 deletions(-) delete mode 100644 content/docker-bake.hcl diff --git a/connect/Dockerfile.ubuntu2204 b/connect/Dockerfile.ubuntu2204 index 39c0105b1..0aff7034b 100644 --- a/connect/Dockerfile.ubuntu2204 +++ b/connect/Dockerfile.ubuntu2204 @@ -8,6 +8,14 @@ ARG R_VERSION_ALT=4.1.3 ARG PYTHON_VERSION=3.9.17 ARG PYTHON_VERSION_ALT=3.8.17 ARG RSC_VERSION=2024.03.0 +ARG QUARTO_VERSION=1.3.340 +ARG SCRIPTS_DIR=/opt/positscripts + +### Install Quarto ### +RUN QUARTO_VERSION=${QUARTO_VERSION} ${SCRIPTS_DIR}/install_quarto.sh \ + && ln -s /opt/quarto/${QUARTO_VERSION}/bin/quarto /usr/local/bin/quarto + +### Install Connect and additional dependencies ### SHELL [ "/bin/bash", "-o", "pipefail", "-c"] RUN apt-get update --fix-missing \ && apt-get install -yq --no-install-recommends \ @@ -27,13 +35,16 @@ RUN apt-get update --fix-missing \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* + +### Configure Connect ### EXPOSE 3939/tcp ENV RSC_LICENSE "" ENV RSC_LICENSE_SERVER "" ENV STARTUP_DEBUG_MODE 0 COPY rstudio-connect.gcfg /etc/rstudio-connect/rstudio-connect.gcfg RUN sed -i "s/{{PYTHON_VERSION}}/${PYTHON_VERSION}/g" /etc/rstudio-connect/rstudio-connect.gcfg \ - && sed -i "s/{{PYTHON_VERSION_ALT}}/${PYTHON_VERSION_ALT}/g" /etc/rstudio-connect/rstudio-connect.gcfg + && sed -i "s/{{PYTHON_VERSION_ALT}}/${PYTHON_VERSION_ALT}/g" /etc/rstudio-connect/rstudio-connect.gcfg \ + && sed -i "s/{{QUARTO_VERSION}}/${QUARTO_VERSION}/g" /etc/rstudio-connect/rstudio-connect.gcfg VOLUME ["/data"] ENTRYPOINT ["tini", "--"] diff --git a/connect/rstudio-connect-float.gcfg b/connect/rstudio-connect-float.gcfg index a3d797c4e..df12fe672 100644 --- a/connect/rstudio-connect-float.gcfg +++ b/connect/rstudio-connect-float.gcfg @@ -34,7 +34,12 @@ Provider = password [Python] Enabled = true -Executable = /opt/python/3.6.5/bin/python +Executable = /opt/python/{{PYTHON_VERSION}}/bin/python +Executable = /opt/python/{{PYTHON_VERSION_ALT}}/bin/python + +[Quarto] +Enabled = true +Executable = /opt/quarto/{{QUARTO_VERSION}}/bin/quarto ;[RPackageRepository "CRAN"] ;URL = https://demo.rstudiopm.com/all/__linux__/jammy/latest diff --git a/connect/rstudio-connect.gcfg b/connect/rstudio-connect.gcfg index 376d08c21..0cf5006d5 100644 --- a/connect/rstudio-connect.gcfg +++ b/connect/rstudio-connect.gcfg @@ -35,7 +35,7 @@ Executable = /opt/python/{{PYTHON_VERSION_ALT}}/bin/python [Quarto] Enabled = true -Executable = /opt/quarto/1.3.340/bin/quarto +Executable = /opt/quarto/{{QUARTO_VERSION}}/bin/quarto [RPackageRepository "CRAN"] URL = https://packagemanager.rstudio.com/cran/__linux__/jammy/latest diff --git a/connect/test/goss.yaml b/connect/test/goss.yaml index 57ffaee8b..88d87b2de 100644 --- a/connect/test/goss.yaml +++ b/connect/test/goss.yaml @@ -44,6 +44,11 @@ file: exists: true /opt/python/{{.Env.PYTHON_VERSION_ALT}}/bin/python: exists: true + /opt/quarto/{{.Env.QUARTO_VERSION}}/bin/quarto: + exists: true + /usr/local/bin/quarto: + exists: true + filetype: symlink /tmp/startup.log: exists: true contents: @@ -87,3 +92,25 @@ command: stdout: [ "{{ .Env.PYTHON_VERSION_ALT }}" ] + +# Ensure correct Quarto version + "/opt/quarto/{{ .Env.QUARTO_VERSION }}/bin/quarto --version": + title: quarto_version_matches + exit-status: 0 + stdout: [ + "{{ .Env.QUARTO_VERSION }}" + ] + "/usr/local/bin/quarto --version": + title: quarto_symlink_version_matches + exit-status: 0 + stdout: [ + "{{ .Env.QUARTO_VERSION }}" + ] + +# Ensure Quarto works + "/opt/quarto/{{ .Env.QUARTO_VERSION }}/bin/quarto check --quiet": + title: quarto_check + exit-status: 0 + "/usr/local/bin/quarto check --quiet": + title: quarto_check + exit-status: 0 diff --git a/content/docker-bake.hcl b/content/docker-bake.hcl deleted file mode 100644 index 3205ca24d..000000000 --- a/content/docker-bake.hcl +++ /dev/null @@ -1,82 +0,0 @@ -variable CONTENT_BUILD_MATRIX { - default = { - builds = [ - {os = "ubuntu1804", os_alt = "bionic", r = "3.1.3", py = "2.7.18", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "3.2.5", py = "2.7.18", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "3.3.3", py = "3.6.13", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "3.4.4", py = "3.6.13", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "3.4.4", py = "3.7.10", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "3.5.3", py = "2.7.18", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "3.5.3", py = "3.7.10", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "3.6.3", py = "2.7.18", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "3.6.3", py = "3.6.13", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "3.6.3", py = "3.8.8", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "4.0.5", py = "3.6.13", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "4.0.5", py = "3.7.10", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "4.0.5", py = "3.8.8", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "4.0.5", py = "3.9.2", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "4.1.0", py = "3.8.8", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "4.1.0", py = "3.9.2", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "4.1.3", py = "3.10.4", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu2204", os_alt = "jammy", r = "3.6.3", py = "3.8.16", drivers = "2024.03.0", quarto = "1.3.340"}, - {os = "ubuntu2204", os_alt = "jammy", r = "4.0.5", py = "3.9.16", drivers = "2024.03.0", quarto = "1.3.340"}, - {os = "ubuntu2204", os_alt = "jammy", r = "4.1.3", py = "3.10.11", drivers = "2024.03.0", quarto = "1.3.340"}, - {os = "ubuntu2204", os_alt = "jammy", r = "4.2.2", py = "3.11.3", drivers = "2024.03.0", quarto = "1.3.340"}, - ] - } -} - -group "default" { - targets = ["base", "pro"] -} - -target "base" { - name = "content-base-r${replace(builds.r, ".", "-")}-py${replace(builds.py, ".", "-")}-${builds.os}" - - tags = [ - "ghcr.io/rstudio/content-base:r${builds.r}-py${builds.py}-${builds.os}", - "ghcr.io/rstudio/content-base:r${builds.r}-py${builds.py}-${builds.os_alt}", - "docker.io/rstudio/content-base:r${builds.r}-py${builds.py}-${builds.os}", - "docker.io.io/rstudio/content-base:r${builds.r}-py${builds.py}-${builds.os_alt}", - ] - output = [ - "type=image", - ] - - dockerfile = "Dockerfile.${builds.os}" - context = "base" - - matrix = CONTENT_BUILD_MATRIX - args = { - R_VERSION = "${builds.r}" - PYTHON_VERSION = "${builds.py}" - QUARTO_VERSION = "${builds.quarto}" - } -} - -target "pro" { - name = "content-pro-r${replace(builds.r, ".", "-")}-py${replace(builds.py, ".", "-")}-${builds.os}" - - tags = [ - "ghcr.io/rstudio/content-pro:r${builds.r}-py${builds.py}-${builds.os}", - "ghcr.io/rstudio/content-pro:r${builds.r}-py${builds.py}-${builds.os_alt}", - "docker.io/rstudio/content-pro:r${builds.r}-py${builds.py}-${builds.os}", - "docker.io.io/rstudio/content-pro:r${builds.r}-py${builds.py}-${builds.os_alt}", - ] - output = [ - "type=image", - ] - - contexts = { - content-base = "target:content-base-r${replace(builds.r, ".", "-")}-py${replace(builds.py, ".", "-")}-${builds.os}" - } - - dockerfile = "Dockerfile.${builds.os}" - context = "pro" - - matrix = CONTENT_BUILD_MATRIX - args = { - R_VERSION = "${builds.r}" - DRIVERS_VERSION = "${builds.drivers}" - } -} diff --git a/docker-bake.hcl b/docker-bake.hcl index 6bd1d6965..ee996e3cb 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -1,6 +1,6 @@ ### Variable definitions ### variable CONNECT_VERSION { - default = "2024.02.0" + default = "2024.03.0" } variable PACKAGE_MANAGER_VERSION { @@ -16,7 +16,7 @@ variable DRIVERS_VERSION { } variable DEFAULT_QUARTO_VERSION { - default = "1.4.553" + default = "1.4.552" } variable DEFAULT_JUPYTERLAB_VERSION { @@ -101,7 +101,7 @@ variable PACKAGE_MANAGER_BUILD_MATRIX { variable CONNECT_BUILD_MATRIX { default = { builds = [ - {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.17", py_alternate = "3.8.17"}, + {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.17", py_alternate = "3.8.17", quarto = "1.3.340"}, ] } } @@ -240,7 +240,6 @@ target "product-base" { PYTHON_VERSION = builds.py_primary PYTHON_VERSION_ALT = builds.py_alternate TINI_VERSION = "0.19.0" - QUARTO_VERSION = "1.3.340" } } @@ -268,8 +267,7 @@ target "product-base-pro" { PYTHON_VERSION_ALT = builds.py_alternate DRIVERS_VERSION = get_drivers_version(builds.os) TINI_VERSION = "0.19.0" - QUARTO_VERSION = "1.3.340" - } + } } ### Package Manager targets ### @@ -317,6 +315,7 @@ target "connect" { PYTHON_VERSION = builds.py_primary PYTHON_VERSION_ALT = builds.py_alternate RSC_VERSION = CONNECT_VERSION + QUARTO_VERSION = builds.quarto } } @@ -472,7 +471,6 @@ target "workbench-for-google-cloud-workstations" { } ### Workbench for Microsoft Azure ML targets ### - target "build-workbench-for-microsoft-azure-ml" { inherits = ["base"] target = "build" diff --git a/docker-bake.preview.hcl b/docker-bake.preview.hcl index 171c02870..606944445 100644 --- a/docker-bake.preview.hcl +++ b/docker-bake.preview.hcl @@ -24,7 +24,7 @@ variable DRIVERS_VERSION { } variable DEFAULT_QUARTO_VERSION { - default = "1.4.553" + default = "1.4.552" } variable DEFAULT_JUPYTERLAB_VERSION { @@ -126,7 +126,7 @@ variable PACKAGE_MANAGER_BUILD_MATRIX { variable CONNECT_BUILD_MATRIX { default = { builds = [ - {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14"}, + {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14", quarto = "1.3.340"}, ] } } @@ -297,6 +297,7 @@ target "connect-daily" { PYTHON_VERSION = builds.py_primary PYTHON_VERSION_ALT = builds.py_alternate RSC_VERSION = CONNECT_DAILY_VERSION + QUARTO_VERSION = builds.quarto } } diff --git a/product/base/Dockerfile.centos7 b/product/base/Dockerfile.centos7 index 5e667f12c..9faf3e6b0 100644 --- a/product/base/Dockerfile.centos7 +++ b/product/base/Dockerfile.centos7 @@ -7,7 +7,6 @@ ARG PYTHON_VERSION=3.9.14 ARG PYTHON_VERSION_ALT=3.8.15 ARG TINI_VERSION=0.19.0 ARG QUARTO_VERSION=1.3.340 - ARG SCRIPTS_DIR=/opt/positscripts COPY --chmod=0755 scripts/rhel/* ${SCRIPTS_DIR}/ @@ -36,10 +35,6 @@ RUN curl -sL "https://yihui.org/tinytex/install-bin-unix.sh" | sh \ && /opt/TinyTeX/bin/*/tlmgr option sys_bin /usr/local/bin \ && /opt/TinyTeX/bin/*/tlmgr path add -### Install Quarto ### -RUN QUARTO_VERSION=${QUARTO_VERSION} ${SCRIPTS_DIR}/install_quarto.sh \ - && ln -s /opt/quarto/${QUARTO_VERSION}/bin/quarto /usr/local/bin/quarto - ### Install R versions ### RUN R_VERSION=${R_VERSION} ${SCRIPTS_DIR}/install_r.sh \ && R_VERSION=${R_VERSION_ALT} ${SCRIPTS_DIR}/install_r.sh \ diff --git a/product/base/Dockerfile.ubuntu2204 b/product/base/Dockerfile.ubuntu2204 index 93c0b1bf6..850245e8a 100644 --- a/product/base/Dockerfile.ubuntu2204 +++ b/product/base/Dockerfile.ubuntu2204 @@ -38,10 +38,6 @@ RUN curl -sL "https://yihui.org/tinytex/install-bin-unix.sh" | sh \ && /opt/TinyTeX/bin/*/tlmgr option sys_bin /usr/local/bin \ && /opt/TinyTeX/bin/*/tlmgr path add -### Install Quarto ### -RUN QUARTO_VERSION=${QUARTO_VERSION} ${SCRIPTS_DIR}/install_quarto.sh \ - && ln -s /opt/quarto/${QUARTO_VERSION}/bin/quarto /usr/local/bin/quarto - ### Install R versions ### RUN R_VERSION=${R_VERSION} ${SCRIPTS_DIR}/install_r.sh \ && R_VERSION=${R_VERSION_ALT} ${SCRIPTS_DIR}/install_r.sh \ diff --git a/product/base/test/goss.yaml b/product/base/test/goss.yaml index e321ebe0a..d15aa828e 100644 --- a/product/base/test/goss.yaml +++ b/product/base/test/goss.yaml @@ -47,8 +47,6 @@ file: exists: true /tini: exists: true - /opt/quarto/{{.Env.QUARTO_VERSION}}/bin/quarto: - exists: true {{if .Env.OS | regexMatch "ubuntu.*"}} # Check that `cracklib-runtime` is present so `chpasswd` works /var/cache/cracklib/cracklib_dict.pwd: @@ -83,11 +81,3 @@ command: stdout: [ "{{ .Env.PYTHON_VERSION_ALT }}" ] - -# Ensure correct Quarto version - "/opt/quarto/{{ .Env.QUARTO_VERSION }}/bin/quarto --version": - title: quarto_version_matches - exit-status: 0 - stdout: [ - "{{ .Env.QUARTO_VERSION }}" - ] diff --git a/product/pro/test/goss.yaml b/product/pro/test/goss.yaml index 8670095d9..e602a7ac7 100644 --- a/product/pro/test/goss.yaml +++ b/product/pro/test/goss.yaml @@ -40,8 +40,6 @@ file: exists: true /tini: exists: true - /opt/quarto/{{.Env.QUARTO_VERSION}}/bin/quarto: - exists: true command: @@ -72,11 +70,3 @@ command: stdout: [ "{{ .Env.PYTHON_VERSION_ALT }}" ] - -# Ensure correct Quarto version - "/opt/quarto/{{ .Env.QUARTO_VERSION }}/bin/quarto --version": - title: quarto_version_matches - exit-status: 0 - stdout: [ - "{{ .Env.QUARTO_VERSION }}" - ] diff --git a/r-session-complete/Dockerfile.centos7 b/r-session-complete/Dockerfile.centos7 index 6bb34d884..5a8e0a7c3 100644 --- a/r-session-complete/Dockerfile.centos7 +++ b/r-session-complete/Dockerfile.centos7 @@ -8,6 +8,7 @@ ARG JUPYTERLAB_VERSION=3.6.7 ARG RSW_VERSION=2023.12.1+402.pro1 ARG RSW_NAME=rstudio-workbench-rhel ARG RSW_DOWNLOAD_URL=https://s3.amazonaws.com/rstudio-ide-build/server/centos7/x86_64 +ARG SCRIPTS_DIR=/opt/positscripts SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN yum install -y subversion \ @@ -27,6 +28,9 @@ RUN yum install -y subversion \ && yum clean all \ && rm -rf /var/lib/rstudio-server/r-versions +### Install Quarto to PATH ### +RUN ln -s /lib/rstudio-server/bin/quarto/bin/quarto /usr/local/bin/quarto + COPY maybe_install_vs_code.sh /tmp/maybe_install_vs_code.sh RUN /tmp/maybe_install_vs_code.sh \ && rm /tmp/maybe_install_vs_code.sh diff --git a/r-session-complete/Dockerfile.ubuntu2204 b/r-session-complete/Dockerfile.ubuntu2204 index 9bef24ac4..be1817c06 100644 --- a/r-session-complete/Dockerfile.ubuntu2204 +++ b/r-session-complete/Dockerfile.ubuntu2204 @@ -9,6 +9,7 @@ ARG JUPYTERLAB_VERSION=3.6.5 ARG RSW_VERSION=2023.12.1+402.pro1 ARG RSW_NAME=rstudio-workbench ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64 +ARG SCRIPTS_DIR=/opt/positscripts ENV WORKBENCH_JUPYTER_PATH=/usr/local/bin/jupyter @@ -36,6 +37,9 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/rstudio-server/r-versions +### Install Quarto to PATH ### +RUN ln -s /lib/rstudio-server/bin/quarto/bin/quarto /usr/local/bin/quarto + COPY maybe_install_vs_code.sh /tmp/maybe_install_vs_code.sh RUN /tmp/maybe_install_vs_code.sh \ && rm /tmp/maybe_install_vs_code.sh diff --git a/r-session-complete/test/goss.yaml b/r-session-complete/test/goss.yaml index 09760e7c0..0cf724485 100644 --- a/r-session-complete/test/goss.yaml +++ b/r-session-complete/test/goss.yaml @@ -14,10 +14,13 @@ file: exists: true {{ end }} /opt/rstudio-drivers: - exists: true - filetype: directory + exists: true + filetype: directory /var/lib/rstudio-server/r-versions: exists: false + /usr/local/bin/quarto: + exists: true + filetype: symlink command: "echo '{ \"cells\": [], \"metadata\": {}, \"nbformat\": 4, \"nbformat_minor\": 2}' | /opt/python/{{.Env.PYTHON_VERSION}}/bin/jupyter nbconvert --to notebook --stdin --stdout": @@ -52,3 +55,8 @@ command: title: jupyter_in_path_var timeout: 60000 exit-status: 0 + +# Ensure Quarto works + "/usr/local/bin/quarto check --quiet": + title: quarto_check + exit-status: 0 diff --git a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 index 91418fee4..ae566260e 100644 --- a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 +++ b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 @@ -8,11 +8,11 @@ ARG PYTHON_VERSION=3.11.7 ARG PYTHON_VERSION_ALT=3.10.13 ARG PYTHON_VERSION_JUPYTER=3.10.13 ARG JUPYTERLAB_VERSION=3.6.7 -ARG QUARTO_VERSION=1.3.450 ARG DRIVERS_VERSION=2023.05.0 ARG RSW_VERSION=2023.12.1+402.pro1 ARG RSW_NAME=rstudio-workbench ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/focal/amd64 +ARG SCRIPTS_DIR=/opt/positscripts ENV STARTUP_DEBUG_MODE 0 ENV RSW_LICENSE "" @@ -83,12 +83,8 @@ ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en ENV LC_ALL en_US.UTF-8 -### Install Quarto ### -RUN curl -o quarto-linux-amd64.deb -L https://github.com/quarto-dev/quarto-cli/releases/download/v${QUARTO_VERSION}/quarto-${QUARTO_VERSION}-linux-amd64.deb \ - && apt-get update \ - && apt-get install -yq ./quarto-linux-amd64.deb \ - && rm -rf /var/lib/apt/lists/* \ - && rm quarto-linux-amd64.deb +### Install Quarto to PATH ### +RUN ln -s /lib/rstudio-server/bin/quarto/bin/quarto /usr/local/bin/quarto ### Install Pro Drivers ### RUN apt-get update \ diff --git a/workbench-for-google-cloud-workstations/test/goss.yaml b/workbench-for-google-cloud-workstations/test/goss.yaml index 412fae9d0..fcb383d71 100644 --- a/workbench-for-google-cloud-workstations/test/goss.yaml +++ b/workbench-for-google-cloud-workstations/test/goss.yaml @@ -22,10 +22,6 @@ package: installed: true python-{{.Env.PYTHON_VERSION_ALT}}: installed: true - quarto: - installed: true - versions: - - {{.Env.QUARTO_VERSION}} rstudio-drivers: installed: true versions: @@ -152,6 +148,9 @@ file: contents: [ "/usr/bin/supervisord -c /etc/supervisor/supervisord.conf" ] + /usr/local/bin/quarto: + exists: true + filetype: symlink command: @@ -231,4 +230,9 @@ command: exec: /opt/R/{{$r_version_alt}}/bin/R --slave -e "library(\"{{.}}\")" timeout: 60000 exit-status: 0 - {{end}} \ No newline at end of file + {{end}} + +# Ensure Quarto works + "/usr/local/bin/quarto check --quiet": + title: quarto_check + exit-status: 0 diff --git a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 index 11f93d3df..384d6466b 100644 --- a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 +++ b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 @@ -10,7 +10,7 @@ ARG JUPYTERLAB_VERSION=3.6.7 ARG RSW_VERSION=2023.12.1+402.pro1 ARG RSW_NAME=rstudio-workbench ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64 -ARG DEBIAN_FRONTEND=noninteractive +ARG SCRIPTS_DIR=/opt/positscripts # Set default env values ENV STARTUP_DEBUG_MODE 0 @@ -59,6 +59,9 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/rstudio-server/r-versions +### Install Quarto to PATH ### +RUN ln -s /lib/rstudio-server/bin/quarto/bin/quarto /usr/local/bin/quarto + COPY --chmod=0755 license-manager-shim /opt/rstudio-license/license-manager COPY --chmod=0775 startup.sh /usr/local/bin/startup.sh COPY startup/* /startup/base/ diff --git a/workbench-for-microsoft-azure-ml/test/goss.yaml b/workbench-for-microsoft-azure-ml/test/goss.yaml index 2c8ba3fea..b94fae546 100644 --- a/workbench-for-microsoft-azure-ml/test/goss.yaml +++ b/workbench-for-microsoft-azure-ml/test/goss.yaml @@ -86,6 +86,9 @@ file: exists: true contains: - "!Error reading /etc/rstudio/rserver.conf:" + /usr/local/bin/quarto: + exists: true + filetype: symlink command: "su rstudio-server -c 'touch /var/lib/rstudio-server/monitor/log/rstudio-server.log'": @@ -143,3 +146,8 @@ command: - {{ $pkg }} {{end}} {{end}} + +# Ensure Quarto works + "/usr/local/bin/quarto check --quiet": + title: quarto_check + exit-status: 0 diff --git a/workbench/Dockerfile.ubuntu2204 b/workbench/Dockerfile.ubuntu2204 index ad8dc96b5..0166a8e38 100644 --- a/workbench/Dockerfile.ubuntu2204 +++ b/workbench/Dockerfile.ubuntu2204 @@ -10,6 +10,7 @@ ARG JUPYTERLAB_VERSION=3.6.7 ARG RSW_VERSION=2023.12.1+402.pro1 ARG RSW_NAME=rstudio-workbench ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64 +ARG SCRIPTS_DIR=/opt/positscripts ENV STARTUP_DEBUG_MODE 0 ENV RSW_LICENSE "" @@ -62,6 +63,9 @@ RUN apt-get update \ && rm -rf /var/lib/rstudio-server/r-versions \ && rm -rf /var/lib/rstudio-launcher/Local/jobs/buildkitsandbox +### Install Quarto to PATH ### +RUN ln -s /lib/rstudio-server/bin/quarto/bin/quarto /usr/local/bin/quarto + COPY maybe_install_vs_code.sh /tmp/maybe_install_vs_code.sh RUN /tmp/maybe_install_vs_code.sh \ && rm /tmp/maybe_install_vs_code.sh diff --git a/workbench/test/goss.yaml b/workbench/test/goss.yaml index a1339ce33..777a04eeb 100644 --- a/workbench/test/goss.yaml +++ b/workbench/test/goss.yaml @@ -94,6 +94,9 @@ file: owner: root group: root mode: "0600" + /usr/local/bin/quarto: + exists: true + filetype: symlink command: "su rstudio-server -c 'touch /var/lib/rstudio-server/monitor/log/rstudio-server.log'": @@ -140,3 +143,8 @@ command: stdout: [ "/usr/bin/openssl" ] + +# Ensure Quarto works + "/usr/local/bin/quarto check --quiet": + title: quarto_check + exit-status: 0 From 20d48634575ac72e1bfc0af29642650d45797f18 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 22 Apr 2024 08:21:50 -0700 Subject: [PATCH 059/165] Fix bake push for Workbench for Microsoft Azure ML --- .github/workflows/build-bake.yaml | 2 +- docker-bake.hcl | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/build-bake.yaml b/.github/workflows/build-bake.yaml index 734fba768..54f3d88b1 100644 --- a/.github/workflows/build-bake.yaml +++ b/.github/workflows/build-bake.yaml @@ -267,7 +267,7 @@ jobs: cancel-in-progress: true env: - target: waml-images + target: workbench-for-microsoft-azure-ml steps: - name: Checkout diff --git a/docker-bake.hcl b/docker-bake.hcl index ee996e3cb..1e0a328e5 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -204,14 +204,6 @@ group "content-images" { ] } -group "waml-images" { - targets = [ - "build-workbench-for-microsoft-azure-ml", - "scan-workbench-for-microsoft-azure-ml", - "workbench-for-microsoft-azure-ml", - ] -} - ### Base Image targets ### target "base" { labels = { From 10f29733865088008ebafc1af7c90e830c8efa6e Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 22 Apr 2024 08:22:32 -0700 Subject: [PATCH 060/165] Fix typo for content tags where ".io" is repeated --- docker-bake.hcl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-bake.hcl b/docker-bake.hcl index ee996e3cb..a1e4fb41b 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -344,7 +344,7 @@ target "content-base" { "ghcr.io/rstudio/content-base:r${builds.r}-py${builds.py}-${builds.os}", "ghcr.io/rstudio/content-base:r${builds.r}-py${builds.py}-${builds.os_alt}", "docker.io/rstudio/content-base:r${builds.r}-py${builds.py}-${builds.os}", - "docker.io.io/rstudio/content-base:r${builds.r}-py${builds.py}-${builds.os_alt}", + "docker.io/rstudio/content-base:r${builds.r}-py${builds.py}-${builds.os_alt}", ] dockerfile = "Dockerfile.${builds.os}" @@ -366,7 +366,7 @@ target "content-pro" { "ghcr.io/rstudio/content-pro:r${builds.r}-py${builds.py}-${builds.os}", "ghcr.io/rstudio/content-pro:r${builds.r}-py${builds.py}-${builds.os_alt}", "docker.io/rstudio/content-pro:r${builds.r}-py${builds.py}-${builds.os}", - "docker.io.io/rstudio/content-pro:r${builds.r}-py${builds.py}-${builds.os_alt}", + "docker.io/rstudio/content-pro:r${builds.r}-py${builds.py}-${builds.os_alt}", ] contexts = { From 8da1bfd3afe119db54b8d2096991f7295a0845ff Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Wed, 24 Apr 2024 08:36:30 -0700 Subject: [PATCH 061/165] Add Package Manager release preview builds (#735) * Add Package Manager release preview builds * Fix group name for PPM preview --- .github/workflows/build-bake-preview.yaml | 49 +++++++++++++++++++++++ Justfile | 1 + docker-bake.preview.hcl | 27 +++++++++++++ tools/get-version.py | 8 ++++ 4 files changed, 85 insertions(+) diff --git a/.github/workflows/build-bake-preview.yaml b/.github/workflows/build-bake-preview.yaml index fce96eff7..b70cce082 100644 --- a/.github/workflows/build-bake-preview.yaml +++ b/.github/workflows/build-bake-preview.yaml @@ -23,6 +23,7 @@ jobs: WORKBENCH_DAILY_VERSION: ${{ steps.get-version.outputs.WORKBENCH_DAILY_VERSION }} WORKBENCH_PREVIEW_VERSION: ${{ steps.get-version.outputs.WORKBENCH_PREVIEW_VERSION }} PACKAGE_MANAGER_DAILY_VERSION: ${{ steps.get-version.outputs.PACKAGE_MANAGER_DAILY_VERSION }} + PACKAGE_MANAGER_PREVIEW_VERSION: ${{ steps.get-version.outputs.PACKAGE_MANAGER_PREVIEW_VERSION }} CONNECT_DAILY_VERSION: ${{ steps.get-version.outputs.CONNECT_DAILY_VERSION }} steps: @@ -51,6 +52,8 @@ jobs: echo "WORKBENCH_PREVIEW_VERSION=$WORKBENCH_PREVIEW_VERSION" >> $GITHUB_OUTPUT PACKAGE_MANAGER_DAILY_VERSION=$(just -f ci.Justfile get-version package-manager --type=daily --local) echo "PACKAGE_MANAGER_DAILY_VERSION=$PACKAGE_MANAGER_DAILY_VERSION" >> $GITHUB_OUTPUT + PACKAGE_MANAGER_PREVIEW_VERSION=$(just -f ci.Justfile get-version package-manager --type=preview --local) + echo "PACKAGE_MANAGER_PREVIEW_VERSION=$PACKAGE_MANAGER_PREVIEW_VERSION" >> $GITHUB_OUTPUT CONNECT_DAILY_VERSION=$(just -f ci.Justfile get-version connect --type=daily --local) echo "CONNECT_DAILY_VERSION=$CONNECT_DAILY_VERSION" >> $GITHUB_OUTPUT @@ -64,6 +67,7 @@ jobs: 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 }} @@ -107,6 +111,7 @@ jobs: 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 }} @@ -144,6 +149,7 @@ jobs: 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 }} @@ -171,6 +177,44 @@ jobs: dockerhub-username: ${{ secrets.DOCKER_HUB_USERNAME }} dockerhub-token: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + package-manager-preview: + needs: [versions] + name: Package Manager - Preview + runs-on: ubuntu-latest-4x + + env: + target: "package-manager-preview" + 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-package-manager-preview-${{ 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 }} + package-manager-daily: needs: [versions] name: Package Manager - Daily @@ -181,6 +225,7 @@ jobs: 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 }} @@ -218,6 +263,7 @@ jobs: 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 }} @@ -255,6 +301,7 @@ jobs: 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 }} @@ -292,6 +339,7 @@ jobs: 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 }} @@ -329,6 +377,7 @@ jobs: 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 }} diff --git a/Justfile b/Justfile index 356f98b13..64122885a 100644 --- a/Justfile +++ b/Justfile @@ -58,6 +58,7 @@ preview-bake target branch="$(git branch --show-current)": WORKBENCH_DAILY_VERSION=$(just -f ci.Justfile get-version workbench --type=daily --local) \ WORKBENCH_PREVIEW_VERSION=$(just -f ci.Justfile get-version workbench --type=preview --local) \ PACKAGE_MANAGER_DAILY_VERSION=$(just -f ci.Justfile get-version package-manager --type=daily --local) \ + PACKAGE_MANAGER_PREVIEW_VERSION=$(just -f ci.Justfile get-version package-manager --type=preview --local) \ CONNECT_DAILY_VERSION=$(just -f ci.Justfile get-version connect --type=daily --local) \ BRANCH="{{branch}}" \ docker buildx bake --builder=posit-builder -f docker-bake.preview.hcl {{target}} diff --git a/docker-bake.preview.hcl b/docker-bake.preview.hcl index 606944445..a2f2a5d24 100644 --- a/docker-bake.preview.hcl +++ b/docker-bake.preview.hcl @@ -7,6 +7,10 @@ variable CONNECT_DAILY_VERSION { default = null } +variable PACKAGE_MANAGER_PREVIEW_VERSION { + default = null +} + variable PACKAGE_MANAGER_DAILY_VERSION { default = null } @@ -253,6 +257,29 @@ target "product-base-pro-dev" { } ### Package Manager targets ### +target "package-manager-preview" { + inherits = ["base"] + target = "build" + + name = "package-manager-preview-${builds.os}-${replace(PACKAGE_MANAGER_PREVIEW_VERSION, ".", "-")}" + tags = get_tags(builds.os, "rstudio-package-manager-preview", PACKAGE_MANAGER_PREVIEW_VERSION, "preview") + + dockerfile = "Dockerfile.${builds.os}" + context = "package-manager" + contexts = { + product-base = "target:product-base-dev-${builds.os}-r${replace(builds.r_primary, ".", "-")}_${replace(builds.r_alternate, ".", "-")}-py${replace(builds.py_primary, ".", "-")}_${replace(builds.py_alternate, ".", "-")}" + } + + matrix = PACKAGE_MANAGER_BUILD_MATRIX + args = { + R_VERSION = builds.r_primary + R_VERSION_ALT = builds.r_alternate + PYTHON_VERSION = builds.py_primary + PYTHON_VERSION_ALT = builds.py_alternate + RSPM_VERSION = PACKAGE_MANAGER_PREVIEW_VERSION + } +} + target "package-manager-daily" { inherits = ["base"] target = "build" diff --git a/tools/get-version.py b/tools/get-version.py index 6264910c3..d3490e5a3 100755 --- a/tools/get-version.py +++ b/tools/get-version.py @@ -163,6 +163,12 @@ def rstudio_connect_daily(): return connect_build_info['packages'][0]['version'] +def rstudio_pm_preview(): + latest_url = "https://cdn.posit.co/package-manager/deb/amd64/rstudio-pm-rc-latest.txt" + raw_version = requests.get(latest_url).content + return raw_version.decode('utf-8').replace('\n','') + + def rstudio_pm_daily(): latest_url = "https://cdn.rstudio.com/package-manager/deb/amd64/rstudio-pm-main-latest.txt" raw_version = requests.get(latest_url).content @@ -269,6 +275,8 @@ def rstudio_pm_daily(): elif selected_product == 'package-manager': if version_type == 'release': version = get_release_version(selected_product, local) + elif version_type == 'preview': + version = rstudio_pm_preview() elif version_type == 'daily': version = rstudio_pm_daily() else: From 346e9a53185397e0ba17e78a0423ceb22ba32044 Mon Sep 17 00:00:00 2001 From: Aron Atkins Date: Wed, 24 Apr 2024 15:38:35 -0400 Subject: [PATCH 062/165] modernize content image versions (#737) Remove Ubuntu 18.04, as it is EOL. Add images with latest patch versions for existing MAJOR.MINOR runtimes. Add images with newly released MAJOR.MINOR versions. --- docker-bake.hcl | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/docker-bake.hcl b/docker-bake.hcl index ee996e3cb..58f0de670 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -116,28 +116,31 @@ variable CONNECT_CONTENT_INIT_BUILD_MATRIX { variable CONTENT_BUILD_MATRIX { default = { + # Add new entries to produce an image using a new patch version of + # R/Python/Quarto. Do not modify existing entries, as that stops those + # version combinations from receiving security updates. builds = [ - {os = "ubuntu1804", os_alt = "bionic", r = "3.1.3", py = "2.7.18", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "3.2.5", py = "2.7.18", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "3.3.3", py = "3.6.13", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "3.4.4", py = "3.6.13", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "3.4.4", py = "3.7.10", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "3.5.3", py = "2.7.18", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "3.5.3", py = "3.7.10", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "3.6.3", py = "2.7.18", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "3.6.3", py = "3.6.13", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "3.6.3", py = "3.8.8", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "4.0.5", py = "3.6.13", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "4.0.5", py = "3.7.10", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "4.0.5", py = "3.8.8", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "4.0.5", py = "3.9.2", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "4.1.0", py = "3.8.8", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "4.1.0", py = "3.9.2", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "4.1.3", py = "3.10.4", drivers = "2024.03.0", quarto = "1.0.37"}, + # R-3.6, Python-3.8, Quarto-1.3. {os = "ubuntu2204", os_alt = "jammy", r = "3.6.3", py = "3.8.16", drivers = "2024.03.0", quarto = "1.3.340"}, + {os = "ubuntu2204", os_alt = "jammy", r = "3.6.3", py = "3.8.19", drivers = "2024.03.0", quarto = "1.3.450"}, + + # R-4.0, Python-3.9, Quarto-1.3. {os = "ubuntu2204", os_alt = "jammy", r = "4.0.5", py = "3.9.16", drivers = "2024.03.0", quarto = "1.3.340"}, + {os = "ubuntu2204", os_alt = "jammy", r = "4.0.5", py = "3.9.19", drivers = "2024.03.0", quarto = "1.3.450"}, + + # R-4.1, Python-3.10, Quarto-1.3. {os = "ubuntu2204", os_alt = "jammy", r = "4.1.3", py = "3.10.11", drivers = "2024.03.0", quarto = "1.3.340"}, + {os = "ubuntu2204", os_alt = "jammy", r = "4.1.3", py = "3.10.14", drivers = "2024.03.0", quarto = "1.3.450"}, + + # R-4.2, Python-3.11, Quarto-1.3. {os = "ubuntu2204", os_alt = "jammy", r = "4.2.2", py = "3.11.3", drivers = "2024.03.0", quarto = "1.3.340"}, + {os = "ubuntu2204", os_alt = "jammy", r = "4.2.3", py = "3.11.9", drivers = "2024.03.0", quarto = "1.3.450"}, + + # R-4.3, Python-3.12, Quarto-1.4. + {os = "ubuntu2204", os_alt = "jammy", r = "4.3.3", py = "3.12.3", drivers = "2024.03.0", quarto = "1.4.553"}, + + # R-4.4, Python-3.12, Quarto-1.4. + {os = "ubuntu2204", os_alt = "jammy", r = "4.4.0", py = "3.12.3", drivers = "2024.03.0", quarto = "1.4.553"}, ] } } @@ -523,4 +526,4 @@ target "workbench-for-microsoft-azure-ml" { } matrix = WORKBENCH_MICROSOFT_AZURE_ML_BUILD_MATRIX -} \ No newline at end of file +} From 2285c1cf785a8cfbc5cb45c9329562648354fb2b Mon Sep 17 00:00:00 2001 From: Craig Date: Mon, 29 Apr 2024 16:05:53 -0600 Subject: [PATCH 063/165] Bump PWB version to 2024.04.0+735.pro3 --- Justfile | 4 ++-- docker-bake.hcl | 2 +- r-session-complete/.env | 2 +- r-session-complete/Dockerfile.centos7 | 2 +- r-session-complete/Dockerfile.ubuntu2204 | 2 +- r-session-complete/README.md | 2 +- tools/get-version.py | 2 +- workbench-for-google-cloud-workstations/.env | 4 ++-- workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 | 2 +- workbench-for-microsoft-azure-ml/.env | 2 +- workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 | 2 +- workbench/.env | 2 +- workbench/Dockerfile.ubuntu2204 | 2 +- workbench/README.md | 2 +- 14 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Justfile b/Justfile index 64122885a..088a936b3 100644 --- a/Justfile +++ b/Justfile @@ -9,7 +9,7 @@ BUILDX_PATH := "" RSC_VERSION := "2024.03.0" RSPM_VERSION := "2023.12.0-13" -RSW_VERSION := "2023.12.1+402.pro1" +RSW_VERSION := "2024.04.0+735.pro3" DRIVERS_VERSION := "2023.05.0" DRIVERS_VERSION_RHEL := DRIVERS_VERSION + "-1" @@ -22,7 +22,7 @@ PYTHON_VERSION_ALT := "3.8.17" PYTHON_VERSION_RHEL := "3.9.14" PYTHON_VERSION_ALT_RHEL := "3.8.15" -QUARTO_VERSION := "1.3.450" +QUARTO_VERSION := "1.4.553" export RSC_LICENSE := "" export RSPM_LICENSE := "" diff --git a/docker-bake.hcl b/docker-bake.hcl index 58f0de670..ce10a620a 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -8,7 +8,7 @@ variable PACKAGE_MANAGER_VERSION { } variable WORKBENCH_VERSION { - default = "2023.12.1+402.pro1" + default = "2024.04.0+735.pro3" } variable DRIVERS_VERSION { diff --git a/r-session-complete/.env b/r-session-complete/.env index fccaa926b..070bbf9b6 100644 --- a/r-session-complete/.env +++ b/r-session-complete/.env @@ -1,4 +1,4 @@ R_VERSION=4.1.0 PYTHON_VERSION=3.9.5 -RSW_VERSION=2023.12.1+402.pro1 +RSW_VERSION=2024.04.0+735.pro3 DRIVERS_VERSION=2024.03.0-1 diff --git a/r-session-complete/Dockerfile.centos7 b/r-session-complete/Dockerfile.centos7 index 5a8e0a7c3..c0c6161e5 100644 --- a/r-session-complete/Dockerfile.centos7 +++ b/r-session-complete/Dockerfile.centos7 @@ -5,7 +5,7 @@ ARG R_VERSION_ALT=4.1.3 ARG PYTHON_VERSION=3.9.14 ARG PYTHON_VERSION_ALT=3.8.15 ARG JUPYTERLAB_VERSION=3.6.7 -ARG RSW_VERSION=2023.12.1+402.pro1 +ARG RSW_VERSION=2024.04.0+735.pro3 ARG RSW_NAME=rstudio-workbench-rhel ARG RSW_DOWNLOAD_URL=https://s3.amazonaws.com/rstudio-ide-build/server/centos7/x86_64 ARG SCRIPTS_DIR=/opt/positscripts diff --git a/r-session-complete/Dockerfile.ubuntu2204 b/r-session-complete/Dockerfile.ubuntu2204 index be1817c06..50a605f0b 100644 --- a/r-session-complete/Dockerfile.ubuntu2204 +++ b/r-session-complete/Dockerfile.ubuntu2204 @@ -6,7 +6,7 @@ ARG R_VERSION_ALT=4.1.3 ARG PYTHON_VERSION=3.9.17 ARG PYTHON_VERSION_ALT=3.8.17 ARG JUPYTERLAB_VERSION=3.6.5 -ARG RSW_VERSION=2023.12.1+402.pro1 +ARG RSW_VERSION=2024.04.0+735.pro3 ARG RSW_NAME=rstudio-workbench ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64 ARG SCRIPTS_DIR=/opt/positscripts diff --git a/r-session-complete/README.md b/r-session-complete/README.md index d30dbacf6..dc50a380e 100644 --- a/r-session-complete/README.md +++ b/r-session-complete/README.md @@ -7,7 +7,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2023.12.1`, `ubuntu2204-2023.12.1`](https://github.com/rstudio/rstudio-docker-products/blob/main/r-session-complete/Dockerfile.ubuntu2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.04.0`, `ubuntu2204-2024.04.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/r-session-complete/Dockerfile.ubuntu2204) # What are the r-session-complete images? diff --git a/tools/get-version.py b/tools/get-version.py index d3490e5a3..8f22eb6ac 100755 --- a/tools/get-version.py +++ b/tools/get-version.py @@ -97,7 +97,7 @@ def clean_product_selection(product: str) -> str: def rstudio_workbench_daily(): - version_json = download_json("https://dailies.rstudio.com/rstudio/chocolate-cosmos/index.json") + version_json = download_json("https://dailies.rstudio.com/rstudio/cranberry-hibiscus/index.json") return version_json['workbench']['platforms']['jammy-amd64']['version'] diff --git a/workbench-for-google-cloud-workstations/.env b/workbench-for-google-cloud-workstations/.env index f87a5c6be..415e38cef 100644 --- a/workbench-for-google-cloud-workstations/.env +++ b/workbench-for-google-cloud-workstations/.env @@ -1,5 +1,5 @@ -RSW_VERSION=2023.12.1+402.pro1 -RSW_TAG_VERSION=2023.12.1-402.pro1 +RSW_VERSION=2024.04.0+735.pro3 +RSW_TAG_VERSION=2024.04.0-735.pro3 RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/focal/amd64 RSW_NAME=rstudio-workbench PYTHON_VERSION=3.10.13 diff --git a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 index ae566260e..6e5444c33 100644 --- a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 +++ b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 @@ -9,7 +9,7 @@ ARG PYTHON_VERSION_ALT=3.10.13 ARG PYTHON_VERSION_JUPYTER=3.10.13 ARG JUPYTERLAB_VERSION=3.6.7 ARG DRIVERS_VERSION=2023.05.0 -ARG RSW_VERSION=2023.12.1+402.pro1 +ARG RSW_VERSION=2024.04.0+735.pro3 ARG RSW_NAME=rstudio-workbench ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/focal/amd64 ARG SCRIPTS_DIR=/opt/positscripts diff --git a/workbench-for-microsoft-azure-ml/.env b/workbench-for-microsoft-azure-ml/.env index a66dd5159..50652b2db 100644 --- a/workbench-for-microsoft-azure-ml/.env +++ b/workbench-for-microsoft-azure-ml/.env @@ -1,4 +1,4 @@ -RSW_VERSION=2023.12.1+402.pro1 +RSW_VERSION=2024.04.0+735.pro3 RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/bionic/amd64 RSW_NAME=rstudio-workbench PYTHON_VERSION=3.9.14 diff --git a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 index 384d6466b..4344b1a72 100644 --- a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 +++ b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 @@ -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=2023.12.1+402.pro1 +ARG RSW_VERSION=2024.04.0+735.pro3 ARG RSW_NAME=rstudio-workbench ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64 ARG SCRIPTS_DIR=/opt/positscripts diff --git a/workbench/.env b/workbench/.env index 075b94b74..d57a8073a 100644 --- a/workbench/.env +++ b/workbench/.env @@ -1,4 +1,4 @@ -RSW_VERSION=2023.12.1+402.pro1 +RSW_VERSION=2024.04.0+735.pro3 RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/bionic/amd64 RSW_NAME=rstudio-workbench PYTHON_VERSION=3.9.17 diff --git a/workbench/Dockerfile.ubuntu2204 b/workbench/Dockerfile.ubuntu2204 index 0166a8e38..76ed09259 100644 --- a/workbench/Dockerfile.ubuntu2204 +++ b/workbench/Dockerfile.ubuntu2204 @@ -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=2023.12.1+402.pro1 +ARG RSW_VERSION=2024.04.0+735.pro3 ARG RSW_NAME=rstudio-workbench ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64 ARG SCRIPTS_DIR=/opt/positscripts diff --git a/workbench/README.md b/workbench/README.md index f5daeabfa..17020f9c8 100644 --- a/workbench/README.md +++ b/workbench/README.md @@ -7,7 +7,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2023.12.1`, `ubuntu2204-2023.12.1`](https://github.com/rstudio/rstudio-docker-products/blob/main/workbench/Dockerfile.ubuntu2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.04.0`, `ubuntu2204-2024.04.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/workbench/Dockerfile.ubuntu2204) # What is RStudio Workbench? From 2372257a5dc5f5852bcffa286632a10722308c2e Mon Sep 17 00:00:00 2001 From: Tyler Finethy Date: Tue, 30 Apr 2024 10:52:32 -0400 Subject: [PATCH 064/165] Build and bake previews every hour With manual builds running into issues, we'd like more frequent checks of our latest dev/RC builds to avoid delays. --- .github/workflows/build-bake-preview.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-bake-preview.yaml b/.github/workflows/build-bake-preview.yaml index b70cce082..aedddb101 100644 --- a/.github/workflows/build-bake-preview.yaml +++ b/.github/workflows/build-bake-preview.yaml @@ -1,7 +1,6 @@ on: schedule: - - cron: '0 8 * * *' - - cron: '0 9 * * *' + - cron: '0 * * * *' push: branches: - main From dee50364dace1b78a05d7485d097adb5934777c5 Mon Sep 17 00:00:00 2001 From: Craig Date: Tue, 30 Apr 2024 10:33:18 -0600 Subject: [PATCH 065/165] Bump missed older pwb version --- workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 index 4344b1a72..baa8dbe52 100644 --- a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 +++ b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 @@ -178,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='2023.06.2+561.pro5' \ + org.opencontainers.image.version='2024.04.0+735.pro3' \ org.opencontainers.image.url='https://www.rstudio.com/products/workbench/' From f56518ee11401c1db21a9da4b9af4bf8b9389c33 Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Tue, 30 Apr 2024 13:01:41 -0700 Subject: [PATCH 066/165] Update Posit Connect version to 2024.04.0 * Update the Justfile task for `update-rsc-versions` to remove connect/Justfile and connect-content-init/Justfile * Also, no need to change the docker-compose.yml since it uses the RSC_VERSION var directly --- Justfile | 6 +----- connect-content-init/Dockerfile.ubuntu2204 | 2 +- connect-content-init/README.md | 6 +++--- connect/.env | 2 +- connect/Dockerfile.ubuntu2204 | 2 +- connect/README.md | 2 +- docker-bake.hcl | 2 +- 7 files changed, 9 insertions(+), 13 deletions(-) diff --git a/Justfile b/Justfile index 088a936b3..9f7c75e6f 100644 --- a/Justfile +++ b/Justfile @@ -7,7 +7,7 @@ sed_vars := if os() == "macos" { "-i ''" } else { "-i" } BUILDX_PATH := "" -RSC_VERSION := "2024.03.0" +RSC_VERSION := "2024.04.0" RSPM_VERSION := "2023.12.0-13" RSW_VERSION := "2024.04.0+735.pro3" @@ -266,11 +266,7 @@ update-rsc-versions: connect/.env \ connect/Dockerfile.ubuntu2204 \ connect-content-init/Dockerfile.ubuntu2204 - sed {{ sed_vars }} "s/RSC_VERSION:.*/RSC_VERSION: {{ RSC_VERSION }}/g" docker-compose.yml - sed {{ sed_vars }} "s/rstudio\/rstudio-connect:.*/rstudio\/rstudio-connect:{{ RSC_VERSION }}/g" docker-compose.yml sed {{ sed_vars }} "s/^RSC_VERSION := .*/RSC_VERSION := \"{{ RSC_VERSION }}\"/g" \ - connect/Justfile \ - connect-content-init/Justfile \ Justfile sed {{ sed_vars }} -E "s/[0-9]{4}\.[0-9]{1,2}\.[0-9]{1,2}/`just _get-clean-version {{ RSC_VERSION }}`/g" \ connect/README.md \ diff --git a/connect-content-init/Dockerfile.ubuntu2204 b/connect-content-init/Dockerfile.ubuntu2204 index 55495a05c..b121ed1de 100644 --- a/connect-content-init/Dockerfile.ubuntu2204 +++ b/connect-content-init/Dockerfile.ubuntu2204 @@ -9,7 +9,7 @@ RUN apt-get update && \ apt-get install -y --no-install-recommends ca-certificates curl && \ rm -rf /var/lib/apt/lists/* -ARG RSC_VERSION=2024.03.0 +ARG RSC_VERSION=2024.04.0 SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN mkdir -p /rsc-staging && \ RSC_VERSION_URL=$(echo -n "${RSC_VERSION}" | sed 's/+/%2B/g') && \ diff --git a/connect-content-init/README.md b/connect-content-init/README.md index 9173b3eab..8e02f0beb 100644 --- a/connect-content-init/README.md +++ b/connect-content-init/README.md @@ -9,7 +9,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2024.03.0`, `ubuntu2204-2024.03.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.04.0`, `ubuntu2204-2024.04.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) # RStudio Connect Content Init Container @@ -31,7 +31,7 @@ The version of the release package to use can be overridden with the `RSC_VERSION` build arg. ```console -just build ubuntu2204 2024.03.0 +just build ubuntu2204 2024.04.0 ``` ## Testing @@ -56,7 +56,7 @@ just test You can see the different layers that make up the image: ```console -docker history rstudio/rstudio-connect-content-init-preview:2024.03.0-dev-326 +docker history rstudio/rstudio-connect-content-init-preview:2024.04.0-dev-326 ``` NOTE: almost all the image size is pandoc. diff --git a/connect/.env b/connect/.env index 3e53ac365..fffe465c5 100644 --- a/connect/.env +++ b/connect/.env @@ -1,4 +1,4 @@ -RSC_VERSION=2024.03.0 +RSC_VERSION=2024.04.0 R_VERSION=4.2.3 R_VERSION_ALT=4.1.3 PYTHON_VERSION=3.9.17 diff --git a/connect/Dockerfile.ubuntu2204 b/connect/Dockerfile.ubuntu2204 index 0aff7034b..21263b828 100644 --- a/connect/Dockerfile.ubuntu2204 +++ b/connect/Dockerfile.ubuntu2204 @@ -7,7 +7,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 RSC_VERSION=2024.03.0 +ARG RSC_VERSION=2024.04.0 ARG QUARTO_VERSION=1.3.340 ARG SCRIPTS_DIR=/opt/positscripts diff --git a/connect/README.md b/connect/README.md index ea42414d3..4eaaa7287 100644 --- a/connect/README.md +++ b/connect/README.md @@ -7,7 +7,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2024.03.0`, `ubuntu2204-2024.03.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.04.0`, `ubuntu2204-2024.04.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) # What is Posit Connect? diff --git a/docker-bake.hcl b/docker-bake.hcl index 66d651745..3eceaeb00 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -1,6 +1,6 @@ ### Variable definitions ### variable CONNECT_VERSION { - default = "2024.03.0" + default = "2024.04.0" } variable PACKAGE_MANAGER_VERSION { From c0e49a85ec6356539415445a91b3c1b4332a49e4 Mon Sep 17 00:00:00 2001 From: David Kegley Date: Tue, 30 Apr 2024 16:48:02 -0400 Subject: [PATCH 067/165] Upgrade Connect default quarto installation to v1.4.552 --- connect/Dockerfile.ubuntu2204 | 2 +- connect/NEWS.md | 4 ++++ docker-bake.hcl | 16 ++++++++-------- docker-bake.preview.hcl | 2 +- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/connect/Dockerfile.ubuntu2204 b/connect/Dockerfile.ubuntu2204 index 21263b828..1e23d58e4 100644 --- a/connect/Dockerfile.ubuntu2204 +++ b/connect/Dockerfile.ubuntu2204 @@ -8,7 +8,7 @@ ARG R_VERSION_ALT=4.1.3 ARG PYTHON_VERSION=3.9.17 ARG PYTHON_VERSION_ALT=3.8.17 ARG RSC_VERSION=2024.04.0 -ARG QUARTO_VERSION=1.3.340 +ARG QUARTO_VERSION=1.4.552 ARG SCRIPTS_DIR=/opt/positscripts ### Install Quarto ### diff --git a/connect/NEWS.md b/connect/NEWS.md index fcbf737bd..136c66cea 100644 --- a/connect/NEWS.md +++ b/connect/NEWS.md @@ -1,3 +1,7 @@ +# 2024-04-30 + +- BREAKING: Upgrade the default Quarto version to 1.4.552. + # 2023-08-01 - BREAKING: Removed R 3.6.2, replaced with R 4.1.3. - Updated R 4.2.0 to 4.2.3. diff --git a/docker-bake.hcl b/docker-bake.hcl index 3eceaeb00..e7452f32b 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -101,7 +101,7 @@ variable PACKAGE_MANAGER_BUILD_MATRIX { variable CONNECT_BUILD_MATRIX { default = { builds = [ - {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.17", py_alternate = "3.8.17", quarto = "1.3.340"}, + {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.17", py_alternate = "3.8.17", quarto = "DEFAULT_QUARTO_VERSION"}, ] } } @@ -231,9 +231,9 @@ target "product-base" { "ghcr.io/rstudio/product-base:${builds.os}-r${builds.r_primary}_${builds.r_alternate}-py${builds.py_primary}_${builds.py_alternate}", "docker.io/rstudio/product-base:${builds.os}-r${builds.r_primary}_${builds.r_alternate}-py${builds.py_primary}_${builds.py_alternate}", ] - + dockerfile = "Dockerfile.${builds.os}" - context = "product/base" + context = "product/base" matrix = BASE_BUILD_MATRIX args = { @@ -242,7 +242,7 @@ target "product-base" { PYTHON_VERSION = builds.py_primary PYTHON_VERSION_ALT = builds.py_alternate TINI_VERSION = "0.19.0" - } + } } target "product-base-pro" { @@ -255,7 +255,7 @@ target "product-base-pro" { "docker.io/rstudio/product-base-pro:${builds.os}-r${builds.r_primary}_${builds.r_alternate}-py${builds.py_primary}_${builds.py_alternate}", ] - dockerfile = "Dockerfile.${builds.os}" + dockerfile = "Dockerfile.${builds.os}" context = "product/pro" contexts = { product-base = "target:product-base-${builds.os}-r${replace(builds.r_primary, ".", "-")}_${replace(builds.r_alternate, ".", "-")}-py${replace(builds.py_primary, ".", "-")}_${replace(builds.py_alternate, ".", "-")}" @@ -434,7 +434,7 @@ target "workbench" { RSW_VERSION = WORKBENCH_VERSION RSW_NAME = "rstudio-workbench" RSW_DOWNLOAD_URL = "https://download2.rstudio.org/server/jammy/amd64" - } + } } ### Workbench for Google Cloud Workstations targets ### @@ -469,7 +469,7 @@ target "workbench-for-google-cloud-workstations" { RSW_VERSION = WORKBENCH_VERSION RSW_NAME = "rstudio-workbench" RSW_DOWNLOAD_URL = "https://download2.rstudio.org/server/focal/amd64" - } + } } ### Workbench for Microsoft Azure ML targets ### @@ -496,7 +496,7 @@ target "build-workbench-for-microsoft-azure-ml" { RSW_VERSION = WORKBENCH_VERSION RSW_NAME = "rstudio-workbench" RSW_DOWNLOAD_URL = "https://download2.rstudio.org/server/jammy/amd64" - } + } } target "scan-workbench-for-microsoft-azure-ml" { diff --git a/docker-bake.preview.hcl b/docker-bake.preview.hcl index 99ffef64c..c3f430d63 100644 --- a/docker-bake.preview.hcl +++ b/docker-bake.preview.hcl @@ -130,7 +130,7 @@ variable PACKAGE_MANAGER_BUILD_MATRIX { variable CONNECT_BUILD_MATRIX { default = { builds = [ - {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14", quarto = "1.3.340"}, + {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14", quarto = "DEFAULT_QUARTO_VERSION"}, ] } } From ba8e263c196905320e2ab31d20ced2234a9557c7 Mon Sep 17 00:00:00 2001 From: David Kegley Date: Tue, 30 Apr 2024 17:00:37 -0400 Subject: [PATCH 068/165] Fix variable quoting in docker bake --- docker-bake.hcl | 2 +- docker-bake.preview.hcl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-bake.hcl b/docker-bake.hcl index e7452f32b..4d83b81f5 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -101,7 +101,7 @@ variable PACKAGE_MANAGER_BUILD_MATRIX { variable CONNECT_BUILD_MATRIX { default = { builds = [ - {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.17", py_alternate = "3.8.17", quarto = "DEFAULT_QUARTO_VERSION"}, + {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.17", py_alternate = "3.8.17", quarto = DEFAULT_QUARTO_VERSION}, ] } } diff --git a/docker-bake.preview.hcl b/docker-bake.preview.hcl index c3f430d63..5fa2a5c38 100644 --- a/docker-bake.preview.hcl +++ b/docker-bake.preview.hcl @@ -130,7 +130,7 @@ variable PACKAGE_MANAGER_BUILD_MATRIX { variable CONNECT_BUILD_MATRIX { default = { builds = [ - {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14", quarto = "DEFAULT_QUARTO_VERSION"}, + {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14", quarto = DEFAULT_QUARTO_VERSION}, ] } } From 02cc3c504c99f696950b4e3741627b443eb05b39 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Thu, 25 Apr 2024 08:54:51 -0700 Subject: [PATCH 069/165] Clear caches for R and Python after package installation --- product/base/scripts/ubuntu/install_python.sh | 3 +++ product/base/scripts/ubuntu/install_r.sh | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/product/base/scripts/ubuntu/install_python.sh b/product/base/scripts/ubuntu/install_python.sh index cb84e4e0e..105660240 100755 --- a/product/base/scripts/ubuntu/install_python.sh +++ b/product/base/scripts/ubuntu/install_python.sh @@ -108,6 +108,9 @@ install_python_packages() { echo "$d$d Installing python-${PYTHON_VERSION} packages from ${PYTHON_PKG_FILE} $d$d" $PYTHON_BIN -m pip install -U pip $PYTHON_BIN -m pip install -r "$PYTHON_PKG_FILE" + + echo "$d$d Cleaning up pip cache $d$d" + $PYTHON_BIN -m pip cache purge } install_python diff --git a/product/base/scripts/ubuntu/install_r.sh b/product/base/scripts/ubuntu/install_r.sh index 67914952a..401eac657 100755 --- a/product/base/scripts/ubuntu/install_r.sh +++ b/product/base/scripts/ubuntu/install_r.sh @@ -163,7 +163,7 @@ install_r_packages() { local cran_repo="https://packagemanager.rstudio.com/cran/__linux__/${UBUNTU_CODENAME}/latest" $R_BIN --vanilla --no-echo < /dev/null -install.packages(readLines("$R_PKG_FILE"), repos = "$cran_repo") +install.packages(readLines("$R_PKG_FILE"), repos = "$cran_repo", clean = TRUE) EOF } From d6403e5092621a44b12f20175ba07ec3738d6ee6 Mon Sep 17 00:00:00 2001 From: nodivbyzero Date: Fri, 3 May 2024 07:14:25 -0700 Subject: [PATCH 070/165] update version to 2024.04.0-18 --- Justfile | 2 +- docker-bake.hcl | 2 +- package-manager/.env | 2 +- package-manager/Dockerfile.ubuntu2204 | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Justfile b/Justfile index 9f7c75e6f..2face1ff0 100644 --- a/Justfile +++ b/Justfile @@ -8,7 +8,7 @@ sed_vars := if os() == "macos" { "-i ''" } else { "-i" } BUILDX_PATH := "" RSC_VERSION := "2024.04.0" -RSPM_VERSION := "2023.12.0-13" +RSPM_VERSION := "2024.04.0-18" RSW_VERSION := "2024.04.0+735.pro3" DRIVERS_VERSION := "2023.05.0" diff --git a/docker-bake.hcl b/docker-bake.hcl index 4d83b81f5..d89f6a7a6 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -4,7 +4,7 @@ variable CONNECT_VERSION { } variable PACKAGE_MANAGER_VERSION { - default = "2023.12.0-13" + default = "2024.04.0-18" } variable WORKBENCH_VERSION { diff --git a/package-manager/.env b/package-manager/.env index c868272ff..646759d69 100644 --- a/package-manager/.env +++ b/package-manager/.env @@ -1,4 +1,4 @@ -RSPM_VERSION=2023.12.0-13 +RSPM_VERSION=2024.04.0-18 R_VERSION=4.2.3 R_VERSION_ALT=4.1.3 PYTHON_VERSION=3.9.17 diff --git a/package-manager/Dockerfile.ubuntu2204 b/package-manager/Dockerfile.ubuntu2204 index 2a2c26902..bba9187c4 100644 --- a/package-manager/Dockerfile.ubuntu2204 +++ b/package-manager/Dockerfile.ubuntu2204 @@ -13,7 +13,7 @@ RUN /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install --no-cache-dir buil RUN /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install --no-cache-dir build virtualenv # Download RStudio Package Manager ---------------------------------------------# -ARG RSPM_VERSION=2023.12.0-13 +ARG RSPM_VERSION=2024.04.0-18 ARG RSPM_DOWNLOAD_URL=https://cdn.rstudio.com/package-manager/deb/amd64 RUN curl -O ${RSPM_DOWNLOAD_URL}/rstudio-pm_${RSPM_VERSION}_amd64.deb \ # Pre 7/25/23 packages From 540fdadaa5c57cfba085b689d224883897479f31 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 6 May 2024 07:32:40 -0600 Subject: [PATCH 071/165] Readd clean version and git shas to tags --- .github/workflows/build-bake.yaml | 38 +++++++++++++++++++++++++++++++ Justfile | 10 ++++---- docker-bake.hcl | 20 +++++++++++++++- 3 files changed, 63 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-bake.yaml b/.github/workflows/build-bake.yaml index 734fba768..bb4d507f1 100644 --- a/.github/workflows/build-bake.yaml +++ b/.github/workflows/build-bake.yaml @@ -9,8 +9,29 @@ on: name: Release - Build, Test, and Push jobs: + setup: + name: Setup + runs-on: ubuntu-latest + + concurrency: + group: bake-setup-${{ github.ref }} + cancel-in-progress: true + + outputs: + GIT_SHA: ${{ steps.checkout.outputs.sha }} + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Get commit SHA + id: get-git-sha + run: | + GIT_SHA=$(git rev-parse --short HEAD) + echo "GIT_SHA=$GIT_SHA" >> $GITHUB_OUTPUT base: + needs: [setup] name: Base Images runs-on: ubuntu-latest-8x @@ -20,6 +41,7 @@ jobs: env: target: base-images + GIT_SHA: ${{ needs.setup.outputs.GIT_SHA }} steps: - name: Checkout @@ -42,6 +64,7 @@ jobs: gcp-json: '${{ secrets.GCP_ARTIFACT_REGISTRY_JSON }}' connect: + needs: [setup] name: Connect runs-on: ubuntu-latest-4x @@ -51,6 +74,7 @@ jobs: env: target: connect + GIT_SHA: ${{ needs.setup.outputs.GIT_SHA }} steps: - name: Checkout @@ -73,6 +97,7 @@ jobs: gcp-json: '${{ secrets.GCP_ARTIFACT_REGISTRY_JSON }}' connect-content-init: + needs: [setup] name: Connect Content Init runs-on: ubuntu-latest-4x @@ -82,6 +107,7 @@ jobs: env: target: connect-content-init + GIT_SHA: ${{ needs.setup.outputs.GIT_SHA }} steps: - name: Checkout @@ -104,6 +130,7 @@ jobs: gcp-json: '${{ secrets.GCP_ARTIFACT_REGISTRY_JSON }}' content: + needs: [setup] name: Content Images runs-on: ubuntu-latest-8x @@ -113,6 +140,7 @@ jobs: env: target: content-images + GIT_SHA: ${{ needs.setup.outputs.GIT_SHA }} steps: - name: Checkout @@ -135,6 +163,7 @@ jobs: gcp-json: '${{ secrets.GCP_ARTIFACT_REGISTRY_JSON }}' package-manager: + needs: [setup] name: Package Manager runs-on: ubuntu-latest-4x @@ -144,6 +173,7 @@ jobs: env: target: package-manager + GIT_SHA: ${{ needs.setup.outputs.GIT_SHA }} steps: - name: Checkout @@ -166,6 +196,7 @@ jobs: gcp-json: '${{ secrets.GCP_ARTIFACT_REGISTRY_JSON }}' r-session-complete: + needs: [setup] name: R Session Complete runs-on: ubuntu-latest-8x @@ -175,6 +206,7 @@ jobs: env: target: r-session-complete + GIT_SHA: ${{ needs.setup.outputs.GIT_SHA }} steps: - name: Checkout @@ -197,6 +229,7 @@ jobs: gcp-json: '${{ secrets.GCP_ARTIFACT_REGISTRY_JSON }}' workbench: + needs: [setup] name: Workbench runs-on: ubuntu-latest-4x @@ -206,6 +239,7 @@ jobs: env: target: workbench + GIT_SHA: ${{ needs.setup.outputs.GIT_SHA }} steps: - name: Checkout @@ -228,6 +262,7 @@ jobs: gcp-json: '${{ secrets.GCP_ARTIFACT_REGISTRY_JSON }}' workbench-for-google-cloud-workstations: + needs: [setup] name: Workbench for Google Cloud Workstations runs-on: ubuntu-latest-8x @@ -237,6 +272,7 @@ jobs: env: target: workbench-for-google-cloud-workstations + GIT_SHA: ${{ needs.setup.outputs.GIT_SHA }} steps: - name: Checkout @@ -259,6 +295,7 @@ jobs: gcp-json: '${{ secrets.GCP_ARTIFACT_REGISTRY_JSON }}' workbench-for-microsoft-azure-ml: + needs: [setup] name: Workbench for Microsoft Azure ML runs-on: ubuntu-latest-8x @@ -268,6 +305,7 @@ jobs: env: target: waml-images + GIT_SHA: ${{ needs.setup.outputs.GIT_SHA }} steps: - name: Checkout diff --git a/Justfile b/Justfile index 356f98b13..53ebd8f30 100644 --- a/Justfile +++ b/Justfile @@ -48,7 +48,8 @@ alias build := bake # just bake workbench-images bake target="default": just -f {{justfile()}} create-builder || true - docker buildx bake --builder=posit-builder -f docker-bake.hcl {{target}} + GIT_SHA=$(git rev-parse --short HEAD) \ + docker buildx bake --builder=posit-builder -f docker-bake.hcl {{target}} # just preview-bake workbench-images dev preview-build: @@ -60,7 +61,7 @@ preview-bake target branch="$(git branch --show-current)": PACKAGE_MANAGER_DAILY_VERSION=$(just -f ci.Justfile get-version package-manager --type=daily --local) \ CONNECT_DAILY_VERSION=$(just -f ci.Justfile get-version connect --type=daily --local) \ BRANCH="{{branch}}" \ - docker buildx bake --builder=posit-builder -f docker-bake.preview.hcl {{target}} + docker buildx bake --builder=posit-builder -f docker-bake.preview.hcl {{target}} content-bake: just -f {{justfile()}} create-builder || true @@ -69,7 +70,8 @@ content-bake: # just plan plan: - docker buildx bake -f docker-bake.hcl --print + GIT_SHA=$(git rev-parse --short HEAD) \ + docker buildx bake -f docker-bake.hcl --print # just preview-plan preview-plan branch="$(git branch --show-current)": @@ -78,7 +80,7 @@ preview-plan branch="$(git branch --show-current)": PACKAGE_MANAGER_DAILY_VERSION=$(just -f ci.Justfile get-version package-manager --type=daily --local) \ CONNECT_DAILY_VERSION=$(just -f ci.Justfile get-version connect --type=daily --local) \ BRANCH="{{branch}}" \ - docker buildx bake -f docker-bake.preview.hcl --print + docker buildx bake -f docker-bake.preview.hcl --print # Run tests diff --git a/docker-bake.hcl b/docker-bake.hcl index ee996e3cb..96ae26c5b 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -23,6 +23,10 @@ variable DEFAULT_JUPYTERLAB_VERSION { default = "3.6.7" } +variable GIT_SHA { + default = "" +} + function tag_safe_version { params = [version] result = replace(version, "+", "-") @@ -45,25 +49,39 @@ function get_os_alt_name { function get_centos_tags { params = [os, product, product_version] + # Bake automatically collapses any duplicate tags where clean versions and tag safe versions may be the same. result = [ "ghcr.io/rstudio/${product}:${os}-${tag_safe_version(product_version)}", + "ghcr.io/rstudio/${product}:${os}-${clean_version(product_version)}", + "ghcr.io/rstudio/${product}:${os}-${clean_version(product_version)}--${GIT_SHA}", "ghcr.io/rstudio/${product}:${os}", "docker.io/rstudio/${product}:${os}-${tag_safe_version(product_version)}", + "docker.io/rstudio/${product}:${os}-${clean_version(product_version)}", + "docker.io/rstudio/${product}:${os}-${clean_version(product_version)}--${GIT_SHA}", "docker.io/rstudio/${product}:${os}", ] } function get_ubuntu_tags { params = [os, product, product_version] + # Bake automatically collapses any duplicate tags where clean versions and tag safe versions may be the same. result = [ "ghcr.io/rstudio/${product}:${os}-${tag_safe_version(product_version)}", + "ghcr.io/rstudio/${product}:${os}-${clean_version(product_version)}", + "ghcr.io/rstudio/${product}:${os}-${clean_version(product_version)}--${GIT_SHA}", "ghcr.io/rstudio/${product}:${get_os_alt_name(os)}-${tag_safe_version(product_version)}", + "ghcr.io/rstudio/${product}:${get_os_alt_name(os)}-${clean_version(product_version)}", + "ghcr.io/rstudio/${product}:${get_os_alt_name(os)}-${clean_version(product_version)}--${GIT_SHA}", "ghcr.io/rstudio/${product}:${os}", "ghcr.io/rstudio/${product}:${get_os_alt_name(os)}", "docker.io/rstudio/${product}:${get_os_alt_name(os)}-${tag_safe_version(product_version)}", + "docker.io/rstudio/${product}:${get_os_alt_name(os)}-${clean_version(product_version)}", + "docker.io/rstudio/${product}:${get_os_alt_name(os)}-${clean_version(product_version)}--${GIT_SHA}", "docker.io/rstudio/${product}:${os}-${tag_safe_version(product_version)}", - "docker.io/rstudio/${product}:${get_os_alt_name(os)}", + "docker.io/rstudio/${product}:${os}-${clean_version(product_version)}", + "docker.io/rstudio/${product}:${os}-${clean_version(product_version)}--${GIT_SHA}", "docker.io/rstudio/${product}:${os}", + "docker.io/rstudio/${product}:${get_os_alt_name(os)}", ] } From b6fdea2466f01de88029521e0b7a1e9792066f3e Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 6 May 2024 08:21:02 -0600 Subject: [PATCH 072/165] Make branch names tag safe for previews --- docker-bake.preview.hcl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docker-bake.preview.hcl b/docker-bake.preview.hcl index 5fa2a5c38..a229e1e41 100644 --- a/docker-bake.preview.hcl +++ b/docker-bake.preview.hcl @@ -44,6 +44,11 @@ function get_rsw_download_url { result = os == "centos7" ? "${RSW_PREVIEW_URL_BASE}centos7/x86_64" : "${RSW_PREVIEW_URL_BASE}jammy/amd64" } +function tag_safe_branch { + params = [] + result = replace(BRANCH, "/", "-") +} + function tag_safe_version { params = [version] result = replace(version, "+", "-") @@ -56,7 +61,7 @@ function clean_version { function get_tag_prefix { params = [] - result = BRANCH != "main" ? "${BRANCH}-" : "" + result = BRANCH != "main" ? "${tag_safe_branch()}-" : "" } function get_drivers_version { From 79ae91acd27f5d55e6bd9d3266867d4c4152dc1e Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 6 May 2024 10:02:41 -0600 Subject: [PATCH 073/165] Update manual workflow to be compatible with bake changes --- .github/workflows/build-manual.yaml | 122 ++++++++++------------------ 1 file changed, 41 insertions(+), 81 deletions(-) diff --git a/.github/workflows/build-manual.yaml b/.github/workflows/build-manual.yaml index 89cd44296..9e2543142 100644 --- a/.github/workflows/build-manual.yaml +++ b/.github/workflows/build-manual.yaml @@ -14,25 +14,15 @@ on: required: true type: choice options: + - base-images - connect - connect-content-init - - content/base - - content/pro + - content-images - package-manager - - product/base - - product/pro - r-session-complete - workbench + - workbench-for-google-cloud-workstations - workbench-for-microsoft-azure-ml - os: - description: "Which OS to build. WARNING: Not all OSes may be present for all products." - required: false - default: "ubuntu2204" - type: choice - options: - - ubuntu2204 - - ubuntu1804 - - centos7 type: description: "The type of image being built." required: false @@ -42,11 +32,6 @@ on: - preview - daily - release - use_s3_download_url: - description: "Force build to download binaries directly from S3 where applicable." - required: false - default: false - type: boolean version: description: "The version to build. Use 'auto' to target the latest build." required: false @@ -58,19 +43,43 @@ on: default: false type: boolean -name: Manual - Build, Test, Scan, and Push +name: Manual - Build, Test, and Push jobs: - build: + setup: + name: Setup runs-on: ubuntu-latest + + concurrency: + group: bake-setup-${{ github.ref }} + cancel-in-progress: true + + outputs: + GIT_SHA: ${{ steps.checkout.outputs.sha }} + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Get commit SHA + id: get-git-sha + run: | + GIT_SHA=$(git rev-parse --short HEAD) + echo "GIT_SHA=$GIT_SHA" >> $GITHUB_OUTPUT + + build: + runs-on: ubuntu-latest-4x name: manual-build permissions: contents: read packages: write + env: + GIT_SHA: ${{ needs.setup.outputs.GIT_SHA }} + steps: - name: Check Out Repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ inputs.branch }} @@ -79,6 +88,16 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + id: setup-buildx + with: + buildkitd-config: ./share/buildkitd.toml + - name: Get Version id: get-version run: | @@ -89,70 +108,11 @@ jobs: fi 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) - ARGS_CMD="" - USE_S3_DOWNLOAD_URL="" - VERSION_OVERRIDES="" - if [[ "${{inputs.os}}" == "centos7" ]]; then - # FIXME(ianpittwood): This is probably a silly way of doing this. We don't have CentOS builds for later - # Python versions so we need to override them. This is done via matrix in the release CI - # but we don't have that here. We're also limited by the 10 input cap so these can't be - # passed by the user alongside R versions as I would've liked to do. - VERSION_OVERRIDES="PYTHON_VERSION=3.9.14 PYTHON_VERSION_ALT=3.8.15" - fi - if [[ "${{ inputs.type }}" == "release" ]]; then - ARGS_CMD="get-product-args" - if [[ "${{ inputs.use_s3_download_url }}" == "true" ]]; then - USE_S3_DOWNLOAD_URL="${{ inputs.use_s3_download_url }}" - fi - else - ARGS_CMD="get-prerelease-args ${{inputs.type}}" - fi - BUILD_ARGS=$( \ - just -f ci.Justfile \ - ${VERSION_OVERRIDES} \ - ${ARGS_CMD} \ - ${{ inputs.product }} \ - ${{ inputs.os }} \ - ${{ steps.get-version.outputs.VERSION }} \ - ${USE_S3_DOWNLOAD_URL} \ - ) - echo "BUILD_ARGS<<$EOF" >> $GITHUB_OUTPUT - echo "$BUILD_ARGS" >> $GITHUB_OUTPUT - echo "$EOF" >> $GITHUB_OUTPUT - - - name: Get tags - id: get-tags - run: | - ARGS_CMD="" - if [[ "${{ inputs.type }}" == "release" ]]; then - ARGS_CMD="get-product-tags" - else - ARGS_CMD="get-prerelease-tags ${{inputs.type}}" - fi - IMAGE_TAGS=$( \ - just -f ci.Justfile \ - ${ARGS_CMD} \ - ${{ inputs.product }} \ - ${{ inputs.os }} \ - ${{ steps.get-version.outputs.VERSION }} \ - ) - echo "IMAGE_TAGS=$IMAGE_TAGS" >> $GITHUB_OUTPUT - - name: Build/Test/Scan/Push manual build image uses: ./.github/actions/build-test-scan-push with: - context: ./${{ inputs.product }} - os: ${{ inputs.os }} - product: ${{ inputs.product }} - image-tags: ${{ steps.get-tags.outputs.IMAGE_TAGS }} - build-args: ${{ steps.get-build-args.outputs.BUILD_ARGS }} + target: ${{ inputs.product }} push-image: ${{ inputs.push }} - 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 }} From 96895a18c1a3a7734f92d91b244e1457fcd29bf0 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 6 May 2024 10:13:38 -0600 Subject: [PATCH 074/165] Install Python dependencies --- .github/workflows/build-manual.yaml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-manual.yaml b/.github/workflows/build-manual.yaml index 9e2543142..438194893 100644 --- a/.github/workflows/build-manual.yaml +++ b/.github/workflows/build-manual.yaml @@ -92,11 +92,9 @@ jobs: with: python-version: '3.12' - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - id: setup-buildx - with: - buildkitd-config: ./share/buildkitd.toml + - name: Install Python dependencies + run: | + pip install requests - name: Get Version id: get-version @@ -108,6 +106,12 @@ jobs: fi echo "VERSION=$VERSION" >> $GITHUB_OUTPUT + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + id: setup-buildx + with: + buildkitd-config: ./share/buildkitd.toml + - name: Build/Test/Scan/Push manual build image uses: ./.github/actions/build-test-scan-push with: From baa2244a1675e28391679ff360f5f9d87f279a1e Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 6 May 2024 10:15:16 -0600 Subject: [PATCH 075/165] Revert to original cron for preview builds --- .github/workflows/build-bake-preview.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-bake-preview.yaml b/.github/workflows/build-bake-preview.yaml index aedddb101..b70cce082 100644 --- a/.github/workflows/build-bake-preview.yaml +++ b/.github/workflows/build-bake-preview.yaml @@ -1,6 +1,7 @@ on: schedule: - - cron: '0 * * * *' + - cron: '0 8 * * *' + - cron: '0 9 * * *' push: branches: - main From f663365c43c3d1e456ffc4247a96fbad9bd348c5 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 6 May 2024 10:22:41 -0600 Subject: [PATCH 076/165] Remove `base-images` from manual builds (unnecessary) --- .github/workflows/build-manual.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-manual.yaml b/.github/workflows/build-manual.yaml index 438194893..90160560a 100644 --- a/.github/workflows/build-manual.yaml +++ b/.github/workflows/build-manual.yaml @@ -14,7 +14,6 @@ on: required: true type: choice options: - - base-images - connect - connect-content-init - content-images From 4d7fdfbb15fdf68a6e537af49decfe48de9618b9 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 6 May 2024 10:39:15 -0600 Subject: [PATCH 077/165] Fix action name to bake-test-push --- .github/workflows/build-manual.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-manual.yaml b/.github/workflows/build-manual.yaml index 90160560a..3f3af6ace 100644 --- a/.github/workflows/build-manual.yaml +++ b/.github/workflows/build-manual.yaml @@ -111,8 +111,8 @@ jobs: with: buildkitd-config: ./share/buildkitd.toml - - name: Build/Test/Scan/Push manual build image - uses: ./.github/actions/build-test-scan-push + - name: Build/Test/Push manual build image + uses: ./.github/actions/bake-test-push with: target: ${{ inputs.product }} push-image: ${{ inputs.push }} From 27260c843be11c02780b32a949057442feaa946d Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 6 May 2024 13:04:19 -0600 Subject: [PATCH 078/165] Pin WGCW to Ubuntu 20.04 until 22.04 updates are made --- workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 index 6e5444c33..5ea57233d 100644 --- a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 +++ b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 @@ -1,4 +1,4 @@ -FROM us-central1-docker.pkg.dev/cloud-workstations-images/predefined/base:public-image-current as build +FROM us-central1-docker.pkg.dev/cloud-workstations-images/predefined/base:last-ubuntu2004 as build ### ARG declarations ### ARG DEBIAN_FRONTEND=noninteractive From 7a7c4f1bcb10750a582fc2e4601faa424e315d99 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 6 May 2024 13:06:27 -0600 Subject: [PATCH 079/165] Revert cron changes --- .github/workflows/build-bake-preview.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-bake-preview.yaml b/.github/workflows/build-bake-preview.yaml index b70cce082..aedddb101 100644 --- a/.github/workflows/build-bake-preview.yaml +++ b/.github/workflows/build-bake-preview.yaml @@ -1,7 +1,6 @@ on: schedule: - - cron: '0 8 * * *' - - cron: '0 9 * * *' + - cron: '0 * * * *' push: branches: - main From 24d607b659e4b6056663903b4f504c790ed81947 Mon Sep 17 00:00:00 2001 From: nodivbyzero Date: Tue, 7 May 2024 05:02:50 -0700 Subject: [PATCH 080/165] Bump PPM version to 2024.04.0-20 (#756) --- Justfile | 2 +- docker-bake.hcl | 2 +- package-manager/.env | 2 +- package-manager/Dockerfile.ubuntu2204 | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Justfile b/Justfile index b746f2992..e976c62de 100644 --- a/Justfile +++ b/Justfile @@ -8,7 +8,7 @@ sed_vars := if os() == "macos" { "-i ''" } else { "-i" } BUILDX_PATH := "" RSC_VERSION := "2024.04.0" -RSPM_VERSION := "2024.04.0-18" +RSPM_VERSION := "2024.04.0-20" RSW_VERSION := "2024.04.0+735.pro3" DRIVERS_VERSION := "2023.05.0" diff --git a/docker-bake.hcl b/docker-bake.hcl index 496a9e986..3861f4c86 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -4,7 +4,7 @@ variable CONNECT_VERSION { } variable PACKAGE_MANAGER_VERSION { - default = "2024.04.0-18" + default = "2024.04.0-20" } variable WORKBENCH_VERSION { diff --git a/package-manager/.env b/package-manager/.env index 646759d69..f24c50437 100644 --- a/package-manager/.env +++ b/package-manager/.env @@ -1,4 +1,4 @@ -RSPM_VERSION=2024.04.0-18 +RSPM_VERSION=2024.04.0-20 R_VERSION=4.2.3 R_VERSION_ALT=4.1.3 PYTHON_VERSION=3.9.17 diff --git a/package-manager/Dockerfile.ubuntu2204 b/package-manager/Dockerfile.ubuntu2204 index bba9187c4..fbe024470 100644 --- a/package-manager/Dockerfile.ubuntu2204 +++ b/package-manager/Dockerfile.ubuntu2204 @@ -13,7 +13,7 @@ RUN /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install --no-cache-dir buil RUN /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install --no-cache-dir build virtualenv # Download RStudio Package Manager ---------------------------------------------# -ARG RSPM_VERSION=2024.04.0-18 +ARG RSPM_VERSION=2024.04.0-20 ARG RSPM_DOWNLOAD_URL=https://cdn.rstudio.com/package-manager/deb/amd64 RUN curl -O ${RSPM_DOWNLOAD_URL}/rstudio-pm_${RSPM_VERSION}_amd64.deb \ # Pre 7/25/23 packages From 0d031b6ef4c7e983cbd8b9f97f21bed79e8fdb82 Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Tue, 7 May 2024 10:32:31 -0700 Subject: [PATCH 081/165] Bump Connect to version 2024.04.1 --- Justfile | 2 +- connect-content-init/Dockerfile.ubuntu2204 | 2 +- connect-content-init/README.md | 6 +++--- connect/.env | 2 +- connect/Dockerfile.ubuntu2204 | 2 +- connect/README.md | 2 +- docker-bake.hcl | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Justfile b/Justfile index e976c62de..3b491ed02 100644 --- a/Justfile +++ b/Justfile @@ -7,7 +7,7 @@ sed_vars := if os() == "macos" { "-i ''" } else { "-i" } BUILDX_PATH := "" -RSC_VERSION := "2024.04.0" +RSC_VERSION := "2024.04.1" RSPM_VERSION := "2024.04.0-20" RSW_VERSION := "2024.04.0+735.pro3" diff --git a/connect-content-init/Dockerfile.ubuntu2204 b/connect-content-init/Dockerfile.ubuntu2204 index b121ed1de..7a4cfd4ca 100644 --- a/connect-content-init/Dockerfile.ubuntu2204 +++ b/connect-content-init/Dockerfile.ubuntu2204 @@ -9,7 +9,7 @@ RUN apt-get update && \ apt-get install -y --no-install-recommends ca-certificates curl && \ rm -rf /var/lib/apt/lists/* -ARG RSC_VERSION=2024.04.0 +ARG RSC_VERSION=2024.04.1 SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN mkdir -p /rsc-staging && \ RSC_VERSION_URL=$(echo -n "${RSC_VERSION}" | sed 's/+/%2B/g') && \ diff --git a/connect-content-init/README.md b/connect-content-init/README.md index 8e02f0beb..4a6a58de8 100644 --- a/connect-content-init/README.md +++ b/connect-content-init/README.md @@ -9,7 +9,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2024.04.0`, `ubuntu2204-2024.04.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.04.1`, `ubuntu2204-2024.04.1`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) # RStudio Connect Content Init Container @@ -31,7 +31,7 @@ The version of the release package to use can be overridden with the `RSC_VERSION` build arg. ```console -just build ubuntu2204 2024.04.0 +just build ubuntu2204 2024.04.1 ``` ## Testing @@ -56,7 +56,7 @@ just test You can see the different layers that make up the image: ```console -docker history rstudio/rstudio-connect-content-init-preview:2024.04.0-dev-326 +docker history rstudio/rstudio-connect-content-init-preview:2024.04.1-dev-326 ``` NOTE: almost all the image size is pandoc. diff --git a/connect/.env b/connect/.env index fffe465c5..b27a5daf5 100644 --- a/connect/.env +++ b/connect/.env @@ -1,4 +1,4 @@ -RSC_VERSION=2024.04.0 +RSC_VERSION=2024.04.1 R_VERSION=4.2.3 R_VERSION_ALT=4.1.3 PYTHON_VERSION=3.9.17 diff --git a/connect/Dockerfile.ubuntu2204 b/connect/Dockerfile.ubuntu2204 index 1e23d58e4..cbea5ad99 100644 --- a/connect/Dockerfile.ubuntu2204 +++ b/connect/Dockerfile.ubuntu2204 @@ -7,7 +7,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 RSC_VERSION=2024.04.0 +ARG RSC_VERSION=2024.04.1 ARG QUARTO_VERSION=1.4.552 ARG SCRIPTS_DIR=/opt/positscripts diff --git a/connect/README.md b/connect/README.md index 4eaaa7287..9215a5fd4 100644 --- a/connect/README.md +++ b/connect/README.md @@ -7,7 +7,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2024.04.0`, `ubuntu2204-2024.04.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.04.1`, `ubuntu2204-2024.04.1`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) # What is Posit Connect? diff --git a/docker-bake.hcl b/docker-bake.hcl index c5ba855c8..674b4fbed 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -1,6 +1,6 @@ ### Variable definitions ### variable CONNECT_VERSION { - default = "2024.04.0" + default = "2024.04.1" } variable PACKAGE_MANAGER_VERSION { From 2c20bb95425e70b5a7405bf41cc91c8d0b86a2fd Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Tue, 7 May 2024 10:32:38 -0700 Subject: [PATCH 082/165] Bump Connect to version 2024.04.1 --- Justfile | 2 +- connect-content-init/Dockerfile.ubuntu2204 | 2 +- connect-content-init/README.md | 6 +++--- connect/.env | 2 +- connect/Dockerfile.ubuntu2204 | 2 +- connect/README.md | 2 +- docker-bake.hcl | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Justfile b/Justfile index e976c62de..3b491ed02 100644 --- a/Justfile +++ b/Justfile @@ -7,7 +7,7 @@ sed_vars := if os() == "macos" { "-i ''" } else { "-i" } BUILDX_PATH := "" -RSC_VERSION := "2024.04.0" +RSC_VERSION := "2024.04.1" RSPM_VERSION := "2024.04.0-20" RSW_VERSION := "2024.04.0+735.pro3" diff --git a/connect-content-init/Dockerfile.ubuntu2204 b/connect-content-init/Dockerfile.ubuntu2204 index b121ed1de..7a4cfd4ca 100644 --- a/connect-content-init/Dockerfile.ubuntu2204 +++ b/connect-content-init/Dockerfile.ubuntu2204 @@ -9,7 +9,7 @@ RUN apt-get update && \ apt-get install -y --no-install-recommends ca-certificates curl && \ rm -rf /var/lib/apt/lists/* -ARG RSC_VERSION=2024.04.0 +ARG RSC_VERSION=2024.04.1 SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN mkdir -p /rsc-staging && \ RSC_VERSION_URL=$(echo -n "${RSC_VERSION}" | sed 's/+/%2B/g') && \ diff --git a/connect-content-init/README.md b/connect-content-init/README.md index 8e02f0beb..4a6a58de8 100644 --- a/connect-content-init/README.md +++ b/connect-content-init/README.md @@ -9,7 +9,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2024.04.0`, `ubuntu2204-2024.04.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.04.1`, `ubuntu2204-2024.04.1`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) # RStudio Connect Content Init Container @@ -31,7 +31,7 @@ The version of the release package to use can be overridden with the `RSC_VERSION` build arg. ```console -just build ubuntu2204 2024.04.0 +just build ubuntu2204 2024.04.1 ``` ## Testing @@ -56,7 +56,7 @@ just test You can see the different layers that make up the image: ```console -docker history rstudio/rstudio-connect-content-init-preview:2024.04.0-dev-326 +docker history rstudio/rstudio-connect-content-init-preview:2024.04.1-dev-326 ``` NOTE: almost all the image size is pandoc. diff --git a/connect/.env b/connect/.env index fffe465c5..b27a5daf5 100644 --- a/connect/.env +++ b/connect/.env @@ -1,4 +1,4 @@ -RSC_VERSION=2024.04.0 +RSC_VERSION=2024.04.1 R_VERSION=4.2.3 R_VERSION_ALT=4.1.3 PYTHON_VERSION=3.9.17 diff --git a/connect/Dockerfile.ubuntu2204 b/connect/Dockerfile.ubuntu2204 index 1e23d58e4..cbea5ad99 100644 --- a/connect/Dockerfile.ubuntu2204 +++ b/connect/Dockerfile.ubuntu2204 @@ -7,7 +7,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 RSC_VERSION=2024.04.0 +ARG RSC_VERSION=2024.04.1 ARG QUARTO_VERSION=1.4.552 ARG SCRIPTS_DIR=/opt/positscripts diff --git a/connect/README.md b/connect/README.md index 4eaaa7287..9215a5fd4 100644 --- a/connect/README.md +++ b/connect/README.md @@ -7,7 +7,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2024.04.0`, `ubuntu2204-2024.04.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.04.1`, `ubuntu2204-2024.04.1`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) # What is Posit Connect? diff --git a/docker-bake.hcl b/docker-bake.hcl index c5ba855c8..674b4fbed 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -1,6 +1,6 @@ ### Variable definitions ### variable CONNECT_VERSION { - default = "2024.04.0" + default = "2024.04.1" } variable PACKAGE_MANAGER_VERSION { From 75b98182d170463df48bbaa5beb6ef0dce526134 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Wed, 8 May 2024 06:22:06 -0700 Subject: [PATCH 083/165] Fix image short sha (#760) * Add debug statement for git rev-parse * Use github.sha instead of HEAD * Set GIT_SHA to null * Add debug plan * Fix output for GIT_SHA * Remove debug statement --- .github/workflows/build-bake.yaml | 3 ++- docker-bake.hcl | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-bake.yaml b/.github/workflows/build-bake.yaml index 25613e94d..a1c999b21 100644 --- a/.github/workflows/build-bake.yaml +++ b/.github/workflows/build-bake.yaml @@ -18,7 +18,7 @@ jobs: cancel-in-progress: true outputs: - GIT_SHA: ${{ steps.checkout.outputs.sha }} + GIT_SHA: ${{ steps.get-git-sha.outputs.GIT_SHA }} steps: - name: Checkout @@ -29,6 +29,7 @@ jobs: run: | GIT_SHA=$(git rev-parse --short HEAD) echo "GIT_SHA=$GIT_SHA" >> $GITHUB_OUTPUT + echo "$GIT_SHA" base: needs: [setup] diff --git a/docker-bake.hcl b/docker-bake.hcl index 674b4fbed..ddaf21ad1 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -24,7 +24,7 @@ variable DEFAULT_JUPYTERLAB_VERSION { } variable GIT_SHA { - default = "" + default = null } function tag_safe_version { From 2e6f904ae8166ab01eaa8fe89ec50161b786dd96 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Wed, 8 May 2024 12:57:13 -0700 Subject: [PATCH 084/165] Add `--no-install-recommends` to Ubuntu shared scripts (#763) * Add `--no-install-recommends` to Ubuntu shared scripts - Prevent `r-recommended` from being unintentionally installed - Stop installing `r-base-core` since it adds an R installation unnecessarily - Check that `r-recommended` and system R version are not present - Add `--no-install-recommends` to all shared scripts, it's best practice for images * Remove duplicated variable * Remove install_r.sh dependency installation Add common R dependencies to ubuntu2204_packages.txt --- product/base/deps/ubuntu2204_packages.txt | 14 +++++++++ product/base/scripts/ubuntu/apt.sh | 2 +- product/base/scripts/ubuntu/install_python.sh | 3 +- product/base/scripts/ubuntu/install_r.sh | 29 ++----------------- product/base/test/goss.yaml | 4 +++ 5 files changed, 22 insertions(+), 30 deletions(-) diff --git a/product/base/deps/ubuntu2204_packages.txt b/product/base/deps/ubuntu2204_packages.txt index 3a836e5c7..59422223f 100644 --- a/product/base/deps/ubuntu2204_packages.txt +++ b/product/base/deps/ubuntu2204_packages.txt @@ -18,7 +18,10 @@ gpg-agent gsfonts imagemagick libarchive-dev +libblas3 +libbz2-dev libcairo2-dev +libcurl4 libcurl4-openssl-dev libev-dev libfontconfig1-dev @@ -27,26 +30,37 @@ libfribidi-dev libgdal-dev libgeos-dev libgl1-mesa-dev +libglib2.0-0 libglpk-dev libglu1-mesa-dev libgmp3-dev libharfbuzz-dev libicu-dev libjpeg-dev +liblapack-dev +liblzma-dev libmagick++-dev libmysqlclient-dev +libncurses5-dev libopenblas-dev +libpango-1.0-0 +libpangocairo-1.0-0 libpaper-utils libpcre2-dev libpng-dev libproj-dev +libreadline-dev libsodium-dev libssh2-1-dev libssl-dev +libtcl8.6 libtiff-dev +libtirpc3 libudunits2-dev libv8-dev libxml2-dev +libx11-6 +libxt6 locales lsb-release make diff --git a/product/base/scripts/ubuntu/apt.sh b/product/base/scripts/ubuntu/apt.sh index e67877d66..38dab76ab 100755 --- a/product/base/scripts/ubuntu/apt.sh +++ b/product/base/scripts/ubuntu/apt.sh @@ -21,7 +21,7 @@ usage() { } # Set defaults -APT_ARGS="-o DPkg::Lock::Timeout=60 -y -qq" +APT_ARGS="-o DPkg::Lock::Timeout=60 -y -qq --no-install-recommends" CLEAN=0 UPDATE=0 diff --git a/product/base/scripts/ubuntu/install_python.sh b/product/base/scripts/ubuntu/install_python.sh index 105660240..f96d783a5 100755 --- a/product/base/scripts/ubuntu/install_python.sh +++ b/product/base/scripts/ubuntu/install_python.sh @@ -29,7 +29,6 @@ usage() { # Set defaults -APT_ARGS="-o DPkg::Lock::Timeout=60 -y -qq" PREFIX="/opt/python" OPTIONS=$(getopt -o hdr: --long help,debug,prefix:,requirement: -- "$@") @@ -73,7 +72,7 @@ fi PYTHON_BIN="${PREFIX}/${PYTHON_VERSION}/bin/python" # Set apt options -APT_ARGS="-o DPkg::Lock::Timeout=60 -y -qq" +APT_ARGS="-o DPkg::Lock::Timeout=60 -y -qq --no-install-recommends" # Set ubuntu version UBUNTU_VERSION=$(lsb_release -rs) diff --git a/product/base/scripts/ubuntu/install_r.sh b/product/base/scripts/ubuntu/install_r.sh index 401eac657..03284b618 100755 --- a/product/base/scripts/ubuntu/install_r.sh +++ b/product/base/scripts/ubuntu/install_r.sh @@ -31,7 +31,6 @@ usage() { # Set defaults -APT_ARGS="-o DPkg::Lock::Timeout=60 -y -qq" PREFIX="/opt/R" R_EXISTS=0 WITH_SOURCE=0 @@ -85,7 +84,7 @@ fi R_BIN="${PREFIX}/${R_VERSION}/bin/R" # Set apt options -APT_ARGS="-o DPkg::Lock::Timeout=60 -y -qq" +APT_ARGS="-o DPkg::Lock::Timeout=60 -y -qq --no-install-recommends" APT_KEY="0x51716619e084dab9" APT_KEY_FILE="/usr/share/keyrings/cran-rstudio-keyring.gpg" APT_FILE="/etc/apt/sources.list.d/cran-rstudio.list" @@ -130,29 +129,6 @@ install_r() { rm "/tmp/r-${R_VERSION}.deb" } -install_r_dependencies() { - # There are many dependencies that R users may rely on that we want to - # include in the images. These include things like a functional X server, - # fonts, and other libraries that are commonly used by R packages. - local r_deps="r-base-core r-base-dev" - - # Check whether dependencies are already installed - # shellcheck disable=2086 - if dpkg -s $r_deps >/dev/null 2>&1 ; then - echo "$d R dependencies already installed $d" - return - fi - - echo "$d$d Installng R depencencies $d$d" - # Ensure we have apt-transport-https installed - # shellcheck disable=SC2086 - apt-get install $APT_ARGS apt-transport-https - - # Install R dependencies - # shellcheck disable=2086 - apt-get install $APT_ARGS $r_deps -} - install_r_packages() { if [ ! -f "$R_PKG_FILE" ]; then echo "$d R package file $R_PKG_FILE does not exist $d" @@ -180,10 +156,9 @@ get_r_source() { } -# Only add the CRAN apt source & dependencies if we don't expect R to exist +# Only add the CRAN apt source if we don't expect R to exist if [ "$R_EXISTS" -eq 0 ]; then add_cran_apt_source - install_r_dependencies fi # Check if R is already installed diff --git a/product/base/test/goss.yaml b/product/base/test/goss.yaml index d15aa828e..5247d6f2a 100644 --- a/product/base/test/goss.yaml +++ b/product/base/test/goss.yaml @@ -6,6 +6,8 @@ package: installed: true cracklib-runtime: installed: true + r-recommended: + installed: false {{end}} {{if .Env.OS | regexMatch "centos.*"}} epel-release: @@ -45,6 +47,8 @@ file: exists: true /opt/python/{{.Env.PYTHON_VERSION_ALT}}/bin/python3: exists: true + /usr/lib/R/bin/R: + exists: false /tini: exists: true {{if .Env.OS | regexMatch "ubuntu.*"}} From 597703da6b9eb1e2fe9585a3975c222cb914625e Mon Sep 17 00:00:00 2001 From: Graham Held Date: Thu, 9 May 2024 11:42:44 -0700 Subject: [PATCH 085/165] Bump r version to 4.4 to address CVE and alt version to 4.3.3 (#764) * Bump r version to 4.4 to address CVE and alt version to 4.3.3 * Fix the bake files * Update r version and alt version in Workbench image * Third time's the charm. * Remove duplicates --------- Co-authored-by: Ian Pittwood --- docker-bake.hcl | 5 +++-- docker-bake.preview.hcl | 9 +++++---- product/base/Dockerfile.centos7 | 4 ++-- product/base/Dockerfile.ubuntu2204 | 4 ++-- r-session-complete/Dockerfile.ubuntu2204 | 4 ++-- workbench/Dockerfile.ubuntu2204 | 4 ++-- 6 files changed, 16 insertions(+), 14 deletions(-) diff --git a/docker-bake.hcl b/docker-bake.hcl index ddaf21ad1..859bf27a1 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -100,6 +100,7 @@ variable BASE_BUILD_MATRIX { {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.14", py_alternate = "3.8.15"}, {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.17", py_alternate = "3.8.17"}, {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.12.1", py_alternate = "3.11.7"}, + {os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.12.1", py_alternate = "3.11.7"}, ] } } @@ -166,7 +167,7 @@ variable CONTENT_BUILD_MATRIX { variable R_SESSION_COMPLETE_BUILD_MATRIX { default = { builds = [ - {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.14", py_alternate = "3.8.15"}, + {os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.12.1", py_alternate = "3.11.7"}, ] } } @@ -174,7 +175,7 @@ variable R_SESSION_COMPLETE_BUILD_MATRIX { variable WORKBENCH_BUILD_MATRIX { default = { builds = [ - {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.14", py_alternate = "3.8.15"}, + {os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.12.1", py_alternate = "3.11.7"}, ] } } diff --git a/docker-bake.preview.hcl b/docker-bake.preview.hcl index a229e1e41..613caaaf8 100644 --- a/docker-bake.preview.hcl +++ b/docker-bake.preview.hcl @@ -116,6 +116,7 @@ variable BASE_BUILD_MATRIX { builds = [ {os = "centos7", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14"}, {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14"}, + {os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.11.9", py_alternate = "3.10.14"}, ] } } @@ -127,7 +128,7 @@ variable PRO_BUILD_MATRIX { variable PACKAGE_MANAGER_BUILD_MATRIX { default = { builds = [ - {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14"}, + {os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.11.9", py_alternate = "3.10.14"}, ] } } @@ -135,7 +136,7 @@ variable PACKAGE_MANAGER_BUILD_MATRIX { variable CONNECT_BUILD_MATRIX { default = { builds = [ - {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14", quarto = DEFAULT_QUARTO_VERSION}, + {os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.11.9", py_alternate = "3.10.14", quarto = DEFAULT_QUARTO_VERSION}, ] } } @@ -151,7 +152,7 @@ variable CONNECT_CONTENT_INIT_BUILD_MATRIX { variable R_SESSION_COMPLETE_BUILD_MATRIX { default = { builds = [ - {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14"}, + {os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.11.9", py_alternate = "3.10.14"}, ] } } @@ -159,7 +160,7 @@ variable R_SESSION_COMPLETE_BUILD_MATRIX { variable WORKBENCH_BUILD_MATRIX { default = { builds = [ - {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14"}, + {os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.11.9", py_alternate = "3.10.14"}, ] } } diff --git a/product/base/Dockerfile.centos7 b/product/base/Dockerfile.centos7 index 9faf3e6b0..dfd13ed94 100644 --- a/product/base/Dockerfile.centos7 +++ b/product/base/Dockerfile.centos7 @@ -1,8 +1,8 @@ FROM centos:7 as build ### ARG declarations ### -ARG R_VERSION=4.2.0 -ARG R_VERSION_ALT=3.6.2 +ARG R_VERSION=4.4.0 +ARG R_VERSION_ALT=4.3.3 ARG PYTHON_VERSION=3.9.14 ARG PYTHON_VERSION_ALT=3.8.15 ARG TINI_VERSION=0.19.0 diff --git a/product/base/Dockerfile.ubuntu2204 b/product/base/Dockerfile.ubuntu2204 index 850245e8a..649dabbf7 100644 --- a/product/base/Dockerfile.ubuntu2204 +++ b/product/base/Dockerfile.ubuntu2204 @@ -2,8 +2,8 @@ FROM ubuntu:22.04 as build ### ARG declarations ### ARG DEBIAN_FRONTEND=noninteractive -ARG R_VERSION=4.2.3 -ARG R_VERSION_ALT=4.1.3 +ARG R_VERSION=4.4.0 +ARG R_VERSION_ALT=4.3.3 ARG PYTHON_VERSION=3.9.17 ARG PYTHON_VERSION_ALT=3.8.17 ARG TINI_VERSION=0.19.0 diff --git a/r-session-complete/Dockerfile.ubuntu2204 b/r-session-complete/Dockerfile.ubuntu2204 index 50a605f0b..e1b792cf3 100644 --- a/r-session-complete/Dockerfile.ubuntu2204 +++ b/r-session-complete/Dockerfile.ubuntu2204 @@ -1,8 +1,8 @@ FROM product-base-pro as build ARG DEBIAN_FRONTEND=noninteractive -ARG R_VERSION=4.2.3 -ARG R_VERSION_ALT=4.1.3 +ARG R_VERSION=4.4.0 +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 diff --git a/workbench/Dockerfile.ubuntu2204 b/workbench/Dockerfile.ubuntu2204 index 76ed09259..5a4973eaa 100644 --- a/workbench/Dockerfile.ubuntu2204 +++ b/workbench/Dockerfile.ubuntu2204 @@ -1,8 +1,8 @@ FROM product-base-pro as build ARG DEBIAN_FRONTEND=noninteractive -ARG R_VERSION=4.2.3 -ARG R_VERSION_ALT=4.1.3 +ARG R_VERSION=4.4.0 +ARG R_VERSION_ALT=4.3.3 ARG PYTHON_VERSION=3.9.17 ARG PYTHON_VERSION_ALT=3.8.17 ARG PYTHON_VERSION_JUPYTER=3.8.17 From 801583af150ddc950a67dbf0b6bb4e9e9442ca1e Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Fri, 10 May 2024 09:40:50 -0600 Subject: [PATCH 086/165] Set the bakefile dynamically for manual builds (#765) * Set the bakefile dynamically for manual builds * Echo bake file * Add needs to build job * Dynamically set product version * Set shell * Fix else if * Set versions to empty string * Dynamically set target name * Set all versions to literal "null" strings, they'll fail anyways this way * Temporarily add set-bake-file-in-manual as usable branch * Remove concurrency restriction for manual builds * Remove literal null strings * Fix get-version script including "" wrap on versions * Remove content-images * Remove testing lines Add future debugging lines --- .github/workflows/build-manual.yaml | 60 ++++++++++++++++++++++++----- docker-bake.preview.hcl | 10 ++--- tools/get-version.py | 4 +- 3 files changed, 58 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build-manual.yaml b/.github/workflows/build-manual.yaml index 3f3af6ace..7e0fd5da1 100644 --- a/.github/workflows/build-manual.yaml +++ b/.github/workflows/build-manual.yaml @@ -16,7 +16,6 @@ on: options: - connect - connect-content-init - - content-images - package-manager - r-session-complete - workbench @@ -48,12 +47,9 @@ jobs: name: Setup runs-on: ubuntu-latest - concurrency: - group: bake-setup-${{ github.ref }} - cancel-in-progress: true - outputs: - GIT_SHA: ${{ steps.checkout.outputs.sha }} + GIT_SHA: ${{ steps.get-git-sha.outputs.GIT_SHA }} + BAKE_FILE: ${{ steps.bake-file.outputs.BAKE_FILE }} steps: - name: Checkout @@ -63,9 +59,22 @@ jobs: id: get-git-sha run: | GIT_SHA=$(git rev-parse --short HEAD) + echo "Setting GIT_SHA=$GIT_SHA" echo "GIT_SHA=$GIT_SHA" >> $GITHUB_OUTPUT + - name: Set BAKE_FILE + id: bake-file + run: | + if [[ "${{ inputs.type }}" == "release" ]]; then + BAKE_FILE="docker-bake.hcl" + else + BAKE_FILE="docker-bake.preview.hcl" + fi + echo "Using $BAKE_FILE" + echo "BAKE_FILE=$BAKE_FILE" >> $GITHUB_OUTPUT + build: + needs: [setup] runs-on: ubuntu-latest-4x name: manual-build @@ -95,15 +104,48 @@ jobs: run: | pip install requests + - name: Get Target + id: get-target + shell: bash + run: | + # Append suffix if necessary + target="${{ inputs.product }}" + if [[ "${{ inputs.type }}" != "release" ]]; then + target="${{ inputs.product }}-${{ inputs.type }}" + fi + echo "Setting TARGET=$target" + echo "TARGET=$target" >> $GITHUB_OUTPUT + - name: Get Version id: get-version + shell: bash run: | + # Determine how to set the version if [[ "${{ inputs.version }}" == "auto" ]]; then VERSION=`just -f ci.Justfile get-version ${{ inputs.product }} --type=${{ inputs.type }} --local` else VERSION="${{ inputs.version }}" fi - echo "VERSION=$VERSION" >> $GITHUB_OUTPUT + + # 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" + elif [[ "$product" == "package-manager" ]]; then + product="PACKAGE_MANAGER" + else + product="WORKBENCH" + fi + + echo "Setting $product$suffix=$VERSION" + echo "$product$suffix=$VERSION" >> $GITHUB_ENV - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -114,10 +156,10 @@ jobs: - name: Build/Test/Push manual build image uses: ./.github/actions/bake-test-push with: - target: ${{ inputs.product }} + target: ${{ steps.get-target.outputs.TARGET }} + bakefile: ${{ needs.setup.outputs.BAKE_FILE }} push-image: ${{ inputs.push }} 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 }}' - diff --git a/docker-bake.preview.hcl b/docker-bake.preview.hcl index 613caaaf8..f61f07b51 100644 --- a/docker-bake.preview.hcl +++ b/docker-bake.preview.hcl @@ -4,23 +4,23 @@ variable BRANCH { } variable CONNECT_DAILY_VERSION { - default = null + default = "" } variable PACKAGE_MANAGER_PREVIEW_VERSION { - default = null + default = "" } variable PACKAGE_MANAGER_DAILY_VERSION { - default = null + default = "" } variable WORKBENCH_DAILY_VERSION { - default = null + default = "" } variable WORKBENCH_PREVIEW_VERSION { - default = null + default = "" } variable DRIVERS_VERSION { diff --git a/tools/get-version.py b/tools/get-version.py index 8f22eb6ac..6c73fd72a 100755 --- a/tools/get-version.py +++ b/tools/get-version.py @@ -108,7 +108,7 @@ def download_json(url): def get_downloads_json(): - return download_json("https://rstudio.com/wp-content/downloads.json") + return download_json("https://www.rstudio.com/wp-content/downloads.json") def rstudio_workbench_preview(): @@ -136,7 +136,7 @@ def get_local_release_version(product): with open('Justfile', 'r') as f: content = f.read() - vers = re.compile(f'{prefix}_VERSION := (.*)') + vers = re.compile(f'{prefix}_VERSION := "(.*)"') res = vers.search(content) # from the first capture group output_version = res[1] From d49e2aa4b73e11b2805338f386dd107a277ab1b7 Mon Sep 17 00:00:00 2001 From: Jeff Vroom Date: Mon, 13 May 2024 16:24:57 -0700 Subject: [PATCH 087/165] Bumped workbench version to 2024.04.1 --- Justfile | 2 +- docker-bake.hcl | 2 +- r-session-complete/.env | 2 +- r-session-complete/Dockerfile.ubuntu2204 | 2 +- workbench-for-google-cloud-workstations/.env | 4 ++-- workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 | 2 +- workbench-for-microsoft-azure-ml/.env | 2 +- workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 | 4 ++-- workbench/.env | 2 +- workbench/Dockerfile.ubuntu2204 | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Justfile b/Justfile index 3b491ed02..656013a46 100644 --- a/Justfile +++ b/Justfile @@ -9,7 +9,7 @@ BUILDX_PATH := "" RSC_VERSION := "2024.04.1" RSPM_VERSION := "2024.04.0-20" -RSW_VERSION := "2024.04.0+735.pro3" +RSW_VERSION := "2024.04.1+748.pro2" DRIVERS_VERSION := "2023.05.0" DRIVERS_VERSION_RHEL := DRIVERS_VERSION + "-1" diff --git a/docker-bake.hcl b/docker-bake.hcl index ddaf21ad1..6b8ca379d 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -8,7 +8,7 @@ variable PACKAGE_MANAGER_VERSION { } variable WORKBENCH_VERSION { - default = "2024.04.0+735.pro3" + default = "2024.04.1+748.pro2" } variable DRIVERS_VERSION { diff --git a/r-session-complete/.env b/r-session-complete/.env index 070bbf9b6..e34997dfa 100644 --- a/r-session-complete/.env +++ b/r-session-complete/.env @@ -1,4 +1,4 @@ R_VERSION=4.1.0 PYTHON_VERSION=3.9.5 -RSW_VERSION=2024.04.0+735.pro3 +RSW_VERSION=2024.04.1+748.pro2 DRIVERS_VERSION=2024.03.0-1 diff --git a/r-session-complete/Dockerfile.ubuntu2204 b/r-session-complete/Dockerfile.ubuntu2204 index 50a605f0b..55ed31ada 100644 --- a/r-session-complete/Dockerfile.ubuntu2204 +++ b/r-session-complete/Dockerfile.ubuntu2204 @@ -6,7 +6,7 @@ ARG R_VERSION_ALT=4.1.3 ARG PYTHON_VERSION=3.9.17 ARG PYTHON_VERSION_ALT=3.8.17 ARG JUPYTERLAB_VERSION=3.6.5 -ARG RSW_VERSION=2024.04.0+735.pro3 +ARG RSW_VERSION=2024.04.1+748.pro2 ARG RSW_NAME=rstudio-workbench ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64 ARG SCRIPTS_DIR=/opt/positscripts diff --git a/workbench-for-google-cloud-workstations/.env b/workbench-for-google-cloud-workstations/.env index 415e38cef..c96229198 100644 --- a/workbench-for-google-cloud-workstations/.env +++ b/workbench-for-google-cloud-workstations/.env @@ -1,5 +1,5 @@ -RSW_VERSION=2024.04.0+735.pro3 -RSW_TAG_VERSION=2024.04.0-735.pro3 +RSW_VERSION=2024.04.1+748.pro2 +RSW_TAG_VERSION=2024.04.1-748.pro2 RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/focal/amd64 RSW_NAME=rstudio-workbench PYTHON_VERSION=3.10.13 diff --git a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 index 5ea57233d..65250eca6 100644 --- a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 +++ b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 @@ -9,7 +9,7 @@ ARG PYTHON_VERSION_ALT=3.10.13 ARG PYTHON_VERSION_JUPYTER=3.10.13 ARG JUPYTERLAB_VERSION=3.6.7 ARG DRIVERS_VERSION=2023.05.0 -ARG RSW_VERSION=2024.04.0+735.pro3 +ARG RSW_VERSION=2024.04.1+748.pro2 ARG RSW_NAME=rstudio-workbench ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/focal/amd64 ARG SCRIPTS_DIR=/opt/positscripts diff --git a/workbench-for-microsoft-azure-ml/.env b/workbench-for-microsoft-azure-ml/.env index 50652b2db..09c938258 100644 --- a/workbench-for-microsoft-azure-ml/.env +++ b/workbench-for-microsoft-azure-ml/.env @@ -1,4 +1,4 @@ -RSW_VERSION=2024.04.0+735.pro3 +RSW_VERSION=2024.04.1+748.pro2 RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/bionic/amd64 RSW_NAME=rstudio-workbench PYTHON_VERSION=3.9.14 diff --git a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 index baa8dbe52..6be16cbc4 100644 --- a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 +++ b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 @@ -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.04.0+735.pro3 +ARG RSW_VERSION=2024.04.1+748.pro2 ARG RSW_NAME=rstudio-workbench ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64 ARG SCRIPTS_DIR=/opt/positscripts @@ -178,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.04.0+735.pro3' \ + org.opencontainers.image.version='2024.04.1+748.pro2' \ org.opencontainers.image.url='https://www.rstudio.com/products/workbench/' diff --git a/workbench/.env b/workbench/.env index d57a8073a..c75262549 100644 --- a/workbench/.env +++ b/workbench/.env @@ -1,4 +1,4 @@ -RSW_VERSION=2024.04.0+735.pro3 +RSW_VERSION=2024.04.1+748.pro2 RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/bionic/amd64 RSW_NAME=rstudio-workbench PYTHON_VERSION=3.9.17 diff --git a/workbench/Dockerfile.ubuntu2204 b/workbench/Dockerfile.ubuntu2204 index 76ed09259..372176617 100644 --- a/workbench/Dockerfile.ubuntu2204 +++ b/workbench/Dockerfile.ubuntu2204 @@ -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.04.0+735.pro3 +ARG RSW_VERSION=2024.04.1+748.pro2 ARG RSW_NAME=rstudio-workbench ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64 ARG SCRIPTS_DIR=/opt/positscripts From 997bec1bb06682c3bcf2965c69470240c5e14d4d Mon Sep 17 00:00:00 2001 From: Jeff Vroom Date: Tue, 14 May 2024 10:03:46 -0700 Subject: [PATCH 088/165] Fixed tags in the links to point to the new version --- r-session-complete/README.md | 2 +- workbench/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/r-session-complete/README.md b/r-session-complete/README.md index dc50a380e..665feeef8 100644 --- a/r-session-complete/README.md +++ b/r-session-complete/README.md @@ -7,7 +7,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2024.04.0`, `ubuntu2204-2024.04.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/r-session-complete/Dockerfile.ubuntu2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.04.1`, `ubuntu2204-2024.04.1`](https://github.com/rstudio/rstudio-docker-products/blob/main/r-session-complete/Dockerfile.ubuntu2204) # What are the r-session-complete images? diff --git a/workbench/README.md b/workbench/README.md index 17020f9c8..ffae4734e 100644 --- a/workbench/README.md +++ b/workbench/README.md @@ -7,7 +7,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2024.04.0`, `ubuntu2204-2024.04.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/workbench/Dockerfile.ubuntu2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.04.1`, `ubuntu2204-2024.04.1`](https://github.com/rstudio/rstudio-docker-products/blob/main/workbench/Dockerfile.ubuntu2204) # What is RStudio Workbench? From 60da8e37c111803c2b89a3f7ce4b8b38e62b505f Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Thu, 16 May 2024 11:50:59 -0600 Subject: [PATCH 089/165] Upgrade WGCW image to Ubuntu 22.04 (#773) * Update WGCW image to Ubuntu 22.04 base * Update bake file * Fix WGCW tests --- Justfile | 3 ++- docker-bake.hcl | 4 +-- workbench-for-google-cloud-workstations/.env | 12 ++++----- ...rfile.ubuntu2004 => Dockerfile.ubuntu2204} | 26 +++++++++---------- .../conf/launcher-env | 2 +- .../conf/repos.conf | 4 +-- .../test/goss.yaml | 7 ++--- 7 files changed, 28 insertions(+), 30 deletions(-) rename workbench-for-google-cloud-workstations/{Dockerfile.ubuntu2004 => Dockerfile.ubuntu2204} (92%) diff --git a/Justfile b/Justfile index 656013a46..4386afdb1 100644 --- a/Justfile +++ b/Justfile @@ -87,7 +87,8 @@ preview-plan branch="$(git branch --show-current)": # just test workbench test target="default" file="docker-bake.hcl": - python3 {{justfile_directory()}}/tools/test_bake_artifacts.py --target "{{target}}" --file "{{file}}" + GIT_SHA=$(git rev-parse --short HEAD) \ + python3 {{justfile_directory()}}/tools/test_bake_artifacts.py --target "{{target}}" --file "{{file}}" # just preview-test connect dev preview-test target="default" branch="$(git branch --show-current)": diff --git a/docker-bake.hcl b/docker-bake.hcl index 11f07f1e1..ea7865cb0 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -183,7 +183,7 @@ variable WORKBENCH_BUILD_MATRIX { variable WORKBENCH_GOOGLE_CLOUD_WORKSTATION_BUILD_MATRIX { default = { builds = [ - {os = "ubuntu2004", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.7", py_alternate = "3.10.13"}, + {os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.11.9", py_alternate = "3.10.14"}, ] } } @@ -479,7 +479,7 @@ target "workbench-for-google-cloud-workstations" { DRIVERS_VERSION = get_drivers_version(builds.os) RSW_VERSION = WORKBENCH_VERSION RSW_NAME = "rstudio-workbench" - RSW_DOWNLOAD_URL = "https://download2.rstudio.org/server/focal/amd64" + RSW_DOWNLOAD_URL = "https://download2.rstudio.org/server/jammy/amd64" } } diff --git a/workbench-for-google-cloud-workstations/.env b/workbench-for-google-cloud-workstations/.env index c96229198..c5c7cb4f7 100644 --- a/workbench-for-google-cloud-workstations/.env +++ b/workbench-for-google-cloud-workstations/.env @@ -1,12 +1,12 @@ RSW_VERSION=2024.04.1+748.pro2 RSW_TAG_VERSION=2024.04.1-748.pro2 -RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/focal/amd64 +RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64 RSW_NAME=rstudio-workbench -PYTHON_VERSION=3.10.13 -PYTHON_VERSION_ALT=3.9.18 -PYTHON_VERSION_JUPYTER=3.10.13 -R_VERSION=4.2.3 -R_VERSION_ALT=4.1.3 +PYTHON_VERSION=3.11.9 +PYTHON_VERSION_ALT=3.10.14 +PYTHON_VERSION_JUPYTER=3.10.14 +R_VERSION=4.4.0 +R_VERSION_ALT=4.3.3 DRIVERS_VERSION=2023.05.0 QUARTO_VERSION=1.3.340 IMAGE_REGISTRY_NAME=us-central1-docker.pkg.dev/posit-images/cloud-workstations/workbench diff --git a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 similarity index 92% rename from workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 rename to workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 index 65250eca6..4398738bb 100644 --- a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 +++ b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 @@ -1,17 +1,17 @@ -FROM us-central1-docker.pkg.dev/cloud-workstations-images/predefined/base:last-ubuntu2004 as build +FROM us-central1-docker.pkg.dev/cloud-workstations-images/predefined/base:latest as build ### ARG declarations ### ARG DEBIAN_FRONTEND=noninteractive -ARG R_VERSION=4.2.3 -ARG R_VERSION_ALT=4.1.3 -ARG PYTHON_VERSION=3.11.7 -ARG PYTHON_VERSION_ALT=3.10.13 -ARG PYTHON_VERSION_JUPYTER=3.10.13 +ARG R_VERSION=4.4.0 +ARG R_VERSION_ALT=4.3.3 +ARG PYTHON_VERSION=3.11.9 +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.04.1+748.pro2 ARG RSW_NAME=rstudio-workbench -ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/focal/amd64 +ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64 ARG SCRIPTS_DIR=/opt/positscripts ENV STARTUP_DEBUG_MODE 0 @@ -40,8 +40,8 @@ RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyri && rm -rf /var/lib/apt/lists/* ### Install R versions ### -RUN curl -O https://cdn.rstudio.com/r/ubuntu-2004/pkgs/r-${R_VERSION}_1_amd64.deb \ - && curl -O https://cdn.rstudio.com/r/ubuntu-2004/pkgs/r-${R_VERSION_ALT}_1_amd64.deb \ +RUN curl -O https://cdn.rstudio.com/r/ubuntu-2204/pkgs/r-${R_VERSION}_1_amd64.deb \ + && curl -O https://cdn.rstudio.com/r/ubuntu-2204/pkgs/r-${R_VERSION_ALT}_1_amd64.deb \ && apt-get update \ && apt-get install -yq --no-install-recommends ./r-${R_VERSION}_1_amd64.deb \ && apt-get install -yq --no-install-recommends ./r-${R_VERSION_ALT}_1_amd64.deb \ @@ -52,8 +52,8 @@ RUN curl -O https://cdn.rstudio.com/r/ubuntu-2004/pkgs/r-${R_VERSION}_1_amd64.de && rm -rf /var/lib/apt/lists/* ### Install Python versions ### -RUN curl -O https://cdn.rstudio.com/python/ubuntu-2004/pkgs/python-${PYTHON_VERSION}_1_amd64.deb \ - && curl -O https://cdn.rstudio.com/python/ubuntu-2004/pkgs/python-${PYTHON_VERSION_ALT}_1_amd64.deb \ +RUN curl -O https://cdn.rstudio.com/python/ubuntu-2204/pkgs/python-${PYTHON_VERSION}_1_amd64.deb \ + && curl -O https://cdn.rstudio.com/python/ubuntu-2204/pkgs/python-${PYTHON_VERSION_ALT}_1_amd64.deb \ && apt-get update \ && apt-get install -yq --no-install-recommends ./python-${PYTHON_VERSION}_1_amd64.deb \ && apt-get install -yq --no-install-recommends ./python-${PYTHON_VERSION_ALT}_1_amd64.deb \ @@ -95,7 +95,7 @@ RUN apt-get update \ && rm -f ./rstudio-drivers_${DRIVERS_VERSION}_amd64.deb \ && rm -rf /var/lib/apt/lists/* \ && 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__/focal/latest")' + && /opt/R/${R_VERSION}/bin/R -e 'install.packages("odbc", repos="https://packagemanager.rstudio.com/cran/__linux__/jammy/latest")' ### Install Workbench ### SHELL ["/bin/bash", "-o", "pipefail", "-c"] @@ -117,7 +117,7 @@ RUN curl -o rstudio-workbench.deb "${RSW_DOWNLOAD_URL}/${RSW_NAME}-${RSW_VERSION # TODO(ianpittwood): Replace monitor download with $RSW_VERSION after upgrading to 2023.06.0 RUN mkdir -p /opt/rstudio-license/ \ && mkdir -p /var/lib/rstudio-workbench \ - && curl -sL "https://s3.amazonaws.com/rstudio-ide-build/monitor/focal/rsp-monitor-workbench-gcpw-amd64-2023.06.0-419.pro1.tar.gz" | \ + && curl -sL "https://s3.amazonaws.com/rstudio-ide-build/monitor/jammy/rsp-monitor-workbench-gcpw-amd64-2023.06.0-419.pro1.tar.gz" | \ tar xzvf - --strip 2 -C /opt/rstudio-license/ \ && chmod 0755 /opt/rstudio-license/license-manager \ && mv /opt/rstudio-license/license-manager /opt/rstudio-license/license-manager-orig \ diff --git a/workbench-for-google-cloud-workstations/conf/launcher-env b/workbench-for-google-cloud-workstations/conf/launcher-env index 4a53e7278..40f05ea8f 100644 --- a/workbench-for-google-cloud-workstations/conf/launcher-env +++ b/workbench-for-google-cloud-workstations/conf/launcher-env @@ -3,4 +3,4 @@ Environment: LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 JobType: any -Environment: PATH=/opt/python/3.9.17/bin:$PATH +Environment: PATH=/opt/python/3.10.14/bin:$PATH diff --git a/workbench-for-google-cloud-workstations/conf/repos.conf b/workbench-for-google-cloud-workstations/conf/repos.conf index de4785ea2..b8d029008 100644 --- a/workbench-for-google-cloud-workstations/conf/repos.conf +++ b/workbench-for-google-cloud-workstations/conf/repos.conf @@ -1,2 +1,2 @@ -CRAN=https://packagemanager.posit.co/cran/__linux__/focal/latest -RSPM=https://packagemanager.posit.co/cran/__linux__/focal/latest +CRAN=https://packagemanager.posit.co/cran/__linux__/jammy/latest +RSPM=https://packagemanager.posit.co/cran/__linux__/jammy/latest diff --git a/workbench-for-google-cloud-workstations/test/goss.yaml b/workbench-for-google-cloud-workstations/test/goss.yaml index fcb383d71..c55ff6d86 100644 --- a/workbench-for-google-cloud-workstations/test/goss.yaml +++ b/workbench-for-google-cloud-workstations/test/goss.yaml @@ -1,13 +1,10 @@ user: rstudio-server: exists: true - uid: 999 - gid: 998 group: rstudio-server: exists: true - gid: 998 package: rstudio-server: @@ -155,11 +152,11 @@ file: command: # Check OS release version (early heads up in case the base image is modified) - Check OS version is "focal": + Check OS version is "jammy": exec: "lsb_release -cs" exit-status: 0 stdout: [ - "focal" + "jammy" ] Test Workbench Monitor rstudio-server.log creation: exec: su rstudio-server -c 'touch /var/lib/rstudio-server/monitor/log/rstudio-server.log' From e5a3d812aea3e27f7ac752ab7d2273e5e0da2cf0 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Thu, 16 May 2024 13:56:09 -0600 Subject: [PATCH 090/165] Remove unused base images (#774) Bump WAML to R 4.4.0 --- docker-bake.hcl | 4 +--- docker-bake.preview.hcl | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/docker-bake.hcl b/docker-bake.hcl index ea7865cb0..34209304c 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -96,8 +96,6 @@ function get_tags { variable BASE_BUILD_MATRIX { default = { builds = [ - {os = "centos7", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.14", py_alternate = "3.8.15"}, - {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.14", py_alternate = "3.8.15"}, {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.17", py_alternate = "3.8.17"}, {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.12.1", py_alternate = "3.11.7"}, {os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.12.1", py_alternate = "3.11.7"}, @@ -191,7 +189,7 @@ variable WORKBENCH_GOOGLE_CLOUD_WORKSTATION_BUILD_MATRIX { variable WORKBENCH_MICROSOFT_AZURE_ML_BUILD_MATRIX { default = { builds = [ - {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.14", py_alternate = "3.8.15"}, + {os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.12.1", py_alternate = "3.11.7"}, ] } } diff --git a/docker-bake.preview.hcl b/docker-bake.preview.hcl index f61f07b51..402868067 100644 --- a/docker-bake.preview.hcl +++ b/docker-bake.preview.hcl @@ -114,8 +114,6 @@ function get_tags { variable BASE_BUILD_MATRIX { default = { builds = [ - {os = "centos7", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14"}, - {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14"}, {os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.11.9", py_alternate = "3.10.14"}, ] } From 7a1c227972acab0b594f5a87fcebea61676539ba Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Tue, 28 May 2024 13:43:01 -0600 Subject: [PATCH 091/165] Enable user group creation for `rstudio-user` in Workbench image (#780) * Enable user group creation for `rstudio-user` in Workbench image * Fix default UID in script --- workbench/startup.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/workbench/startup.sh b/workbench/startup.sh index 8e1b6743c..a6b5f592c 100644 --- a/workbench/startup.sh +++ b/workbench/startup.sh @@ -66,7 +66,10 @@ else if [ -z "$RSW_TESTUSER" ]; then echo "Empty 'RSW_TESTUSER' variables, not creating test user"; else - useradd -m -s /bin/bash -N -u $RSW_TESTUSER_UID $RSW_TESTUSER + if [ -z "$RSW_TESTUSER_UID" ]; then + RSW_TESTUSER_UID=10000 + fi + useradd -m -s /bin/bash -u $RSW_TESTUSER_UID -U $RSW_TESTUSER echo "$RSW_TESTUSER:$RSW_TESTUSER_PASSWD" | sudo chpasswd fi fi From c69133c4bb3487edf05c9f2a77861e89607b9f0e Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Wed, 29 May 2024 07:58:43 -0600 Subject: [PATCH 092/165] Fix service image Python 3.12+ issues (#782) * Use `ensurepip` to make sure pip bundled with 3.12 is compatible * Add `ensurepip --upgrade` to install_python.sh * Downgrade WAML due to Azure ML Python 3.12 incompatibility --- docker-bake.hcl | 2 +- product/base/scripts/ubuntu/install_python.sh | 1 + workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docker-bake.hcl b/docker-bake.hcl index 34209304c..f9169170d 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -189,7 +189,7 @@ variable WORKBENCH_GOOGLE_CLOUD_WORKSTATION_BUILD_MATRIX { variable WORKBENCH_MICROSOFT_AZURE_ML_BUILD_MATRIX { default = { builds = [ - {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.2.3", r_alternate = "4.1.3", py_primary = "3.9.17", py_alternate = "3.8.17"}, ] } } diff --git a/product/base/scripts/ubuntu/install_python.sh b/product/base/scripts/ubuntu/install_python.sh index f96d783a5..13515ef74 100755 --- a/product/base/scripts/ubuntu/install_python.sh +++ b/product/base/scripts/ubuntu/install_python.sh @@ -94,6 +94,7 @@ install_python() { apt-get install $APT_ARGS "/tmp/python-${PYTHON_VERSION}.deb" rm "/tmp/python-${PYTHON_VERSION}.deb" # Upgrade pip and setuptools to latest version + $PYTHON_BIN -m ensurepip --upgrade $PYTHON_BIN -m pip install -U setuptools $PYTHON_BIN -m pip install -U pip } diff --git a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 index 4398738bb..9675ac769 100644 --- a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 +++ b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 @@ -59,10 +59,12 @@ RUN curl -O https://cdn.rstudio.com/python/ubuntu-2204/pkgs/python-${PYTHON_VERS && apt-get install -yq --no-install-recommends ./python-${PYTHON_VERSION_ALT}_1_amd64.deb \ && rm -rf python-${PYTHON_VERSION}_1_amd64.deb \ && rm -rf python-${PYTHON_VERSION_ALT}_1_amd64.deb \ + && /opt/python/${PYTHON_VERSION}/bin/python3 -m ensurepip --upgrade \ && /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install 'virtualenv<20' \ && /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install --upgrade setuptools \ && /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install --upgrade pip \ && /opt/python/${PYTHON_VERSION}/bin/python3 -m pip cache purge \ + && /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m ensurepip --upgrade \ && /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install 'virtualenv<20' \ && /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install --upgrade setuptools \ && /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install --upgrade pip \ From 892d78eb6eaae953c1e810cc28db393ab760ac25 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Wed, 29 May 2024 14:44:43 -0600 Subject: [PATCH 093/165] Update Workbench tests for >=2024.7 preview compatibility --- workbench/test/goss.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workbench/test/goss.yaml b/workbench/test/goss.yaml index 777a04eeb..bfbee8d03 100644 --- a/workbench/test/goss.yaml +++ b/workbench/test/goss.yaml @@ -70,8 +70,8 @@ file: owner: rstudio-server group: rstudio-server {{ $version_split := split "." .Env.RSW_VERSION }} - {{ if or (lt ($version_split._0 | atoi) 2022) (and (eq ($version_split._0 | atoi) 2022) (lt ($version_split._1 | atoi) 12)) }} - /opt/code-server/bin/code-server: + {{ if or (ge ($version_split._0 | atoi) 2025) (and (ge ($version_split._0 | atoi) 2024) (ge ($version_split._1 | atoi) 7)) }} + /usr/lib/rstudio-server/bin/pwb-code-server/bin/code-server: exists: true {{ else }} /usr/lib/rstudio-server/bin/code-server/bin/code-server: From c635edcffd839ea59f70642370b9f62323e5e039 Mon Sep 17 00:00:00 2001 From: David Kegley Date: Thu, 30 May 2024 10:31:10 -0400 Subject: [PATCH 094/165] Bump Connect version to 2024.05.0 --- Justfile | 2 +- connect-content-init/Dockerfile.ubuntu2204 | 2 +- connect-content-init/README.md | 6 +++--- connect/.env | 2 +- connect/Dockerfile.ubuntu2204 | 2 +- connect/README.md | 2 +- docker-bake.hcl | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Justfile b/Justfile index 4386afdb1..39086128f 100644 --- a/Justfile +++ b/Justfile @@ -7,7 +7,7 @@ sed_vars := if os() == "macos" { "-i ''" } else { "-i" } BUILDX_PATH := "" -RSC_VERSION := "2024.04.1" +RSC_VERSION := "2024.05.0" RSPM_VERSION := "2024.04.0-20" RSW_VERSION := "2024.04.1+748.pro2" diff --git a/connect-content-init/Dockerfile.ubuntu2204 b/connect-content-init/Dockerfile.ubuntu2204 index 7a4cfd4ca..3d9278cef 100644 --- a/connect-content-init/Dockerfile.ubuntu2204 +++ b/connect-content-init/Dockerfile.ubuntu2204 @@ -9,7 +9,7 @@ RUN apt-get update && \ apt-get install -y --no-install-recommends ca-certificates curl && \ rm -rf /var/lib/apt/lists/* -ARG RSC_VERSION=2024.04.1 +ARG RSC_VERSION=2024.05.0 SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN mkdir -p /rsc-staging && \ RSC_VERSION_URL=$(echo -n "${RSC_VERSION}" | sed 's/+/%2B/g') && \ diff --git a/connect-content-init/README.md b/connect-content-init/README.md index 4a6a58de8..3d8ce099a 100644 --- a/connect-content-init/README.md +++ b/connect-content-init/README.md @@ -9,7 +9,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2024.04.1`, `ubuntu2204-2024.04.1`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.05.0`, `ubuntu2204-2024.05.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) # RStudio Connect Content Init Container @@ -31,7 +31,7 @@ The version of the release package to use can be overridden with the `RSC_VERSION` build arg. ```console -just build ubuntu2204 2024.04.1 +just build ubuntu2204 2024.05.0 ``` ## Testing @@ -56,7 +56,7 @@ just test You can see the different layers that make up the image: ```console -docker history rstudio/rstudio-connect-content-init-preview:2024.04.1-dev-326 +docker history rstudio/rstudio-connect-content-init-preview:2024.05.0-dev-326 ``` NOTE: almost all the image size is pandoc. diff --git a/connect/.env b/connect/.env index b27a5daf5..bc292340a 100644 --- a/connect/.env +++ b/connect/.env @@ -1,4 +1,4 @@ -RSC_VERSION=2024.04.1 +RSC_VERSION=2024.05.0 R_VERSION=4.2.3 R_VERSION_ALT=4.1.3 PYTHON_VERSION=3.9.17 diff --git a/connect/Dockerfile.ubuntu2204 b/connect/Dockerfile.ubuntu2204 index cbea5ad99..dcbc35f9b 100644 --- a/connect/Dockerfile.ubuntu2204 +++ b/connect/Dockerfile.ubuntu2204 @@ -7,7 +7,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 RSC_VERSION=2024.04.1 +ARG RSC_VERSION=2024.05.0 ARG QUARTO_VERSION=1.4.552 ARG SCRIPTS_DIR=/opt/positscripts diff --git a/connect/README.md b/connect/README.md index 9215a5fd4..763b14280 100644 --- a/connect/README.md +++ b/connect/README.md @@ -7,7 +7,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2024.04.1`, `ubuntu2204-2024.04.1`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.05.0`, `ubuntu2204-2024.05.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) # What is Posit Connect? diff --git a/docker-bake.hcl b/docker-bake.hcl index f9169170d..92a36bc71 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -1,6 +1,6 @@ ### Variable definitions ### variable CONNECT_VERSION { - default = "2024.04.1" + default = "2024.05.0" } variable PACKAGE_MANAGER_VERSION { From 68565a53022284c859ecf1f21a31e8faed395f01 Mon Sep 17 00:00:00 2001 From: Aron Atkins Date: Fri, 24 May 2024 14:29:43 -0400 Subject: [PATCH 095/165] connect: install TensorFlow Serving Install the universal binary. No configuration modifications. Fixes #776 --- connect/Dockerfile.ubuntu2204 | 12 +++++++++++- connect/NEWS.md | 4 ++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/connect/Dockerfile.ubuntu2204 b/connect/Dockerfile.ubuntu2204 index dcbc35f9b..ed79fce8a 100644 --- a/connect/Dockerfile.ubuntu2204 +++ b/connect/Dockerfile.ubuntu2204 @@ -15,8 +15,18 @@ ARG SCRIPTS_DIR=/opt/positscripts RUN QUARTO_VERSION=${QUARTO_VERSION} ${SCRIPTS_DIR}/install_quarto.sh \ && ln -s /opt/quarto/${QUARTO_VERSION}/bin/quarto /usr/local/bin/quarto -### Install Connect and additional dependencies ### SHELL [ "/bin/bash", "-o", "pipefail", "-c"] + +### Install TensorFlow Serving ### +RUN echo "deb [arch=amd64] http://storage.googleapis.com/tensorflow-serving-apt stable tensorflow-model-server tensorflow-model-server-universal" > /etc/apt/sources.list.d/tensorflow-serving.list && \ + curl https://storage.googleapis.com/tensorflow-serving-apt/tensorflow-serving.release.pub.gpg | apt-key add - +RUN apt-get update \ + && apt-get install -yq --no-install-recommends \ + tensorflow-model-server-universal \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +### Install Connect and additional dependencies ### RUN apt-get update --fix-missing \ && apt-get install -yq --no-install-recommends \ bzip2 \ diff --git a/connect/NEWS.md b/connect/NEWS.md index 136c66cea..fa4d57f26 100644 --- a/connect/NEWS.md +++ b/connect/NEWS.md @@ -1,3 +1,7 @@ +# 2024-05-24 + +- Installs the TensorFlow Serving universal binary. + # 2024-04-30 - BREAKING: Upgrade the default Quarto version to 1.4.552. From 0ccbc5231d26fc3275476438ebefe3bbe2fda990 Mon Sep 17 00:00:00 2001 From: Aron Atkins Date: Fri, 24 May 2024 14:32:00 -0400 Subject: [PATCH 096/165] connect: enable TensorFlow Serving Builds upon #778 Fixes #777 --- connect/NEWS.md | 4 ++++ connect/rstudio-connect-float.gcfg | 4 ++++ connect/rstudio-connect.gcfg | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/connect/NEWS.md b/connect/NEWS.md index fa4d57f26..aed6cbe81 100644 --- a/connect/NEWS.md +++ b/connect/NEWS.md @@ -1,3 +1,7 @@ +# 2024-05-25 + +- Enables TensorFlow Serving. + # 2024-05-24 - Installs the TensorFlow Serving universal binary. diff --git a/connect/rstudio-connect-float.gcfg b/connect/rstudio-connect-float.gcfg index df12fe672..7cf34133c 100644 --- a/connect/rstudio-connect-float.gcfg +++ b/connect/rstudio-connect-float.gcfg @@ -41,6 +41,10 @@ Executable = /opt/python/{{PYTHON_VERSION_ALT}}/bin/python Enabled = true Executable = /opt/quarto/{{QUARTO_VERSION}}/bin/quarto +[TensorFlow] +Enabled = true +Executable = /usr/bin/tensorflow_model_server + ;[RPackageRepository "CRAN"] ;URL = https://demo.rstudiopm.com/all/__linux__/jammy/latest ; diff --git a/connect/rstudio-connect.gcfg b/connect/rstudio-connect.gcfg index 0cf5006d5..133126646 100644 --- a/connect/rstudio-connect.gcfg +++ b/connect/rstudio-connect.gcfg @@ -37,6 +37,10 @@ Executable = /opt/python/{{PYTHON_VERSION_ALT}}/bin/python Enabled = true Executable = /opt/quarto/{{QUARTO_VERSION}}/bin/quarto +[TensorFlow] +Enabled = true +Executable = /usr/bin/tensorflow_model_server + [RPackageRepository "CRAN"] URL = https://packagemanager.rstudio.com/cran/__linux__/jammy/latest From 28a1f46cb96858c1960f0c625eb745f3aabbcc4a Mon Sep 17 00:00:00 2001 From: David Kegley Date: Thu, 30 May 2024 10:48:15 -0400 Subject: [PATCH 097/165] Bump R version to 4.4.0 in Connect image --- connect/NEWS.md | 6 ++---- docker-bake.hcl | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/connect/NEWS.md b/connect/NEWS.md index aed6cbe81..313c43098 100644 --- a/connect/NEWS.md +++ b/connect/NEWS.md @@ -1,9 +1,7 @@ -# 2024-05-25 +# 2024-05-30 +- BREAKING: Upgrade the default R version to 4.4.0. R version 4.1.3 has been removed. - Enables TensorFlow Serving. - -# 2024-05-24 - - Installs the TensorFlow Serving universal binary. # 2024-04-30 diff --git a/docker-bake.hcl b/docker-bake.hcl index 92a36bc71..55f4e7f1f 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -118,7 +118,7 @@ variable PACKAGE_MANAGER_BUILD_MATRIX { variable CONNECT_BUILD_MATRIX { default = { builds = [ - {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.17", py_alternate = "3.8.17", quarto = DEFAULT_QUARTO_VERSION}, + {os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.2.3", py_primary = "3.9.17", py_alternate = "3.8.17", quarto = DEFAULT_QUARTO_VERSION}, ] } } From 1e43d3fdd9079484ce200a5f1e754365956d709a Mon Sep 17 00:00:00 2001 From: David Kegley Date: Thu, 30 May 2024 11:06:02 -0400 Subject: [PATCH 098/165] Bump Connect image R versions to 4.4.0 and 4.3.3 --- connect/NEWS.md | 2 +- docker-bake.hcl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/connect/NEWS.md b/connect/NEWS.md index 313c43098..69e820936 100644 --- a/connect/NEWS.md +++ b/connect/NEWS.md @@ -1,6 +1,6 @@ # 2024-05-30 -- BREAKING: Upgrade the default R version to 4.4.0. R version 4.1.3 has been removed. +- BREAKING: Upgrade installed R versions to 4.4.0 and 4.3.3. - Enables TensorFlow Serving. - Installs the TensorFlow Serving universal binary. diff --git a/docker-bake.hcl b/docker-bake.hcl index 55f4e7f1f..f3dd86843 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -118,7 +118,7 @@ variable PACKAGE_MANAGER_BUILD_MATRIX { variable CONNECT_BUILD_MATRIX { default = { builds = [ - {os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.2.3", py_primary = "3.9.17", py_alternate = "3.8.17", quarto = DEFAULT_QUARTO_VERSION}, + {os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.9.17", py_alternate = "3.8.17", quarto = DEFAULT_QUARTO_VERSION}, ] } } From 10d4acc849b17b8904dbe2d78f99f09e351d362e Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Thu, 30 May 2024 09:12:47 -0600 Subject: [PATCH 099/165] Update r-session-complete tests for >=2024.7 preview compatibility --- r-session-complete/test/goss.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/r-session-complete/test/goss.yaml b/r-session-complete/test/goss.yaml index 0cf724485..1c7bf3367 100644 --- a/r-session-complete/test/goss.yaml +++ b/r-session-complete/test/goss.yaml @@ -6,8 +6,8 @@ file: /usr/local/bin/jupyter: exists: true {{ $version_split := split "." .Env.RSW_VERSION }} - {{ if or (lt ($version_split._0 | atoi) 2022) (and (eq ($version_split._0 | atoi) 2022) (lt ($version_split._1 | atoi) 12)) }} - /opt/code-server/bin/code-server: + {{ if or (ge ($version_split._0 | atoi) 2025) (and (ge ($version_split._0 | atoi) 2024) (ge ($version_split._1 | atoi) 7)) }} + /usr/lib/rstudio-server/bin/pwb-code-server/bin/code-server: exists: true {{ else }} /usr/lib/rstudio-server/bin/code-server/bin/code-server: From 58b752696355d774860eedfb088862142408026d Mon Sep 17 00:00:00 2001 From: David Kegley Date: Thu, 30 May 2024 17:08:22 -0400 Subject: [PATCH 100/165] Bump python install versions for Connect --- connect/NEWS.md | 4 +++- docker-bake.hcl | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/connect/NEWS.md b/connect/NEWS.md index 69e820936..5db5e1b23 100644 --- a/connect/NEWS.md +++ b/connect/NEWS.md @@ -1,6 +1,8 @@ # 2024-05-30 -- BREAKING: Upgrade installed R versions to 4.4.0 and 4.3.3. +- BREAKING: + - Upgrade installed R versions to 4.4.0 and 4.3.3. + - Upgrade installed Python versions to 3.12.1 and 3.11.7. - Enables TensorFlow Serving. - Installs the TensorFlow Serving universal binary. diff --git a/docker-bake.hcl b/docker-bake.hcl index f3dd86843..5dcdeb03f 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -118,7 +118,7 @@ variable PACKAGE_MANAGER_BUILD_MATRIX { variable CONNECT_BUILD_MATRIX { default = { builds = [ - {os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.9.17", py_alternate = "3.8.17", quarto = DEFAULT_QUARTO_VERSION}, + {os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.12.1", py_alternate = "3.11.7", quarto = DEFAULT_QUARTO_VERSION}, ] } } From 1df874a8a41d15c5660aad5f35d0993bb08b9c22 Mon Sep 17 00:00:00 2001 From: Tyler Date: Thu, 30 May 2024 11:37:00 -0400 Subject: [PATCH 101/165] Bump PPM to 2024.04.2 Update R to version 4.4.0 --- Justfile | 2 +- docker-bake.hcl | 4 ++-- package-manager/.env | 4 ++-- package-manager/Dockerfile.ubuntu2204 | 2 +- package-manager/NEWS.md | 3 +++ package-manager/README.md | 24 ++++++++++++------------ 6 files changed, 21 insertions(+), 18 deletions(-) diff --git a/Justfile b/Justfile index 4386afdb1..54ab80eb1 100644 --- a/Justfile +++ b/Justfile @@ -8,7 +8,7 @@ sed_vars := if os() == "macos" { "-i ''" } else { "-i" } BUILDX_PATH := "" RSC_VERSION := "2024.04.1" -RSPM_VERSION := "2024.04.0-20" +RSPM_VERSION := "2024.04.2-24" RSW_VERSION := "2024.04.1+748.pro2" DRIVERS_VERSION := "2023.05.0" diff --git a/docker-bake.hcl b/docker-bake.hcl index f9169170d..297babdf6 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -4,7 +4,7 @@ variable CONNECT_VERSION { } variable PACKAGE_MANAGER_VERSION { - default = "2024.04.0-20" + default = "2024.04.2-24" } variable WORKBENCH_VERSION { @@ -110,7 +110,7 @@ variable PRO_BUILD_MATRIX { variable PACKAGE_MANAGER_BUILD_MATRIX { default = { builds = [ - {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.12.1", py_alternate = "3.11.7"}, + {os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.12.1", py_alternate = "3.11.7"}, ] } } diff --git a/package-manager/.env b/package-manager/.env index f24c50437..be9eb9540 100644 --- a/package-manager/.env +++ b/package-manager/.env @@ -1,5 +1,5 @@ -RSPM_VERSION=2024.04.0-20 -R_VERSION=4.2.3 +RSPM_VERSION=2024.04.2-24 +R_VERSION=4.4.0 R_VERSION_ALT=4.1.3 PYTHON_VERSION=3.9.17 PYTHON_VERSION_ALT=3.8.17 diff --git a/package-manager/Dockerfile.ubuntu2204 b/package-manager/Dockerfile.ubuntu2204 index fbe024470..b0005eef3 100644 --- a/package-manager/Dockerfile.ubuntu2204 +++ b/package-manager/Dockerfile.ubuntu2204 @@ -13,7 +13,7 @@ RUN /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install --no-cache-dir buil RUN /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install --no-cache-dir build virtualenv # Download RStudio Package Manager ---------------------------------------------# -ARG RSPM_VERSION=2024.04.0-20 +ARG RSPM_VERSION=2024.04.2-24 ARG RSPM_DOWNLOAD_URL=https://cdn.rstudio.com/package-manager/deb/amd64 RUN curl -O ${RSPM_DOWNLOAD_URL}/rstudio-pm_${RSPM_VERSION}_amd64.deb \ # Pre 7/25/23 packages diff --git a/package-manager/NEWS.md b/package-manager/NEWS.md index 353efa22f..a59cf4ffd 100644 --- a/package-manager/NEWS.md +++ b/package-manager/NEWS.md @@ -1,3 +1,6 @@ +# 2024-05-31 +- Update R to 4.4.0 + # 2024-01-11 - Update Python to 3.12.1 diff --git a/package-manager/README.md b/package-manager/README.md index 824a9dd2e..aade5bec1 100644 --- a/package-manager/README.md +++ b/package-manager/README.md @@ -6,16 +6,16 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2023.12.0`, `ubuntu2204-2023.12.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/package-manager/Dockerfile.ubuntu2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.04.2`, `ubuntu2204-2024.04.2`](https://github.com/rstudio/rstudio-docker-products/blob/main/package-manager/Dockerfile.ubuntu2204) # What is RStudio Package Manager? -Posit Package Manager, formerly RStudio Package Manager, is a repository management server to organize and centralize -R packages across your team, department, or entire organization. Get offline access to CRAN, automate CRAN syncs, -share local packages, restrict package access, find packages across repositories, and more. Experience reliable and +Posit Package Manager, formerly RStudio Package Manager, is a repository management server to organize and centralize +R packages across your team, department, or entire organization. Get offline access to CRAN, automate CRAN syncs, +share local packages, restrict package access, find packages across repositories, and more. Experience reliable and consistent package management, optimized for teams who use R. -The following documentation helps an administrator install and configure Package Manager. It provides information for +The following documentation helps an administrator install and configure Package Manager. It provides information for installing the product on different operating systems, upgrading, and configuring Package Manager. # Notice for support @@ -148,15 +148,15 @@ to [create and manage](https://docs.rstudio.com/rspm/admin/getting-started/confi *Note: This section **does not** apply to activations using license files.* There is currently a known licensing bug when using our products in containers. If the container is not stopped -gracefully, the license deactivation step may fail or be skipped. Failing to deactivate the license can result in a -"license leak" where a product activation is used up and cannot be deactivated using traditional methods as the +gracefully, the license deactivation step may fail or be skipped. Failing to deactivate the license can result in a +"license leak" where a product activation is used up and cannot be deactivated using traditional methods as the activation state on the container has been lost. -To avoid "leaking" licenses, we encourage users not to force kill containers and to use `--stop-timeout 120` and -`--time 120` for `docker run` and `docker stop` commands respectively. This helps ensure the deactivation script has +To avoid "leaking" licenses, we encourage users not to force kill containers and to use `--stop-timeout 120` and +`--time 120` for `docker run` and `docker stop` commands respectively. This helps ensure the deactivation script has ample time to run properly. -In some situations, it can be difficult or impossible to avoid a hard termination (e.g. power failure, +In some situations, it can be difficult or impossible to avoid a hard termination (e.g. power failure, critical error on host). Unfortunately, any of these cases can still cause a license to leak an activation. To help prevent a license leak in these situations, users can mount the following directories to persistent storage to preserve the license state data across restarts of the container. **These directories differ between products.** @@ -171,13 +171,13 @@ the license state data across restarts of the container. **These directories dif Please note that the files created in these directories are hardware locked and non-transferable between hosts. Due to the nature of the hardware fingerprinting algorithm, any low-level changes to the host or container can cause existing license state files to invalidate. To avoid this problem, we advise that product containers are gracefully shutdown -and allowed to deactivate prior to changing any hardware or firmware on the host (e.g. upgrading a network card or +and allowed to deactivate prior to changing any hardware or firmware on the host (e.g. upgrading a network card or updating BIOS) or the container (e.g. changing the network driver used or the allocated number of CPU cores). While preserving license state data *can* help avoid license leaks across restarts, it's not a guarantee. If you run into issues with your license, please do not hesitate to [contact Posit support](https://support.posit.co/hc/en-us). -While neither of these solutions will eliminate the problem, they should help mitigate it. We are still investigating a +While neither of these solutions will eliminate the problem, they should help mitigate it. We are still investigating a long-term solution. # Licensing From 3ada4d2e0f16492958dd88b5829641fb51ae9e32 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 10 Jun 2024 09:37:39 -0700 Subject: [PATCH 102/165] Revert "Bump PPM to 2024.04.2" --- Justfile | 2 +- docker-bake.hcl | 4 ++-- package-manager/.env | 4 ++-- package-manager/Dockerfile.ubuntu2204 | 2 +- package-manager/NEWS.md | 3 --- package-manager/README.md | 24 ++++++++++++------------ 6 files changed, 18 insertions(+), 21 deletions(-) diff --git a/Justfile b/Justfile index 54ab80eb1..4386afdb1 100644 --- a/Justfile +++ b/Justfile @@ -8,7 +8,7 @@ sed_vars := if os() == "macos" { "-i ''" } else { "-i" } BUILDX_PATH := "" RSC_VERSION := "2024.04.1" -RSPM_VERSION := "2024.04.2-24" +RSPM_VERSION := "2024.04.0-20" RSW_VERSION := "2024.04.1+748.pro2" DRIVERS_VERSION := "2023.05.0" diff --git a/docker-bake.hcl b/docker-bake.hcl index 297babdf6..f9169170d 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -4,7 +4,7 @@ variable CONNECT_VERSION { } variable PACKAGE_MANAGER_VERSION { - default = "2024.04.2-24" + default = "2024.04.0-20" } variable WORKBENCH_VERSION { @@ -110,7 +110,7 @@ variable PRO_BUILD_MATRIX { variable PACKAGE_MANAGER_BUILD_MATRIX { default = { builds = [ - {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.2.3", r_alternate = "4.1.3", py_primary = "3.12.1", py_alternate = "3.11.7"}, ] } } diff --git a/package-manager/.env b/package-manager/.env index be9eb9540..f24c50437 100644 --- a/package-manager/.env +++ b/package-manager/.env @@ -1,5 +1,5 @@ -RSPM_VERSION=2024.04.2-24 -R_VERSION=4.4.0 +RSPM_VERSION=2024.04.0-20 +R_VERSION=4.2.3 R_VERSION_ALT=4.1.3 PYTHON_VERSION=3.9.17 PYTHON_VERSION_ALT=3.8.17 diff --git a/package-manager/Dockerfile.ubuntu2204 b/package-manager/Dockerfile.ubuntu2204 index b0005eef3..fbe024470 100644 --- a/package-manager/Dockerfile.ubuntu2204 +++ b/package-manager/Dockerfile.ubuntu2204 @@ -13,7 +13,7 @@ RUN /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install --no-cache-dir buil RUN /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install --no-cache-dir build virtualenv # Download RStudio Package Manager ---------------------------------------------# -ARG RSPM_VERSION=2024.04.2-24 +ARG RSPM_VERSION=2024.04.0-20 ARG RSPM_DOWNLOAD_URL=https://cdn.rstudio.com/package-manager/deb/amd64 RUN curl -O ${RSPM_DOWNLOAD_URL}/rstudio-pm_${RSPM_VERSION}_amd64.deb \ # Pre 7/25/23 packages diff --git a/package-manager/NEWS.md b/package-manager/NEWS.md index a59cf4ffd..353efa22f 100644 --- a/package-manager/NEWS.md +++ b/package-manager/NEWS.md @@ -1,6 +1,3 @@ -# 2024-05-31 -- Update R to 4.4.0 - # 2024-01-11 - Update Python to 3.12.1 diff --git a/package-manager/README.md b/package-manager/README.md index aade5bec1..824a9dd2e 100644 --- a/package-manager/README.md +++ b/package-manager/README.md @@ -6,16 +6,16 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2024.04.2`, `ubuntu2204-2024.04.2`](https://github.com/rstudio/rstudio-docker-products/blob/main/package-manager/Dockerfile.ubuntu2204) +* [`jammy`, `ubuntu2204`, `jammy-2023.12.0`, `ubuntu2204-2023.12.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/package-manager/Dockerfile.ubuntu2204) # What is RStudio Package Manager? -Posit Package Manager, formerly RStudio Package Manager, is a repository management server to organize and centralize -R packages across your team, department, or entire organization. Get offline access to CRAN, automate CRAN syncs, -share local packages, restrict package access, find packages across repositories, and more. Experience reliable and +Posit Package Manager, formerly RStudio Package Manager, is a repository management server to organize and centralize +R packages across your team, department, or entire organization. Get offline access to CRAN, automate CRAN syncs, +share local packages, restrict package access, find packages across repositories, and more. Experience reliable and consistent package management, optimized for teams who use R. -The following documentation helps an administrator install and configure Package Manager. It provides information for +The following documentation helps an administrator install and configure Package Manager. It provides information for installing the product on different operating systems, upgrading, and configuring Package Manager. # Notice for support @@ -148,15 +148,15 @@ to [create and manage](https://docs.rstudio.com/rspm/admin/getting-started/confi *Note: This section **does not** apply to activations using license files.* There is currently a known licensing bug when using our products in containers. If the container is not stopped -gracefully, the license deactivation step may fail or be skipped. Failing to deactivate the license can result in a -"license leak" where a product activation is used up and cannot be deactivated using traditional methods as the +gracefully, the license deactivation step may fail or be skipped. Failing to deactivate the license can result in a +"license leak" where a product activation is used up and cannot be deactivated using traditional methods as the activation state on the container has been lost. -To avoid "leaking" licenses, we encourage users not to force kill containers and to use `--stop-timeout 120` and -`--time 120` for `docker run` and `docker stop` commands respectively. This helps ensure the deactivation script has +To avoid "leaking" licenses, we encourage users not to force kill containers and to use `--stop-timeout 120` and +`--time 120` for `docker run` and `docker stop` commands respectively. This helps ensure the deactivation script has ample time to run properly. -In some situations, it can be difficult or impossible to avoid a hard termination (e.g. power failure, +In some situations, it can be difficult or impossible to avoid a hard termination (e.g. power failure, critical error on host). Unfortunately, any of these cases can still cause a license to leak an activation. To help prevent a license leak in these situations, users can mount the following directories to persistent storage to preserve the license state data across restarts of the container. **These directories differ between products.** @@ -171,13 +171,13 @@ the license state data across restarts of the container. **These directories dif Please note that the files created in these directories are hardware locked and non-transferable between hosts. Due to the nature of the hardware fingerprinting algorithm, any low-level changes to the host or container can cause existing license state files to invalidate. To avoid this problem, we advise that product containers are gracefully shutdown -and allowed to deactivate prior to changing any hardware or firmware on the host (e.g. upgrading a network card or +and allowed to deactivate prior to changing any hardware or firmware on the host (e.g. upgrading a network card or updating BIOS) or the container (e.g. changing the network driver used or the allocated number of CPU cores). While preserving license state data *can* help avoid license leaks across restarts, it's not a guarantee. If you run into issues with your license, please do not hesitate to [contact Posit support](https://support.posit.co/hc/en-us). -While neither of these solutions will eliminate the problem, they should help mitigate it. We are still investigating a +While neither of these solutions will eliminate the problem, they should help mitigate it. We are still investigating a long-term solution. # Licensing From f0644af01ea40a01078225526b33051d9e050545 Mon Sep 17 00:00:00 2001 From: Gary Ritchie Date: Mon, 10 Jun 2024 16:28:28 -0600 Subject: [PATCH 103/165] bump pwb to 2024.04.2+764.pro1 --- Justfile | 2 +- docker-bake.hcl | 2 +- r-session-complete/.env | 2 +- r-session-complete/Dockerfile.ubuntu2204 | 2 +- r-session-complete/README.md | 2 +- workbench-for-google-cloud-workstations/.env | 4 ++-- workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 | 2 +- workbench-for-microsoft-azure-ml/.env | 2 +- workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 | 4 ++-- workbench/.env | 2 +- workbench/Dockerfile.ubuntu2204 | 2 +- workbench/README.md | 2 +- 12 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Justfile b/Justfile index 4386afdb1..cb4fec813 100644 --- a/Justfile +++ b/Justfile @@ -9,7 +9,7 @@ BUILDX_PATH := "" RSC_VERSION := "2024.04.1" RSPM_VERSION := "2024.04.0-20" -RSW_VERSION := "2024.04.1+748.pro2" +RSW_VERSION := "2024.04.2+764.pro1" DRIVERS_VERSION := "2023.05.0" DRIVERS_VERSION_RHEL := DRIVERS_VERSION + "-1" diff --git a/docker-bake.hcl b/docker-bake.hcl index f9169170d..0abaecd4b 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -8,7 +8,7 @@ variable PACKAGE_MANAGER_VERSION { } variable WORKBENCH_VERSION { - default = "2024.04.1+748.pro2" + default = "2024.04.2+764.pro1" } variable DRIVERS_VERSION { diff --git a/r-session-complete/.env b/r-session-complete/.env index e34997dfa..43fc3794d 100644 --- a/r-session-complete/.env +++ b/r-session-complete/.env @@ -1,4 +1,4 @@ R_VERSION=4.1.0 PYTHON_VERSION=3.9.5 -RSW_VERSION=2024.04.1+748.pro2 +RSW_VERSION=2024.04.2+764.pro1 DRIVERS_VERSION=2024.03.0-1 diff --git a/r-session-complete/Dockerfile.ubuntu2204 b/r-session-complete/Dockerfile.ubuntu2204 index 582e0aebe..8a608cc55 100644 --- a/r-session-complete/Dockerfile.ubuntu2204 +++ b/r-session-complete/Dockerfile.ubuntu2204 @@ -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.04.1+748.pro2 +ARG RSW_VERSION=2024.04.2+764.pro1 ARG RSW_NAME=rstudio-workbench ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64 ARG SCRIPTS_DIR=/opt/positscripts diff --git a/r-session-complete/README.md b/r-session-complete/README.md index dc50a380e..351078ce6 100644 --- a/r-session-complete/README.md +++ b/r-session-complete/README.md @@ -7,7 +7,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2024.04.0`, `ubuntu2204-2024.04.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/r-session-complete/Dockerfile.ubuntu2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.04.2`, `ubuntu2204-2024.04.2`](https://github.com/rstudio/rstudio-docker-products/blob/main/r-session-complete/Dockerfile.ubuntu2204) # What are the r-session-complete images? diff --git a/workbench-for-google-cloud-workstations/.env b/workbench-for-google-cloud-workstations/.env index c5c7cb4f7..114613d09 100644 --- a/workbench-for-google-cloud-workstations/.env +++ b/workbench-for-google-cloud-workstations/.env @@ -1,5 +1,5 @@ -RSW_VERSION=2024.04.1+748.pro2 -RSW_TAG_VERSION=2024.04.1-748.pro2 +RSW_VERSION=2024.04.2+764.pro1 +RSW_TAG_VERSION=2024.04.2-764.pro1 RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64 RSW_NAME=rstudio-workbench PYTHON_VERSION=3.11.9 diff --git a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 index 9675ac769..6347f4f73 100644 --- a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 +++ b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 @@ -9,7 +9,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.04.1+748.pro2 +ARG RSW_VERSION=2024.04.2+764.pro1 ARG RSW_NAME=rstudio-workbench ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64 ARG SCRIPTS_DIR=/opt/positscripts diff --git a/workbench-for-microsoft-azure-ml/.env b/workbench-for-microsoft-azure-ml/.env index 09c938258..5cb6825f1 100644 --- a/workbench-for-microsoft-azure-ml/.env +++ b/workbench-for-microsoft-azure-ml/.env @@ -1,4 +1,4 @@ -RSW_VERSION=2024.04.1+748.pro2 +RSW_VERSION=2024.04.2+764.pro1 RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/bionic/amd64 RSW_NAME=rstudio-workbench PYTHON_VERSION=3.9.14 diff --git a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 index 6be16cbc4..c77416b9f 100644 --- a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 +++ b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 @@ -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.04.1+748.pro2 +ARG RSW_VERSION=2024.04.2+764.pro1 ARG RSW_NAME=rstudio-workbench ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64 ARG SCRIPTS_DIR=/opt/positscripts @@ -178,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.04.1+748.pro2' \ + org.opencontainers.image.version='2024.04.2+764.pro1' \ org.opencontainers.image.url='https://www.rstudio.com/products/workbench/' diff --git a/workbench/.env b/workbench/.env index c75262549..c5852ccd4 100644 --- a/workbench/.env +++ b/workbench/.env @@ -1,4 +1,4 @@ -RSW_VERSION=2024.04.1+748.pro2 +RSW_VERSION=2024.04.2+764.pro1 RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/bionic/amd64 RSW_NAME=rstudio-workbench PYTHON_VERSION=3.9.17 diff --git a/workbench/Dockerfile.ubuntu2204 b/workbench/Dockerfile.ubuntu2204 index 74d74fa08..712dab62c 100644 --- a/workbench/Dockerfile.ubuntu2204 +++ b/workbench/Dockerfile.ubuntu2204 @@ -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.04.1+748.pro2 +ARG RSW_VERSION=2024.04.2+764.pro1 ARG RSW_NAME=rstudio-workbench ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64 ARG SCRIPTS_DIR=/opt/positscripts diff --git a/workbench/README.md b/workbench/README.md index 17020f9c8..92584be7c 100644 --- a/workbench/README.md +++ b/workbench/README.md @@ -7,7 +7,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2024.04.0`, `ubuntu2204-2024.04.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/workbench/Dockerfile.ubuntu2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.04.2`, `ubuntu2204-2024.04.2`](https://github.com/rstudio/rstudio-docker-products/blob/main/workbench/Dockerfile.ubuntu2204) # What is RStudio Workbench? From 9a017cf5c6c9b42e0188925c87d0a0b4bcc7339e Mon Sep 17 00:00:00 2001 From: Tyler Finethy Date: Fri, 14 Jun 2024 14:19:43 -0400 Subject: [PATCH 104/165] Reapply "Bump PPM to 2024.04.2" (#795) * Reapply "Bump PPM to 2024.04.2" This reverts commit 3ada4d2e0f16492958dd88b5829641fb51ae9e32. * Bump to patch 26 * Bump to patch 27 * Bump to patch 29 * Update Justfile Co-authored-by: Michael Thomson <56164984+fh-mthomson@users.noreply.github.com> --------- Co-authored-by: Michael Thomson <56164984+fh-mthomson@users.noreply.github.com> --- Justfile | 2 +- docker-bake.hcl | 4 ++-- package-manager/.env | 4 ++-- package-manager/Dockerfile.ubuntu2204 | 2 +- package-manager/NEWS.md | 3 +++ package-manager/README.md | 24 ++++++++++++------------ 6 files changed, 21 insertions(+), 18 deletions(-) diff --git a/Justfile b/Justfile index cb4fec813..e6facb032 100644 --- a/Justfile +++ b/Justfile @@ -8,7 +8,7 @@ sed_vars := if os() == "macos" { "-i ''" } else { "-i" } BUILDX_PATH := "" RSC_VERSION := "2024.04.1" -RSPM_VERSION := "2024.04.0-20" +RSPM_VERSION := "2024.04.2-29" RSW_VERSION := "2024.04.2+764.pro1" DRIVERS_VERSION := "2023.05.0" diff --git a/docker-bake.hcl b/docker-bake.hcl index 0abaecd4b..1dbc2483d 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -4,7 +4,7 @@ variable CONNECT_VERSION { } variable PACKAGE_MANAGER_VERSION { - default = "2024.04.0-20" + default = "2024.04.2-29" } variable WORKBENCH_VERSION { @@ -110,7 +110,7 @@ variable PRO_BUILD_MATRIX { variable PACKAGE_MANAGER_BUILD_MATRIX { default = { builds = [ - {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.12.1", py_alternate = "3.11.7"}, + {os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.12.1", py_alternate = "3.11.7"}, ] } } diff --git a/package-manager/.env b/package-manager/.env index f24c50437..7c279d2e1 100644 --- a/package-manager/.env +++ b/package-manager/.env @@ -1,5 +1,5 @@ -RSPM_VERSION=2024.04.0-20 -R_VERSION=4.2.3 +RSPM_VERSION=2024.04.2-29 +R_VERSION=4.4.0 R_VERSION_ALT=4.1.3 PYTHON_VERSION=3.9.17 PYTHON_VERSION_ALT=3.8.17 diff --git a/package-manager/Dockerfile.ubuntu2204 b/package-manager/Dockerfile.ubuntu2204 index fbe024470..7d6d63167 100644 --- a/package-manager/Dockerfile.ubuntu2204 +++ b/package-manager/Dockerfile.ubuntu2204 @@ -13,7 +13,7 @@ RUN /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install --no-cache-dir buil RUN /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install --no-cache-dir build virtualenv # Download RStudio Package Manager ---------------------------------------------# -ARG RSPM_VERSION=2024.04.0-20 +ARG RSPM_VERSION=2024.04.2-29 ARG RSPM_DOWNLOAD_URL=https://cdn.rstudio.com/package-manager/deb/amd64 RUN curl -O ${RSPM_DOWNLOAD_URL}/rstudio-pm_${RSPM_VERSION}_amd64.deb \ # Pre 7/25/23 packages diff --git a/package-manager/NEWS.md b/package-manager/NEWS.md index 353efa22f..a59cf4ffd 100644 --- a/package-manager/NEWS.md +++ b/package-manager/NEWS.md @@ -1,3 +1,6 @@ +# 2024-05-31 +- Update R to 4.4.0 + # 2024-01-11 - Update Python to 3.12.1 diff --git a/package-manager/README.md b/package-manager/README.md index 824a9dd2e..aade5bec1 100644 --- a/package-manager/README.md +++ b/package-manager/README.md @@ -6,16 +6,16 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2023.12.0`, `ubuntu2204-2023.12.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/package-manager/Dockerfile.ubuntu2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.04.2`, `ubuntu2204-2024.04.2`](https://github.com/rstudio/rstudio-docker-products/blob/main/package-manager/Dockerfile.ubuntu2204) # What is RStudio Package Manager? -Posit Package Manager, formerly RStudio Package Manager, is a repository management server to organize and centralize -R packages across your team, department, or entire organization. Get offline access to CRAN, automate CRAN syncs, -share local packages, restrict package access, find packages across repositories, and more. Experience reliable and +Posit Package Manager, formerly RStudio Package Manager, is a repository management server to organize and centralize +R packages across your team, department, or entire organization. Get offline access to CRAN, automate CRAN syncs, +share local packages, restrict package access, find packages across repositories, and more. Experience reliable and consistent package management, optimized for teams who use R. -The following documentation helps an administrator install and configure Package Manager. It provides information for +The following documentation helps an administrator install and configure Package Manager. It provides information for installing the product on different operating systems, upgrading, and configuring Package Manager. # Notice for support @@ -148,15 +148,15 @@ to [create and manage](https://docs.rstudio.com/rspm/admin/getting-started/confi *Note: This section **does not** apply to activations using license files.* There is currently a known licensing bug when using our products in containers. If the container is not stopped -gracefully, the license deactivation step may fail or be skipped. Failing to deactivate the license can result in a -"license leak" where a product activation is used up and cannot be deactivated using traditional methods as the +gracefully, the license deactivation step may fail or be skipped. Failing to deactivate the license can result in a +"license leak" where a product activation is used up and cannot be deactivated using traditional methods as the activation state on the container has been lost. -To avoid "leaking" licenses, we encourage users not to force kill containers and to use `--stop-timeout 120` and -`--time 120` for `docker run` and `docker stop` commands respectively. This helps ensure the deactivation script has +To avoid "leaking" licenses, we encourage users not to force kill containers and to use `--stop-timeout 120` and +`--time 120` for `docker run` and `docker stop` commands respectively. This helps ensure the deactivation script has ample time to run properly. -In some situations, it can be difficult or impossible to avoid a hard termination (e.g. power failure, +In some situations, it can be difficult or impossible to avoid a hard termination (e.g. power failure, critical error on host). Unfortunately, any of these cases can still cause a license to leak an activation. To help prevent a license leak in these situations, users can mount the following directories to persistent storage to preserve the license state data across restarts of the container. **These directories differ between products.** @@ -171,13 +171,13 @@ the license state data across restarts of the container. **These directories dif Please note that the files created in these directories are hardware locked and non-transferable between hosts. Due to the nature of the hardware fingerprinting algorithm, any low-level changes to the host or container can cause existing license state files to invalidate. To avoid this problem, we advise that product containers are gracefully shutdown -and allowed to deactivate prior to changing any hardware or firmware on the host (e.g. upgrading a network card or +and allowed to deactivate prior to changing any hardware or firmware on the host (e.g. upgrading a network card or updating BIOS) or the container (e.g. changing the network driver used or the allocated number of CPU cores). While preserving license state data *can* help avoid license leaks across restarts, it's not a guarantee. If you run into issues with your license, please do not hesitate to [contact Posit support](https://support.posit.co/hc/en-us). -While neither of these solutions will eliminate the problem, they should help mitigate it. We are still investigating a +While neither of these solutions will eliminate the problem, they should help mitigate it. We are still investigating a long-term solution. # Licensing From 5fa76cacb9c752d5b3502242a3591653cf2cc0df Mon Sep 17 00:00:00 2001 From: Tyler Finethy Date: Fri, 14 Jun 2024 14:19:43 -0400 Subject: [PATCH 105/165] Reapply "Bump PPM to 2024.04.2" (#795) * Reapply "Bump PPM to 2024.04.2" This reverts commit 3ada4d2e0f16492958dd88b5829641fb51ae9e32. * Bump to patch 26 * Bump to patch 27 * Bump to patch 29 * Update Justfile Co-authored-by: Michael Thomson <56164984+fh-mthomson@users.noreply.github.com> --------- Co-authored-by: Michael Thomson <56164984+fh-mthomson@users.noreply.github.com> --- Justfile | 2 +- docker-bake.hcl | 4 ++-- package-manager/.env | 4 ++-- package-manager/Dockerfile.ubuntu2204 | 2 +- package-manager/NEWS.md | 3 +++ package-manager/README.md | 24 ++++++++++++------------ 6 files changed, 21 insertions(+), 18 deletions(-) diff --git a/Justfile b/Justfile index 39086128f..e29554d01 100644 --- a/Justfile +++ b/Justfile @@ -8,7 +8,7 @@ sed_vars := if os() == "macos" { "-i ''" } else { "-i" } BUILDX_PATH := "" RSC_VERSION := "2024.05.0" -RSPM_VERSION := "2024.04.0-20" +RSPM_VERSION := "2024.04.2-29" RSW_VERSION := "2024.04.1+748.pro2" DRIVERS_VERSION := "2023.05.0" diff --git a/docker-bake.hcl b/docker-bake.hcl index 5dcdeb03f..64aeb20c4 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -4,7 +4,7 @@ variable CONNECT_VERSION { } variable PACKAGE_MANAGER_VERSION { - default = "2024.04.0-20" + default = "2024.04.2-29" } variable WORKBENCH_VERSION { @@ -110,7 +110,7 @@ variable PRO_BUILD_MATRIX { variable PACKAGE_MANAGER_BUILD_MATRIX { default = { builds = [ - {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.12.1", py_alternate = "3.11.7"}, + {os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.12.1", py_alternate = "3.11.7"}, ] } } diff --git a/package-manager/.env b/package-manager/.env index f24c50437..7c279d2e1 100644 --- a/package-manager/.env +++ b/package-manager/.env @@ -1,5 +1,5 @@ -RSPM_VERSION=2024.04.0-20 -R_VERSION=4.2.3 +RSPM_VERSION=2024.04.2-29 +R_VERSION=4.4.0 R_VERSION_ALT=4.1.3 PYTHON_VERSION=3.9.17 PYTHON_VERSION_ALT=3.8.17 diff --git a/package-manager/Dockerfile.ubuntu2204 b/package-manager/Dockerfile.ubuntu2204 index fbe024470..7d6d63167 100644 --- a/package-manager/Dockerfile.ubuntu2204 +++ b/package-manager/Dockerfile.ubuntu2204 @@ -13,7 +13,7 @@ RUN /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install --no-cache-dir buil RUN /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install --no-cache-dir build virtualenv # Download RStudio Package Manager ---------------------------------------------# -ARG RSPM_VERSION=2024.04.0-20 +ARG RSPM_VERSION=2024.04.2-29 ARG RSPM_DOWNLOAD_URL=https://cdn.rstudio.com/package-manager/deb/amd64 RUN curl -O ${RSPM_DOWNLOAD_URL}/rstudio-pm_${RSPM_VERSION}_amd64.deb \ # Pre 7/25/23 packages diff --git a/package-manager/NEWS.md b/package-manager/NEWS.md index 353efa22f..a59cf4ffd 100644 --- a/package-manager/NEWS.md +++ b/package-manager/NEWS.md @@ -1,3 +1,6 @@ +# 2024-05-31 +- Update R to 4.4.0 + # 2024-01-11 - Update Python to 3.12.1 diff --git a/package-manager/README.md b/package-manager/README.md index 824a9dd2e..aade5bec1 100644 --- a/package-manager/README.md +++ b/package-manager/README.md @@ -6,16 +6,16 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2023.12.0`, `ubuntu2204-2023.12.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/package-manager/Dockerfile.ubuntu2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.04.2`, `ubuntu2204-2024.04.2`](https://github.com/rstudio/rstudio-docker-products/blob/main/package-manager/Dockerfile.ubuntu2204) # What is RStudio Package Manager? -Posit Package Manager, formerly RStudio Package Manager, is a repository management server to organize and centralize -R packages across your team, department, or entire organization. Get offline access to CRAN, automate CRAN syncs, -share local packages, restrict package access, find packages across repositories, and more. Experience reliable and +Posit Package Manager, formerly RStudio Package Manager, is a repository management server to organize and centralize +R packages across your team, department, or entire organization. Get offline access to CRAN, automate CRAN syncs, +share local packages, restrict package access, find packages across repositories, and more. Experience reliable and consistent package management, optimized for teams who use R. -The following documentation helps an administrator install and configure Package Manager. It provides information for +The following documentation helps an administrator install and configure Package Manager. It provides information for installing the product on different operating systems, upgrading, and configuring Package Manager. # Notice for support @@ -148,15 +148,15 @@ to [create and manage](https://docs.rstudio.com/rspm/admin/getting-started/confi *Note: This section **does not** apply to activations using license files.* There is currently a known licensing bug when using our products in containers. If the container is not stopped -gracefully, the license deactivation step may fail or be skipped. Failing to deactivate the license can result in a -"license leak" where a product activation is used up and cannot be deactivated using traditional methods as the +gracefully, the license deactivation step may fail or be skipped. Failing to deactivate the license can result in a +"license leak" where a product activation is used up and cannot be deactivated using traditional methods as the activation state on the container has been lost. -To avoid "leaking" licenses, we encourage users not to force kill containers and to use `--stop-timeout 120` and -`--time 120` for `docker run` and `docker stop` commands respectively. This helps ensure the deactivation script has +To avoid "leaking" licenses, we encourage users not to force kill containers and to use `--stop-timeout 120` and +`--time 120` for `docker run` and `docker stop` commands respectively. This helps ensure the deactivation script has ample time to run properly. -In some situations, it can be difficult or impossible to avoid a hard termination (e.g. power failure, +In some situations, it can be difficult or impossible to avoid a hard termination (e.g. power failure, critical error on host). Unfortunately, any of these cases can still cause a license to leak an activation. To help prevent a license leak in these situations, users can mount the following directories to persistent storage to preserve the license state data across restarts of the container. **These directories differ between products.** @@ -171,13 +171,13 @@ the license state data across restarts of the container. **These directories dif Please note that the files created in these directories are hardware locked and non-transferable between hosts. Due to the nature of the hardware fingerprinting algorithm, any low-level changes to the host or container can cause existing license state files to invalidate. To avoid this problem, we advise that product containers are gracefully shutdown -and allowed to deactivate prior to changing any hardware or firmware on the host (e.g. upgrading a network card or +and allowed to deactivate prior to changing any hardware or firmware on the host (e.g. upgrading a network card or updating BIOS) or the container (e.g. changing the network driver used or the allocated number of CPU cores). While preserving license state data *can* help avoid license leaks across restarts, it's not a guarantee. If you run into issues with your license, please do not hesitate to [contact Posit support](https://support.posit.co/hc/en-us). -While neither of these solutions will eliminate the problem, they should help mitigate it. We are still investigating a +While neither of these solutions will eliminate the problem, they should help mitigate it. We are still investigating a long-term solution. # Licensing From 88cea83fa78d266ce8dec0abed13cecb6f265a26 Mon Sep 17 00:00:00 2001 From: David Kegley Date: Wed, 26 Jun 2024 12:25:14 -0400 Subject: [PATCH 106/165] Bump Connect to version 2024.06.0 --- Justfile | 2 +- connect-content-init/Dockerfile.ubuntu2204 | 2 +- connect-content-init/README.md | 6 +++--- connect/.env | 2 +- connect/Dockerfile.ubuntu2204 | 2 +- connect/README.md | 2 +- docker-bake.hcl | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Justfile b/Justfile index e6facb032..ea8acf778 100644 --- a/Justfile +++ b/Justfile @@ -7,7 +7,7 @@ sed_vars := if os() == "macos" { "-i ''" } else { "-i" } BUILDX_PATH := "" -RSC_VERSION := "2024.04.1" +RSC_VERSION := "2024.06.0" RSPM_VERSION := "2024.04.2-29" RSW_VERSION := "2024.04.2+764.pro1" diff --git a/connect-content-init/Dockerfile.ubuntu2204 b/connect-content-init/Dockerfile.ubuntu2204 index 3d9278cef..9816c8e68 100644 --- a/connect-content-init/Dockerfile.ubuntu2204 +++ b/connect-content-init/Dockerfile.ubuntu2204 @@ -9,7 +9,7 @@ RUN apt-get update && \ apt-get install -y --no-install-recommends ca-certificates curl && \ rm -rf /var/lib/apt/lists/* -ARG RSC_VERSION=2024.05.0 +ARG RSC_VERSION=2024.06.0 SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN mkdir -p /rsc-staging && \ RSC_VERSION_URL=$(echo -n "${RSC_VERSION}" | sed 's/+/%2B/g') && \ diff --git a/connect-content-init/README.md b/connect-content-init/README.md index 3d8ce099a..5bb8e7799 100644 --- a/connect-content-init/README.md +++ b/connect-content-init/README.md @@ -9,7 +9,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2024.05.0`, `ubuntu2204-2024.05.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.06.0`, `ubuntu2204-2024.06.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) # RStudio Connect Content Init Container @@ -31,7 +31,7 @@ The version of the release package to use can be overridden with the `RSC_VERSION` build arg. ```console -just build ubuntu2204 2024.05.0 +just build ubuntu2204 2024.06.0 ``` ## Testing @@ -56,7 +56,7 @@ just test You can see the different layers that make up the image: ```console -docker history rstudio/rstudio-connect-content-init-preview:2024.05.0-dev-326 +docker history rstudio/rstudio-connect-content-init-preview:2024.06.0-dev-326 ``` NOTE: almost all the image size is pandoc. diff --git a/connect/.env b/connect/.env index bc292340a..fca74e643 100644 --- a/connect/.env +++ b/connect/.env @@ -1,4 +1,4 @@ -RSC_VERSION=2024.05.0 +RSC_VERSION=2024.06.0 R_VERSION=4.2.3 R_VERSION_ALT=4.1.3 PYTHON_VERSION=3.9.17 diff --git a/connect/Dockerfile.ubuntu2204 b/connect/Dockerfile.ubuntu2204 index ed79fce8a..c314744c0 100644 --- a/connect/Dockerfile.ubuntu2204 +++ b/connect/Dockerfile.ubuntu2204 @@ -7,7 +7,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 RSC_VERSION=2024.05.0 +ARG RSC_VERSION=2024.06.0 ARG QUARTO_VERSION=1.4.552 ARG SCRIPTS_DIR=/opt/positscripts diff --git a/connect/README.md b/connect/README.md index 763b14280..c4203c557 100644 --- a/connect/README.md +++ b/connect/README.md @@ -7,7 +7,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2024.05.0`, `ubuntu2204-2024.05.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.06.0`, `ubuntu2204-2024.06.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) # What is Posit Connect? diff --git a/docker-bake.hcl b/docker-bake.hcl index 7c5f0ded0..c551b06ee 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -1,6 +1,6 @@ ### Variable definitions ### variable CONNECT_VERSION { - default = "2024.05.0" + default = "2024.06.0" } variable PACKAGE_MANAGER_VERSION { From 1041aac96b69c76d5c7af98a15151839c252fe10 Mon Sep 17 00:00:00 2001 From: Tyler Date: Thu, 27 Jun 2024 09:48:49 -0400 Subject: [PATCH 107/165] Bump PPM to 2024.04.4-35 --- Justfile | 2 +- docker-bake.hcl | 2 +- package-manager/.env | 2 +- package-manager/Dockerfile.ubuntu2204 | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Justfile b/Justfile index e6facb032..303432e66 100644 --- a/Justfile +++ b/Justfile @@ -8,7 +8,7 @@ sed_vars := if os() == "macos" { "-i ''" } else { "-i" } BUILDX_PATH := "" RSC_VERSION := "2024.04.1" -RSPM_VERSION := "2024.04.2-29" +RSPM_VERSION := "2024.04.4-35" RSW_VERSION := "2024.04.2+764.pro1" DRIVERS_VERSION := "2023.05.0" diff --git a/docker-bake.hcl b/docker-bake.hcl index 7c5f0ded0..848c86b91 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -4,7 +4,7 @@ variable CONNECT_VERSION { } variable PACKAGE_MANAGER_VERSION { - default = "2024.04.2-29" + default = "2024.04.4-35" } variable WORKBENCH_VERSION { diff --git a/package-manager/.env b/package-manager/.env index 7c279d2e1..8e974f21a 100644 --- a/package-manager/.env +++ b/package-manager/.env @@ -1,4 +1,4 @@ -RSPM_VERSION=2024.04.2-29 +RSPM_VERSION=2024.04.4-35 R_VERSION=4.4.0 R_VERSION_ALT=4.1.3 PYTHON_VERSION=3.9.17 diff --git a/package-manager/Dockerfile.ubuntu2204 b/package-manager/Dockerfile.ubuntu2204 index 7d6d63167..9d1f2d355 100644 --- a/package-manager/Dockerfile.ubuntu2204 +++ b/package-manager/Dockerfile.ubuntu2204 @@ -13,7 +13,7 @@ RUN /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install --no-cache-dir buil RUN /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install --no-cache-dir build virtualenv # Download RStudio Package Manager ---------------------------------------------# -ARG RSPM_VERSION=2024.04.2-29 +ARG RSPM_VERSION=2024.04.4-35 ARG RSPM_DOWNLOAD_URL=https://cdn.rstudio.com/package-manager/deb/amd64 RUN curl -O ${RSPM_DOWNLOAD_URL}/rstudio-pm_${RSPM_VERSION}_amd64.deb \ # Pre 7/25/23 packages From 5544ef822bd4073ecae37c560d8651200a9d00e9 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Thu, 27 Jun 2024 09:18:31 -0600 Subject: [PATCH 108/165] Update preview Python versions to latest --- docker-bake.preview.hcl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docker-bake.preview.hcl b/docker-bake.preview.hcl index 402868067..aaf736405 100644 --- a/docker-bake.preview.hcl +++ b/docker-bake.preview.hcl @@ -114,7 +114,7 @@ function get_tags { variable BASE_BUILD_MATRIX { default = { builds = [ - {os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.11.9", py_alternate = "3.10.14"}, + {os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.12.4", py_alternate = "3.11.9"}, ] } } @@ -126,7 +126,7 @@ variable PRO_BUILD_MATRIX { variable PACKAGE_MANAGER_BUILD_MATRIX { default = { builds = [ - {os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.11.9", py_alternate = "3.10.14"}, + {os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.12.4", py_alternate = "3.11.9"}, ] } } @@ -134,7 +134,7 @@ variable PACKAGE_MANAGER_BUILD_MATRIX { variable CONNECT_BUILD_MATRIX { default = { builds = [ - {os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.11.9", py_alternate = "3.10.14", quarto = DEFAULT_QUARTO_VERSION}, + {os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.12.4", py_alternate = "3.11.9", quarto = DEFAULT_QUARTO_VERSION}, ] } } @@ -150,7 +150,7 @@ variable CONNECT_CONTENT_INIT_BUILD_MATRIX { variable R_SESSION_COMPLETE_BUILD_MATRIX { default = { builds = [ - {os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.11.9", py_alternate = "3.10.14"}, + {os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.12.4", py_alternate = "3.11.9"}, ] } } @@ -158,7 +158,7 @@ variable R_SESSION_COMPLETE_BUILD_MATRIX { variable WORKBENCH_BUILD_MATRIX { default = { builds = [ - {os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.11.9", py_alternate = "3.10.14"}, + {os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.12.4", py_alternate = "3.11.9"}, ] } } From c50c29d5a73259bb244ae92d9f87a51e27d41103 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Thu, 27 Jun 2024 09:18:43 -0600 Subject: [PATCH 109/165] Update Quarto to latest release bugfix --- docker-bake.preview.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-bake.preview.hcl b/docker-bake.preview.hcl index aaf736405..2c4ed0103 100644 --- a/docker-bake.preview.hcl +++ b/docker-bake.preview.hcl @@ -28,7 +28,7 @@ variable DRIVERS_VERSION { } variable DEFAULT_QUARTO_VERSION { - default = "1.4.552" + default = "1.4.556" } variable DEFAULT_JUPYTERLAB_VERSION { From 55cf9eb8f9d829d50e20ecc57c976bc7adfd3719 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Thu, 27 Jun 2024 09:32:29 -0600 Subject: [PATCH 110/165] [CVE-2024-38526] Update Quarto to 1.4.556 --- connect/Dockerfile.ubuntu2204 | 2 +- docker-bake.hcl | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/connect/Dockerfile.ubuntu2204 b/connect/Dockerfile.ubuntu2204 index c314744c0..4701fcf5f 100644 --- a/connect/Dockerfile.ubuntu2204 +++ b/connect/Dockerfile.ubuntu2204 @@ -8,7 +8,7 @@ ARG R_VERSION_ALT=4.1.3 ARG PYTHON_VERSION=3.9.17 ARG PYTHON_VERSION_ALT=3.8.17 ARG RSC_VERSION=2024.06.0 -ARG QUARTO_VERSION=1.4.552 +ARG QUARTO_VERSION=1.4.556 ARG SCRIPTS_DIR=/opt/positscripts ### Install Quarto ### diff --git a/docker-bake.hcl b/docker-bake.hcl index c551b06ee..572fe9182 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -16,7 +16,7 @@ variable DRIVERS_VERSION { } variable DEFAULT_QUARTO_VERSION { - default = "1.4.552" + default = "1.4.556" } variable DEFAULT_JUPYTERLAB_VERSION { @@ -158,6 +158,9 @@ variable CONTENT_BUILD_MATRIX { # R-4.4, Python-3.12, Quarto-1.4. {os = "ubuntu2204", os_alt = "jammy", r = "4.4.0", py = "3.12.3", drivers = "2024.03.0", quarto = "1.4.553"}, + + # R-4.4, Python-3.12.4, Quarto-1.4.556 (polyfill.js vulnerability patch) + {os = "ubuntu2204", os_alt = "jammy", r = "4.4.0", py = "3.12.4", drivers = "2024.03.0", quarto = "1.4.553"}, ] } } From 19ff5412863f19611f35803985ba27d44dffb7e5 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Thu, 27 Jun 2024 09:44:14 -0600 Subject: [PATCH 111/165] Update justfile Quarto --- Justfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Justfile b/Justfile index ea8acf778..05b29b832 100644 --- a/Justfile +++ b/Justfile @@ -22,7 +22,7 @@ PYTHON_VERSION_ALT := "3.8.17" PYTHON_VERSION_RHEL := "3.9.14" PYTHON_VERSION_ALT_RHEL := "3.8.15" -QUARTO_VERSION := "1.4.553" +QUARTO_VERSION := "1.4.556" export RSC_LICENSE := "" export RSPM_LICENSE := "" From 3213ef43395476b261a67e6ff2db8e0c17973eb3 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Thu, 27 Jun 2024 09:55:56 -0600 Subject: [PATCH 112/165] Update content image to R 4.4.1 --- docker-bake.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-bake.hcl b/docker-bake.hcl index 572fe9182..116953d0b 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -160,7 +160,7 @@ variable CONTENT_BUILD_MATRIX { {os = "ubuntu2204", os_alt = "jammy", r = "4.4.0", py = "3.12.3", drivers = "2024.03.0", quarto = "1.4.553"}, # R-4.4, Python-3.12.4, Quarto-1.4.556 (polyfill.js vulnerability patch) - {os = "ubuntu2204", os_alt = "jammy", r = "4.4.0", py = "3.12.4", drivers = "2024.03.0", quarto = "1.4.553"}, + {os = "ubuntu2204", os_alt = "jammy", r = "4.4.1", py = "3.12.4", drivers = "2024.03.0", quarto = "1.4.553"}, ] } } From 217bcca89b4d0d6169a8cc9f32d6b4b342e760c7 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Thu, 27 Jun 2024 09:57:17 -0600 Subject: [PATCH 113/165] Update quarto patch miss --- docker-bake.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-bake.hcl b/docker-bake.hcl index 116953d0b..5122f90a0 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -160,7 +160,7 @@ variable CONTENT_BUILD_MATRIX { {os = "ubuntu2204", os_alt = "jammy", r = "4.4.0", py = "3.12.3", drivers = "2024.03.0", quarto = "1.4.553"}, # R-4.4, Python-3.12.4, Quarto-1.4.556 (polyfill.js vulnerability patch) - {os = "ubuntu2204", os_alt = "jammy", r = "4.4.1", py = "3.12.4", drivers = "2024.03.0", quarto = "1.4.553"}, + {os = "ubuntu2204", os_alt = "jammy", r = "4.4.1", py = "3.12.4", drivers = "2024.03.0", quarto = "1.4.556"}, ] } } From fddd4dfdb53ac49bfe2cf05efeb9216c72e3a00d Mon Sep 17 00:00:00 2001 From: Tyler Finethy Date: Thu, 27 Jun 2024 13:35:32 -0400 Subject: [PATCH 114/165] Merge pull request #803 from rstudio/tylfin/ppm-2024.04.4 Bump PPM to 2024.04.4-35 --- Justfile | 2 +- docker-bake.hcl | 2 +- package-manager/.env | 2 +- package-manager/Dockerfile.ubuntu2204 | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Justfile b/Justfile index ea8acf778..6794c383b 100644 --- a/Justfile +++ b/Justfile @@ -8,7 +8,7 @@ sed_vars := if os() == "macos" { "-i ''" } else { "-i" } BUILDX_PATH := "" RSC_VERSION := "2024.06.0" -RSPM_VERSION := "2024.04.2-29" +RSPM_VERSION := "2024.04.4-35" RSW_VERSION := "2024.04.2+764.pro1" DRIVERS_VERSION := "2023.05.0" diff --git a/docker-bake.hcl b/docker-bake.hcl index c551b06ee..b04d075c0 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -4,7 +4,7 @@ variable CONNECT_VERSION { } variable PACKAGE_MANAGER_VERSION { - default = "2024.04.2-29" + default = "2024.04.4-35" } variable WORKBENCH_VERSION { diff --git a/package-manager/.env b/package-manager/.env index 7c279d2e1..8e974f21a 100644 --- a/package-manager/.env +++ b/package-manager/.env @@ -1,4 +1,4 @@ -RSPM_VERSION=2024.04.2-29 +RSPM_VERSION=2024.04.4-35 R_VERSION=4.4.0 R_VERSION_ALT=4.1.3 PYTHON_VERSION=3.9.17 diff --git a/package-manager/Dockerfile.ubuntu2204 b/package-manager/Dockerfile.ubuntu2204 index 7d6d63167..9d1f2d355 100644 --- a/package-manager/Dockerfile.ubuntu2204 +++ b/package-manager/Dockerfile.ubuntu2204 @@ -13,7 +13,7 @@ RUN /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install --no-cache-dir buil RUN /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install --no-cache-dir build virtualenv # Download RStudio Package Manager ---------------------------------------------# -ARG RSPM_VERSION=2024.04.2-29 +ARG RSPM_VERSION=2024.04.4-35 ARG RSPM_DOWNLOAD_URL=https://cdn.rstudio.com/package-manager/deb/amd64 RUN curl -O ${RSPM_DOWNLOAD_URL}/rstudio-pm_${RSPM_VERSION}_amd64.deb \ # Pre 7/25/23 packages From fc31fb3d40bd4d25693dbeeea35997497ec21bea Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Thu, 27 Jun 2024 12:02:59 -0600 Subject: [PATCH 115/165] Update Quarto patch to 1.4.557 --- Justfile | 2 +- ci.Justfile | 2 +- connect/Dockerfile.ubuntu2204 | 2 +- docker-bake.hcl | 6 +++--- docker-bake.preview.hcl | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Justfile b/Justfile index e4850d5a4..341c831af 100644 --- a/Justfile +++ b/Justfile @@ -22,7 +22,7 @@ PYTHON_VERSION_ALT := "3.8.17" PYTHON_VERSION_RHEL := "3.9.14" PYTHON_VERSION_ALT_RHEL := "3.8.15" -QUARTO_VERSION := "1.4.556" +QUARTO_VERSION := "1.4.557" export RSC_LICENSE := "" export RSPM_LICENSE := "" diff --git a/ci.Justfile b/ci.Justfile index 06324e8ec..1de52f56d 100644 --- a/ci.Justfile +++ b/ci.Justfile @@ -12,7 +12,7 @@ PYTHON_VERSION_ALT := "3.8.17" DRIVERS_VERSION := "2024.03.0" DRIVERS_VERSION_RHEL := DRIVERS_VERSION + "-1" -QUARTO_VERSION := "1.3.340" +QUARTO_VERSION := "1.4.557" # just _get-os-alias jammy _get-os-alias OS: diff --git a/connect/Dockerfile.ubuntu2204 b/connect/Dockerfile.ubuntu2204 index 4701fcf5f..593fe1d31 100644 --- a/connect/Dockerfile.ubuntu2204 +++ b/connect/Dockerfile.ubuntu2204 @@ -8,7 +8,7 @@ ARG R_VERSION_ALT=4.1.3 ARG PYTHON_VERSION=3.9.17 ARG PYTHON_VERSION_ALT=3.8.17 ARG RSC_VERSION=2024.06.0 -ARG QUARTO_VERSION=1.4.556 +ARG QUARTO_VERSION=1.4.557 ARG SCRIPTS_DIR=/opt/positscripts ### Install Quarto ### diff --git a/docker-bake.hcl b/docker-bake.hcl index 78110c7c6..8cc7fc333 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -16,7 +16,7 @@ variable DRIVERS_VERSION { } variable DEFAULT_QUARTO_VERSION { - default = "1.4.556" + default = "1.4.557" } variable DEFAULT_JUPYTERLAB_VERSION { @@ -159,8 +159,8 @@ variable CONTENT_BUILD_MATRIX { # R-4.4, Python-3.12, Quarto-1.4. {os = "ubuntu2204", os_alt = "jammy", r = "4.4.0", py = "3.12.3", drivers = "2024.03.0", quarto = "1.4.553"}, - # R-4.4, Python-3.12.4, Quarto-1.4.556 (polyfill.js vulnerability patch) - {os = "ubuntu2204", os_alt = "jammy", r = "4.4.1", py = "3.12.4", drivers = "2024.03.0", quarto = "1.4.556"}, + # R-4.4, Python-3.12.4, Quarto-1.4.557 (polyfill.js vulnerability patch) + {os = "ubuntu2204", os_alt = "jammy", r = "4.4.1", py = "3.12.4", drivers = "2024.03.0", quarto = "1.4.557"}, ] } } diff --git a/docker-bake.preview.hcl b/docker-bake.preview.hcl index 2c4ed0103..400b13f73 100644 --- a/docker-bake.preview.hcl +++ b/docker-bake.preview.hcl @@ -28,7 +28,7 @@ variable DRIVERS_VERSION { } variable DEFAULT_QUARTO_VERSION { - default = "1.4.556" + default = "1.4.557" } variable DEFAULT_JUPYTERLAB_VERSION { @@ -227,7 +227,7 @@ target "product-base-dev" { PYTHON_VERSION = builds.py_primary PYTHON_VERSION_ALT = builds.py_alternate TINI_VERSION = "0.19.0" - QUARTO_VERSION = "1.3.340" + QUARTO_VERSION = "1.4.557" } } From 8766a3888c19bc359d8a9aae17dfb1b49082af3d Mon Sep 17 00:00:00 2001 From: Sam Cofer Date: Fri, 28 Jun 2024 11:16:45 -0500 Subject: [PATCH 116/165] Add a new version of the tags on Connect content images --- docker-bake.hcl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker-bake.hcl b/docker-bake.hcl index 8cc7fc333..ac6fe5fa5 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -359,6 +359,10 @@ target "content-base" { "ghcr.io/rstudio/content-base:r${builds.r}-py${builds.py}-${builds.os_alt}", "docker.io/rstudio/content-base:r${builds.r}-py${builds.py}-${builds.os}", "docker.io/rstudio/content-base:r${builds.r}-py${builds.py}-${builds.os_alt}", + "ghcr.io/rstudio/content-base:r${builds.r}-py${builds.py}-quarto${builds.quarto}-${builds.os}", + "ghcr.io/rstudio/content-base:r${builds.r}-py${builds.py}-quarto${builds.quarto}-${builds.os_alt}", + "docker.io/rstudio/content-base:r${builds.r}-py${builds.py}-quarto${builds.quarto}-${builds.os}", + "docker.io/rstudio/content-base:r${builds.r}-py${builds.py}-quarto${builds.quarto}-${builds.os_alt}", ] dockerfile = "Dockerfile.${builds.os}" From 5a080bdb08bec55d78a231aa9ae21917ad3ddce1 Mon Sep 17 00:00:00 2001 From: Kelli Fagan Date: Fri, 5 Jul 2024 11:33:25 -0700 Subject: [PATCH 117/165] * Upgrade VS Code Extensions REditorSupport.r@2.6.1 -> REditorSupport.r@2.8.2 adding posit.shiny extension --- r-session-complete/vscode.extensions.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/r-session-complete/vscode.extensions.conf b/r-session-complete/vscode.extensions.conf index 11b0a817b..0e38faabc 100644 --- a/r-session-complete/vscode.extensions.conf +++ b/r-session-complete/vscode.extensions.conf @@ -1,3 +1,4 @@ quarto.quarto -REditorSupport.r@2.6.1 +REditorSupport.r@2.8.2 ms-python.python@2023.6.1 +posit.shiny From ba48276b1c3928bb5c32ba3f821eefd03558ce04 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 15 Jul 2024 09:32:11 -0600 Subject: [PATCH 118/165] Implement Snyk CLI scanning (#811) * Add script for scanning bake artifacts with Snyk * Add sarif output to test command defaults * Add default options for sbom * Implement Snyk scan in CI * Add SNYK_TOKEN as secret and pass to composite action * Convert snyk scan to non-failing test * Fix sarif upload * Exclude base image vulnerabilities * Make project-name broadest tag Limit severity to HIGH or greater Utilize .snyk policy files where applicable * Set up ignores and report current vulnerabilities upstream * Run snyk code test as part of linting * Quote SNYK_ORG * Rever snyk code test changes * Pass SNYK_ORG to action * Fix snyk_bake_artifacts.py docstring * Remove cert copy --- .github/actions/bake-test-push/action.yml | 44 ++++- .../actions/build-test-scan-push/action.yaml | 180 ------------------ .github/workflows/build-bake-preview.yaml | 18 ++ .github/workflows/build-bake.yaml | 18 ++ .github/workflows/lint.yaml | 2 +- Justfile | 61 ++++++ connect/.snyk | 10 + docker-bake.hcl | 4 +- package-manager/.snyk | 12 ++ r-session-complete/.snyk | 17 ++ tools/snyk_bake_artifacts.py | 147 ++++++++++++++ workbench-for-google-cloud-workstations/.snyk | 22 +++ .../Dockerfile.ubuntu2204 | 1 - workbench-for-microsoft-azure-ml/.snyk | 17 ++ workbench/.snyk | 17 ++ 15 files changed, 385 insertions(+), 185 deletions(-) delete mode 100644 .github/actions/build-test-scan-push/action.yaml create mode 100644 connect/.snyk create mode 100644 package-manager/.snyk create mode 100644 r-session-complete/.snyk create mode 100644 tools/snyk_bake_artifacts.py create mode 100644 workbench-for-google-cloud-workstations/.snyk create mode 100644 workbench-for-microsoft-azure-ml/.snyk create mode 100644 workbench/.snyk diff --git a/.github/actions/bake-test-push/action.yml b/.github/actions/bake-test-push/action.yml index 066e0bc9f..10436d91d 100644 --- a/.github/actions/bake-test-push/action.yml +++ b/.github/actions/bake-test-push/action.yml @@ -17,6 +17,10 @@ inputs: description: Flag to test image once built default: true type: boolean + scan-image: + description: Flag to scan image for vulnerabilities once built + default: true + type: boolean push-image: description: Flag to push image once built default: false @@ -37,6 +41,14 @@ inputs: description: JSON for authenticating Google Cloud Platform default: "" type: string + snyk-org: + description: Organization ID for Snyk + default: "" + type: string + snyk-token: + description: Token for authenticating with Snyk + default: "" + type: string runs: using: "composite" @@ -47,6 +59,13 @@ runs: env: GITHUB_TOKEN: ${{ inputs.ghcr-token }} + - uses: snyk/actions/setup@master + + - name: Snyk auth + shell: bash + run: | + snyk auth ${{ inputs.snyk-token }} + - uses: actions/setup-python@v5 with: python-version: '3.12' @@ -109,7 +128,30 @@ runs: - name: Test shell: bash run: | - just test "${{ inputs.target }}" "${{ inputs.bakefile }}" + if [[ "${{ inputs.test-image }}" == "true" ]]; then + just test "${{ inputs.target }}" "${{ inputs.bakefile }}" + fi + + - name: Scan + continue-on-error: true + env: + SNYK_ORG: ${{ inputs.snyk-org }} + shell: bash + run: | + if [[ "${{ inputs.scan-image }}" == "true" ]]; then + if [[ "${{ inputs.push-image }}" == "true" ]]; then + just snyk-monitor "${{ inputs.target }}" "${{ inputs.bakefile }}" + else + just snyk-test "${{ inputs.target }}" "${{ inputs.bakefile }}" + fi + fi + + - name: Upload results + uses: github/codeql-action/upload-sarif@v3 + continue-on-error: true + with: + sarif_file: "container.sarif" + category: "${{ inputs.target }}-snyk-vulnerabilities" - name: Push - ${{ inputs.push-image }} uses: docker/bake-action@v4 diff --git a/.github/actions/build-test-scan-push/action.yaml b/.github/actions/build-test-scan-push/action.yaml deleted file mode 100644 index 11198efa8..000000000 --- a/.github/actions/build-test-scan-push/action.yaml +++ /dev/null @@ -1,180 +0,0 @@ -name: 'Build/Test/Scan/Push Image' -inputs: - context: - description: Path to the directory of the Dockerfile - required: true - type: string - os: - description: Target OS to build, the same as the extension of the Dockerfile - default: ubuntu2204 - type: string - product: - description: Product being built - type: string - build-args: - description: JSON list of build args for the built image - required: true - type: string - image-tags: - description: List of tags for the built image - required: true - type: string - test-image: - description: Flag to test image once built - default: true - type: boolean - snyk-token: - description: Username for authentication with Snyk for scanning images - type: string - snyk-org-id: - description: Snyk Organization ID to publish scans to - type: string - push-image: - description: Flag to push image once built - default: false - type: boolean - ghcr-token: - description: Username for authentication with GHCR.io - required: true - type: string - dockerhub-username: - description: Username for authentication with DockerHub - required: true - type: string - dockerhub-token: - description: Username for authentication with DockerHub - required: true - type: string - gcp-json: - description: JSON for authenticating Google Cloud Platform - default: "" - type: string - -runs: - using: "composite" - steps: - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space@v1.3.1 - 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 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ inputs.ghcr-token }} - - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ inputs.dockerhub-username }} - password: ${{ inputs.dockerhub-token }} - - - name: Login to GCAR us-central1 - continue-on-error: true - uses: docker/login-action@v3 - with: - registry: us-central1-docker.pkg.dev - username: _json_key - password: '${{ inputs.gcp-json }}' - - - name: Login to GCAR us - continue-on-error: true - uses: docker/login-action@v3 - with: - registry: us-docker.pkg.dev - username: _json_key - password: '${{ inputs.gcp-json }}' - - - name: Login to GCAR asia - continue-on-error: true - uses: docker/login-action@v3 - with: - registry: asia-docker.pkg.dev - username: _json_key - password: '${{ inputs.gcp-json }}' - - - name: Login to GCAR europe - continue-on-error: true - uses: docker/login-action@v3 - with: - registry: europe-docker.pkg.dev - username: _json_key - password: '${{ inputs.gcp-json }}' - - - name: Build - id: image-build - uses: docker/build-push-action@v5 - with: - load: true - context: ${{ inputs.context }} - file: ${{ inputs.context }}/Dockerfile.${{ inputs.os }} - build-args: | - ${{ inputs.build-args }} - tags: ${{ inputs.image-tags }} - - - name: Get first tag - shell: bash - id: first-tag - run: | - IMG_TAGS="${{ inputs.image-tags }}" - FIRST_TAG=$(cut -d "," -f 1 <<< "${IMG_TAGS//$'\n'/}") - echo "$FIRST_TAG" - echo "FIRST_TAG=$FIRST_TAG" >> $GITHUB_OUTPUT - - # We have to use bash logic because step "if"s don't work in composite actions - - name: Test - ${{ inputs.test-image }} - shell: bash - run: | - if [[ "${{ inputs.test-image }}" == "true" ]]; then - echo "${{ inputs.build-args }}" > ${{ inputs.context }}/.env - echo "OS=${{ inputs.os }}" >> ${{ inputs.context }}/.env - cat ${{ inputs.context }}/.env - IMAGE_NAME=${{ steps.first-tag.outputs.FIRST_TAG }} docker-compose -f ${{ inputs.context }}/docker-compose.test.yml run sut - fi - - - name: Evaluate Snyk command - id: eval-snyk-command - shell: bash - run: | - if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then - SNYK_COMMAND="monitor" - else - SNYK_COMMAND="test" - fi - echo "SNYK_COMMAND=$SNYK_COMMAND" >> $GITHUB_OUTPUT - - - name: Run Snyk ${{ steps.eval-snyk-command.outputs.SNYK_COMMAND }} - continue-on-error: true - uses: snyk/actions/docker@master - env: - SNYK_TOKEN: ${{ inputs.snyk-token }} - with: - image: ${{ steps.first-tag.outputs.FIRST_TAG }} - args: | - --file=${{ inputs.context }}/Dockerfile.${{ inputs.os }} \ - --org=${{ inputs.snyk-org-id }} \ - --project-name=${{ steps.first-tag.FIRST_TAG }} \ - --tags=product=${{ inputs.product }},os=${{ inputs.os }} \ - --exclude-base-image-vulns \ - --app-vulns - command: ${{ steps.eval-snyk-command.outputs.SNYK_COMMAND }} - - - name: Push - ${{ inputs.push-image }} - uses: docker/build-push-action@v5 - with: - push: ${{ inputs.push-image }} - context: ${{ inputs.context }} - file: ${{ inputs.context }}/Dockerfile.${{ inputs.os }} - build-args: ${{ inputs.build-args }} - tags: ${{ inputs.image-tags }} diff --git a/.github/workflows/build-bake-preview.yaml b/.github/workflows/build-bake-preview.yaml index aedddb101..c95dea69a 100644 --- a/.github/workflows/build-bake-preview.yaml +++ b/.github/workflows/build-bake-preview.yaml @@ -99,6 +99,8 @@ jobs: 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 }}' connect-daily: needs: [versions] @@ -137,6 +139,8 @@ jobs: 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 }}' connect-content-init-daily: needs: [versions] @@ -175,6 +179,8 @@ jobs: 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 }}' package-manager-preview: needs: [versions] @@ -213,6 +219,8 @@ jobs: 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 }}' package-manager-daily: needs: [versions] @@ -251,6 +259,8 @@ jobs: 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 }}' r-session-complete-preview: needs: [versions] @@ -289,6 +299,8 @@ jobs: 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 }}' r-session-complete-daily: needs: [versions] @@ -327,6 +339,8 @@ jobs: 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 }}' workbench-preview: needs: [versions] @@ -365,6 +379,8 @@ jobs: 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 }}' workbench-daily: needs: [versions] @@ -403,3 +419,5 @@ jobs: 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 }}' diff --git a/.github/workflows/build-bake.yaml b/.github/workflows/build-bake.yaml index a1c999b21..50b2cd45d 100644 --- a/.github/workflows/build-bake.yaml +++ b/.github/workflows/build-bake.yaml @@ -63,6 +63,8 @@ jobs: 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 }}' connect: needs: [setup] @@ -96,6 +98,8 @@ jobs: 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 }}' connect-content-init: needs: [setup] @@ -129,6 +133,8 @@ jobs: 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 }}' content: needs: [setup] @@ -162,6 +168,8 @@ jobs: 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 }}' package-manager: needs: [setup] @@ -195,6 +203,8 @@ jobs: 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 }}' r-session-complete: needs: [setup] @@ -228,6 +238,8 @@ jobs: 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 }}' workbench: needs: [setup] @@ -261,6 +273,8 @@ jobs: 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 }}' workbench-for-google-cloud-workstations: needs: [setup] @@ -294,6 +308,8 @@ jobs: 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 }}' workbench-for-microsoft-azure-ml: needs: [setup] @@ -327,3 +343,5 @@ jobs: 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 }}' diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 54f9f6d3f..8503bb735 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -33,7 +33,7 @@ jobs: steps: - name: Check Out Repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Run Hadolint uses: hadolint/hadolint-action@v3.0.0 diff --git a/Justfile b/Justfile index 341c831af..6f2641869 100644 --- a/Justfile +++ b/Justfile @@ -24,6 +24,8 @@ PYTHON_VERSION_ALT_RHEL := "3.8.15" QUARTO_VERSION := "1.4.557" +SNYK_ORG := env("SNYK_ORG", "") + export RSC_LICENSE := "" export RSPM_LICENSE := "" export RSW_LICENSE := "" @@ -115,6 +117,65 @@ preview-test target="default" branch="$(git branch --show-current)": BRANCH="${BRANCH}" \ python3 {{justfile_directory()}}/tools/test_bake_artifacts.py --file docker-bake.preview.hcl --target "{{target}}" +# just snyk-code-test +snyk-code-test: + snyk code test --org="{{SNYK_ORG}}" --sarif-file-output=code.sarif {{justfile_directory()}} + +# just snyk-test workbench +snyk-test target="default" file="docker-bake.hcl" *opts="": + SNYK_ORG="{{SNYK_ORG}}" \ + GIT_SHA=$(git rev-parse --short HEAD) \ + python3 {{justfile_directory()}}/tools/snyk_bake_artifacts.py --target "{{target}}" --file "{{file}}" test {{opts}} + +# just snyk-monitor workbench +snyk-monitor target="default" file="docker-bake.hcl" *opts="": + SNYK_ORG="{{SNYK_ORG}}" \ + GIT_SHA=$(git rev-parse --short HEAD) \ + python3 {{justfile_directory()}}/tools/snyk_bake_artifacts.py --target "{{target}}" --file "{{file}}" monitor {{opts}} + +# just snyk-sbom workbench +snyk-sbom target="default" file="docker-bake.hcl" *opts="": + SNYK_ORG="{{SNYK_ORG}}" \ + GIT_SHA=$(git rev-parse --short HEAD) \ + python3 {{justfile_directory()}}/tools/snyk_bake_artifacts.py --target "{{target}}" --file "{{file}}" sbom {{opts}} + +# just snyk-ignore workbench SNYK-XXXX-XXXX-XXXX "Reported upstream in " 2024-08-31 +snyk-ignore context snyk_id reason expiry: + snyk ignore --id="{{snyk_id}}" --reason="{{reason}}" --expiry="{{expiry}}" --policy-path="{{context}}" + +# just preview-snyk-test workbench +preview-snyk-test target="default" branch="$(git branch --show-current)" *opts="": + WORKBENCH_DAILY_VERSION=$(just -f ci.Justfile get-version workbench --type=daily --local) \ + WORKBENCH_PREVIEW_VERSION=$(just -f ci.Justfile get-version workbench --type=preview --local) \ + PACKAGE_MANAGER_DAILY_VERSION=$(just -f ci.Justfile get-version package-manager --type=daily --local) \ + CONNECT_DAILY_VERSION=$(just -f ci.Justfile get-version connect --type=daily --local) \ + BRANCH="{{branch}}" \ + SNYK_ORG="{{SNYK_ORG}}" \ + GIT_SHA=$(git rev-parse --short HEAD) \ + python3 {{justfile_directory()}}/tools/snyk_bake_artifacts.py --target "{{target}}" --file "docker-bake.preview.hcl" test {{opts}} + +# just snyk-monitor workbench +preview-snyk-monitor target="default" branch="$(git branch --show-current)" *opts="": + WORKBENCH_DAILY_VERSION=$(just -f ci.Justfile get-version workbench --type=daily --local) \ + WORKBENCH_PREVIEW_VERSION=$(just -f ci.Justfile get-version workbench --type=preview --local) \ + PACKAGE_MANAGER_DAILY_VERSION=$(just -f ci.Justfile get-version package-manager --type=daily --local) \ + CONNECT_DAILY_VERSION=$(just -f ci.Justfile get-version connect --type=daily --local) \ + BRANCH="{{branch}}" \ + SNYK_ORG="{{SNYK_ORG}}" \ + GIT_SHA=$(git rev-parse --short HEAD) \ + python3 {{justfile_directory()}}/tools/snyk_bake_artifacts.py --target "{{target}}" --file "docker-bake.preview.hcl" monitor {{opts}} + +# just snyk-sbom workbench +preview-snyk-sbom target="default" branch="$(git branch --show-current)" *opts="": + WORKBENCH_DAILY_VERSION=$(just -f ci.Justfile get-version workbench --type=daily --local) \ + WORKBENCH_PREVIEW_VERSION=$(just -f ci.Justfile get-version workbench --type=preview --local) \ + PACKAGE_MANAGER_DAILY_VERSION=$(just -f ci.Justfile get-version package-manager --type=daily --local) \ + CONNECT_DAILY_VERSION=$(just -f ci.Justfile get-version connect --type=daily --local) \ + BRANCH="{{branch}}" \ + SNYK_ORG="{{SNYK_ORG}}" \ + GIT_SHA=$(git rev-parse --short HEAD) \ + python3 {{justfile_directory()}}/tools/snyk_bake_artifacts.py --target "{{target}}" --file "docker-bake.preview.hcl" sbom {{opts}} + # just lint workbench ubuntu2204 lint $PRODUCT $OS: #!/usr/bin/env bash diff --git a/connect/.snyk b/connect/.snyk new file mode 100644 index 000000000..76241fea7 --- /dev/null +++ b/connect/.snyk @@ -0,0 +1,10 @@ +# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities. +version: v1.25.0 +# ignores vulnerabilities until expiry date; change duration by modifying expiry date +ignore: + SNYK-GOLANG-GITHUBCOMJACKCPGXV4-7416900: + - '*': + reason: 'Reported upstream in https://github.com/rstudio/connect/issues/27482' + expires: 2024-07-31T00:00:00.000Z + created: 2024-07-03T13:49:12.040Z +patch: {} diff --git a/docker-bake.hcl b/docker-bake.hcl index ac6fe5fa5..86729c290 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -72,16 +72,16 @@ function get_ubuntu_tags { "ghcr.io/rstudio/${product}:${get_os_alt_name(os)}-${tag_safe_version(product_version)}", "ghcr.io/rstudio/${product}:${get_os_alt_name(os)}-${clean_version(product_version)}", "ghcr.io/rstudio/${product}:${get_os_alt_name(os)}-${clean_version(product_version)}--${GIT_SHA}", - "ghcr.io/rstudio/${product}:${os}", "ghcr.io/rstudio/${product}:${get_os_alt_name(os)}", + "ghcr.io/rstudio/${product}:${os}", "docker.io/rstudio/${product}:${get_os_alt_name(os)}-${tag_safe_version(product_version)}", "docker.io/rstudio/${product}:${get_os_alt_name(os)}-${clean_version(product_version)}", "docker.io/rstudio/${product}:${get_os_alt_name(os)}-${clean_version(product_version)}--${GIT_SHA}", "docker.io/rstudio/${product}:${os}-${tag_safe_version(product_version)}", "docker.io/rstudio/${product}:${os}-${clean_version(product_version)}", "docker.io/rstudio/${product}:${os}-${clean_version(product_version)}--${GIT_SHA}", - "docker.io/rstudio/${product}:${os}", "docker.io/rstudio/${product}:${get_os_alt_name(os)}", + "docker.io/rstudio/${product}:${os}", ] } diff --git a/package-manager/.snyk b/package-manager/.snyk new file mode 100644 index 000000000..e550808be --- /dev/null +++ b/package-manager/.snyk @@ -0,0 +1,12 @@ +# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities. +version: v1.25.0 +# ignores vulnerabilities until expiry date; change duration by modifying expiry date +ignore: + SNYK-GOLANG-GITHUBCOMJACKCPGXV4-7416900: + - '*': + reason: >- + Reported upstream in + https://github.com/rstudio/package-manager/issues/13981 + expires: 2024-10-01T00:00:00.000Z + created: 2024-07-03T14:03:16.019Z +patch: {} diff --git a/r-session-complete/.snyk b/r-session-complete/.snyk new file mode 100644 index 000000000..095a845b7 --- /dev/null +++ b/r-session-complete/.snyk @@ -0,0 +1,17 @@ +# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities. +version: v1.25.0 +# ignores vulnerabilities until expiry date; change duration by modifying expiry date +ignore: + SNYK-GOLANG-GITHUBCOMCREWJAMSAML-5971016: + - '*': + reason: >- + Reported upstream in + https://github.com/rstudio/rstudio-pro/issues/6529 + expires: 2024-08-31T00:00:00.000Z + created: 2024-07-02T20:33:30.847Z + SNYK-GOLANG-GITHUBCOMGOJOSEGOJOSEV3-6070737: + - '*': + reason: 'Reported upstream in https://github.com/rstudio/openid/issues/18' + expires: 2024-07-31T00:00:00.000Z + created: 2024-07-02T20:52:24.627Z +patch: {} diff --git a/tools/snyk_bake_artifacts.py b/tools/snyk_bake_artifacts.py new file mode 100644 index 000000000..1983b43e3 --- /dev/null +++ b/tools/snyk_bake_artifacts.py @@ -0,0 +1,147 @@ +#!/usr/bin/env python3 +""" +Run Snyk vulnerability scanning against bake artifacts by group/target and build definition. + +./snyk_bake_artifacts.py --file --target +""" + +import argparse +import json +import logging +import os +import subprocess +import sys +from pathlib import Path + +logging.basicConfig(stream=sys.stdout, level=logging.INFO) +LOGGER = logging.getLogger(__name__) +SNYK_ORG = os.getenv("SNYK_ORG") +SERVICE_IMAGES = ["workbench-for-microsoft-azure=ml", "workbench-for-google-cloud-workstations"] + +PROJECT_DIR = Path(__file__).resolve().parents[1] + + +parser = argparse.ArgumentParser( + description="Extract a snyk container command from a bake plan" +) +parser.add_argument("--file", default="docker-bake.hcl") +parser.add_argument("--target", default="default") +parser.add_argument("command", choices=["test", "monitor", "sbom"]) +parser.add_argument( + "opts", + nargs="*", + help="Additional options to pass to snyk container command in the format of 'option=value' with no leading '--'. If no options are provided, a default set of options will be used.", +) + + +def get_bake_plan(bake_file="docker-bake.hcl", target="default"): + cmd = ["docker", "buildx", "bake", "-f", str(PROJECT_DIR / bake_file), "--print", target] + run_env = os.environ.copy() + p = subprocess.run(cmd, capture_output=True, env=run_env) + if p.returncode != 0: + LOGGER.error(f"Failed to get bake plan: {p.stderr}") + exit(1) + return json.loads(p.stdout.decode("utf-8")) + + +def render_options(opts): + rendered = [f"--{opt}" for opt in opts] + return rendered + + +def get_version(target_spec): + version = target_spec["args"].get("RSW_VERSION") or target_spec["args"].get("RSC_VERSION") or target_spec["args"].get("RSPM_VERSION") + return version + + +def get_image_type(target_spec): + if target_spec["context"] in SERVICE_IMAGES: + return "service" + return "generic" + + +def build_snyk_command(target_name, target_spec, snyk_command, opts): + context_path = PROJECT_DIR / target_spec["context"] + docker_file_path = context_path / "Dockerfile.ubuntu2204" # TODO: make operating system extension dynamic + cmd = [ + "snyk", + "container", + snyk_command, + ] + if opts: + cmd.extend(render_options(opts)) + else: + if snyk_command == "test": + cmd.extend([ + "--format=legacy", + f"--org={SNYK_ORG}", + f"--file={str(docker_file_path)}", + "--platform=linux/amd64", + f"--project-name={target_spec['tags'][-1]}", + f"--sarif-file-output=container.sarif", + "--severity-threshold=high", + f"--policy-path={target_spec['context']}", + ]) + if "product" not in target_spec["context"]: + cmd.append("--exclude-base-image-vulns") + elif snyk_command == "monitor": + cmd.extend([ + "--format=legacy", + f"--org={SNYK_ORG}", + f"--file={str(docker_file_path)}", + "--platform=linux/amd64", + f"--project-name={target_spec['tags'][-1]}", + "--project-environment=distributed", + "--project-lifecycle=production", + f"--policy-path={target_spec['context']}", + ]) + if "product" not in target_spec["context"]: + cmd.append("--exclude-base-image-vulns") + tags = f"--project-tags=product={target_spec['context']},image_tag={target_spec['tags'][1]},os_distro=ubuntu,os_version=22.04" + version = get_version(target_spec) + if version: + tags += f",version={version}" + image_type = get_image_type(target_spec) + tags += f",image_type={image_type}" + cmd.append(tags) + elif snyk_command == "sbom": + cmd.append("--format=cyclonedx1.4+json") + cmd.append(target_spec["tags"][0]) + if snyk_command == "sbom": + cmd.append(f"> {target_name}_sbom.json") + return cmd + + +def run_cmd(target_name, cmd): + LOGGER.info(f"Running tests for {target_name}") + LOGGER.info(f"{' '.join(cmd)}") + p = subprocess.run(" ".join(cmd), shell=True) + if p.returncode != 0: + LOGGER.error(f"{target_name} test failed with exit code {p.returncode}") + return p.returncode + + +def main(): + args = parser.parse_args() + plan = get_bake_plan(args.file, args.target) + result = 0 + failed_targets = [] + targets = {} + for k in plan["group"][args.target]["targets"]: + for target_name, target_spec in plan["target"].items(): + if target_name.startswith(k): + targets[target_name] = target_spec + LOGGER.info(f"Testing {len(targets.keys())} targets: {targets.keys()}") + for target_name, target_spec in targets.items(): + cmd = build_snyk_command(target_name, target_spec, args.command, args.opts) + LOGGER.debug(" ".join(cmd)) + return_code = run_cmd(target_name, cmd) + if return_code != 0: + failed_targets.append(target_name) + result = 1 + LOGGER.info(f"Failed targets: {failed_targets}") + exit(result) + + +if __name__ == "__main__": + main() diff --git a/workbench-for-google-cloud-workstations/.snyk b/workbench-for-google-cloud-workstations/.snyk new file mode 100644 index 000000000..875581950 --- /dev/null +++ b/workbench-for-google-cloud-workstations/.snyk @@ -0,0 +1,22 @@ +# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities. +version: v1.25.0 +# ignores vulnerabilities until expiry date; change duration by modifying expiry date +ignore: + SNYK-GOLANG-GITHUBCOMCREWJAMSAML-5971016: + - '*': + reason: >- + Reported upstream in + https://github.com/rstudio/rstudio-pro/issues/6529 + expires: 2024-08-31T00:00:00.000Z + created: 2024-07-02T20:33:30.847Z + SNYK-GOLANG-GITHUBCOMGOJOSEGOJOSEV3-6070737: + - '*': + reason: 'Reported upstream in https://github.com/rstudio/openid/issues/18' + expires: 2024-07-31T00:00:00.000Z + created: 2024-07-02T20:52:24.627Z + SNYK-GOLANG-GOLANGORGXNETHTTP2-6531285: + - '*': + reason: 'Patched in later version https://cloud.google.com/support/bulletins#gcp-2024-023' + expires: 2024-07-31T00:00:00.000Z + created: 2024-07-03T16:16:45.000Z +patch: {} diff --git a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 index 6347f4f73..e66c3c702 100644 --- a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 +++ b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 @@ -161,7 +161,6 @@ COPY startup/* /startup/base/ COPY supervisord.conf /etc/supervisor/supervisord.conf COPY --chmod=600 sssd.conf /etc/sssd/sssd.conf COPY conf/* /etc/rstudio/ -COPY --chmod=600 conf/launcher.p* /etc/rstudio # GCW specific COPY --chmod=755 workstation-startup/* /etc/workstation-startup.d/ diff --git a/workbench-for-microsoft-azure-ml/.snyk b/workbench-for-microsoft-azure-ml/.snyk new file mode 100644 index 000000000..095a845b7 --- /dev/null +++ b/workbench-for-microsoft-azure-ml/.snyk @@ -0,0 +1,17 @@ +# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities. +version: v1.25.0 +# ignores vulnerabilities until expiry date; change duration by modifying expiry date +ignore: + SNYK-GOLANG-GITHUBCOMCREWJAMSAML-5971016: + - '*': + reason: >- + Reported upstream in + https://github.com/rstudio/rstudio-pro/issues/6529 + expires: 2024-08-31T00:00:00.000Z + created: 2024-07-02T20:33:30.847Z + SNYK-GOLANG-GITHUBCOMGOJOSEGOJOSEV3-6070737: + - '*': + reason: 'Reported upstream in https://github.com/rstudio/openid/issues/18' + expires: 2024-07-31T00:00:00.000Z + created: 2024-07-02T20:52:24.627Z +patch: {} diff --git a/workbench/.snyk b/workbench/.snyk new file mode 100644 index 000000000..095a845b7 --- /dev/null +++ b/workbench/.snyk @@ -0,0 +1,17 @@ +# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities. +version: v1.25.0 +# ignores vulnerabilities until expiry date; change duration by modifying expiry date +ignore: + SNYK-GOLANG-GITHUBCOMCREWJAMSAML-5971016: + - '*': + reason: >- + Reported upstream in + https://github.com/rstudio/rstudio-pro/issues/6529 + expires: 2024-08-31T00:00:00.000Z + created: 2024-07-02T20:33:30.847Z + SNYK-GOLANG-GITHUBCOMGOJOSEGOJOSEV3-6070737: + - '*': + reason: 'Reported upstream in https://github.com/rstudio/openid/issues/18' + expires: 2024-07-31T00:00:00.000Z + created: 2024-07-02T20:52:24.627Z +patch: {} From a62b9b3739ae76409f40116c404d947e426ba2ee Mon Sep 17 00:00:00 2001 From: Cole Arendt Date: Mon, 15 Jul 2024 12:48:47 -0400 Subject: [PATCH 119/165] add rspm bash completions to the image --- package-manager/Dockerfile.ubuntu2204 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package-manager/Dockerfile.ubuntu2204 b/package-manager/Dockerfile.ubuntu2204 index 9d1f2d355..a7658da07 100644 --- a/package-manager/Dockerfile.ubuntu2204 +++ b/package-manager/Dockerfile.ubuntu2204 @@ -35,11 +35,12 @@ RUN mkdir -p /var/run/rstudio-pm \ USER rstudio-pm COPY rstudio-pm.gcfg /etc/rstudio-pm/rstudio-pm.gcfg +RUN echo "source <(rspm completion bash)" >> ~/.bashrc \ # Set up licensing to work in userspace mode. This will not prevent activating a # license as root, but it is required to activate one as the non-root user at -# runtime. It's possible for this to fail and the trail will be considered over, +# runtime. It's possible for this to fail and the trial will be considered over, # in which case we can ignore it anyway. -RUN license-manager initialize --userspace || true + && license-manager initialize --userspace || true ENTRYPOINT ["tini", "--"] CMD ["/usr/local/bin/startup.sh"] From 7ac3377bbc65b463f0e7272decf66785f672ed81 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Fri, 19 Jul 2024 15:29:31 -0600 Subject: [PATCH 120/165] Workbench configuration and certificate bug patches (#813) --- workbench-for-google-cloud-workstations/.dockerignore | 2 ++ .../Dockerfile.ubuntu2204 | 6 ++++++ workbench-for-google-cloud-workstations/conf/launcher-env | 2 +- workbench-for-microsoft-azure-ml/.dockerignore | 2 ++ workbench-for-microsoft-azure-ml/.gitignore | 2 ++ workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 | 6 ++++++ workbench-for-microsoft-azure-ml/conf/launcher-env | 2 +- workbench/.dockerignore | 2 ++ workbench/Dockerfile.ubuntu2204 | 4 ++++ workbench/conf/launcher-env | 2 +- 10 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 workbench-for-google-cloud-workstations/.dockerignore create mode 100644 workbench-for-microsoft-azure-ml/.dockerignore create mode 100644 workbench-for-microsoft-azure-ml/.gitignore create mode 100644 workbench/.dockerignore diff --git a/workbench-for-google-cloud-workstations/.dockerignore b/workbench-for-google-cloud-workstations/.dockerignore new file mode 100644 index 000000000..1bdfee607 --- /dev/null +++ b/workbench-for-google-cloud-workstations/.dockerignore @@ -0,0 +1,2 @@ +conf/launcher.pem +conf/launcher.pub diff --git a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 index e66c3c702..43412b9ff 100644 --- a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 +++ b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 @@ -109,12 +109,18 @@ RUN curl -o rstudio-workbench.deb "${RSW_DOWNLOAD_URL}/${RSW_NAME}-${RSW_VERSION && dpkg-sig --verify ./rstudio-workbench.deb \ && apt-get update \ && apt-get install -y --no-install-recommends ./rstudio-workbench.deb \ + # a wild hack to ensure that workbench can install _and start_ completely before shutdown + && sleep 30 \ && rm ./rstudio-workbench.deb \ && apt-get autoremove -y \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/rstudio-server/r-versions +# Workaround to ensure no pre-generated certificates are included in image distributions. +# This happens in the step immediately following Workbench installation in case the certificates are generated. +RUN rm -f /etc/rstudio/launcher.pem /etc/rstudio/launcher.pub + ### Install GCW License Manager ### # TODO(ianpittwood): Replace monitor download with $RSW_VERSION after upgrading to 2023.06.0 RUN mkdir -p /opt/rstudio-license/ \ diff --git a/workbench-for-google-cloud-workstations/conf/launcher-env b/workbench-for-google-cloud-workstations/conf/launcher-env index 40f05ea8f..d8127a521 100644 --- a/workbench-for-google-cloud-workstations/conf/launcher-env +++ b/workbench-for-google-cloud-workstations/conf/launcher-env @@ -3,4 +3,4 @@ Environment: LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 JobType: any -Environment: PATH=/opt/python/3.10.14/bin:$PATH +Environment: PATH=/opt/python/default/bin:$PATH diff --git a/workbench-for-microsoft-azure-ml/.dockerignore b/workbench-for-microsoft-azure-ml/.dockerignore new file mode 100644 index 000000000..1bdfee607 --- /dev/null +++ b/workbench-for-microsoft-azure-ml/.dockerignore @@ -0,0 +1,2 @@ +conf/launcher.pem +conf/launcher.pub diff --git a/workbench-for-microsoft-azure-ml/.gitignore b/workbench-for-microsoft-azure-ml/.gitignore new file mode 100644 index 000000000..1bdfee607 --- /dev/null +++ b/workbench-for-microsoft-azure-ml/.gitignore @@ -0,0 +1,2 @@ +conf/launcher.pem +conf/launcher.pub diff --git a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 index c77416b9f..16a6b4fd8 100644 --- a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 +++ b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 @@ -46,6 +46,8 @@ RUN apt-get update \ && gpg --keyserver keys.openpgp.org --recv-keys 51C0B5BB19F92D60 \ && dpkg-sig --verify ./rstudio-workbench.deb \ && apt-get install -yq --no-install-recommends ./rstudio-workbench.deb \ + # a wild hack to ensure that workbench can install _and start_ completely before shutdown + && sleep 30 \ && rm ./rstudio-workbench.deb \ && mkdir -p /opt/rstudio-license/ \ && mkdir -p /var/lib/rstudio-workbench/ \ @@ -59,6 +61,10 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/rstudio-server/r-versions +# Workaround to ensure no pre-generated certificates are included in image distributions. +# This happens in the step immediately following Workbench installation in case the certificates are generated. +RUN rm -f /etc/rstudio/launcher.pem /etc/rstudio/launcher.pub + ### Install Quarto to PATH ### RUN ln -s /lib/rstudio-server/bin/quarto/bin/quarto /usr/local/bin/quarto diff --git a/workbench-for-microsoft-azure-ml/conf/launcher-env b/workbench-for-microsoft-azure-ml/conf/launcher-env index 4ae3a2618..d8127a521 100644 --- a/workbench-for-microsoft-azure-ml/conf/launcher-env +++ b/workbench-for-microsoft-azure-ml/conf/launcher-env @@ -3,4 +3,4 @@ Environment: LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 JobType: any -Environment: PATH=/opt/python/3.6.5/bin:$PATH +Environment: PATH=/opt/python/default/bin:$PATH diff --git a/workbench/.dockerignore b/workbench/.dockerignore new file mode 100644 index 000000000..1bdfee607 --- /dev/null +++ b/workbench/.dockerignore @@ -0,0 +1,2 @@ +conf/launcher.pem +conf/launcher.pub diff --git a/workbench/Dockerfile.ubuntu2204 b/workbench/Dockerfile.ubuntu2204 index 712dab62c..b3bebcb97 100644 --- a/workbench/Dockerfile.ubuntu2204 +++ b/workbench/Dockerfile.ubuntu2204 @@ -63,6 +63,10 @@ RUN apt-get update \ && rm -rf /var/lib/rstudio-server/r-versions \ && rm -rf /var/lib/rstudio-launcher/Local/jobs/buildkitsandbox +# Workaround to ensure no pre-generated certificates are included in image distributions. +# This happens in the step immediately following Workbench installation in case the certificates are generated. +RUN rm -f /etc/rstudio/launcher.pem /etc/rstudio/launcher.pub + ### Install Quarto to PATH ### RUN ln -s /lib/rstudio-server/bin/quarto/bin/quarto /usr/local/bin/quarto diff --git a/workbench/conf/launcher-env b/workbench/conf/launcher-env index 4ae3a2618..d8127a521 100644 --- a/workbench/conf/launcher-env +++ b/workbench/conf/launcher-env @@ -3,4 +3,4 @@ Environment: LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 JobType: any -Environment: PATH=/opt/python/3.6.5/bin:$PATH +Environment: PATH=/opt/python/default/bin:$PATH From 2a40e4fafaa8c8ab7834a89f9733cde1119a29ad Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 22 Jul 2024 08:19:19 -0600 Subject: [PATCH 121/165] Implement shared scripts in WGCW image (#816) * Implement shared scripts in WGCW image * Wrap python install with apt update/clean --- docker-bake.hcl | 5 +- .../Dockerfile.ubuntu2204 | 89 +++++++------------ .../deps/apt_packages.txt | 1 + .../deps/install_r_packages.sh | 10 --- .../{py_packages.txt => requirements.txt} | 0 .../test/goss.yaml | 2 +- 6 files changed, 38 insertions(+), 69 deletions(-) delete mode 100755 workbench-for-google-cloud-workstations/deps/install_r_packages.sh rename workbench-for-google-cloud-workstations/deps/{py_packages.txt => requirements.txt} (100%) diff --git a/docker-bake.hcl b/docker-bake.hcl index 86729c290..bf9957c3d 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -184,7 +184,7 @@ variable WORKBENCH_BUILD_MATRIX { variable WORKBENCH_GOOGLE_CLOUD_WORKSTATION_BUILD_MATRIX { default = { builds = [ - {os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.11.9", py_alternate = "3.10.14"}, + {os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.12.1", py_alternate = "3.11.7"}, ] } } @@ -471,6 +471,9 @@ target "workbench-for-google-cloud-workstations" { dockerfile = "Dockerfile.${builds.os}" context = "workbench-for-google-cloud-workstations" + contexts = { + product-base-pro = "target:product-base-pro-${builds.os}-r${replace(builds.r_primary, ".", "-")}_${replace(builds.r_alternate, ".", "-")}-py${replace(builds.py_primary, ".", "-")}_${replace(builds.py_alternate, ".", "-")}" + } matrix = WORKBENCH_GOOGLE_CLOUD_WORKSTATION_BUILD_MATRIX args = { diff --git a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 index 43412b9ff..668557d1b 100644 --- a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 +++ b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 @@ -1,3 +1,4 @@ +FROM product-base-pro as posit_base FROM us-central1-docker.pkg.dev/cloud-workstations-images/predefined/base:latest as build ### ARG declarations ### @@ -28,56 +29,39 @@ ENV DIAGNOSTIC_ONLY false ENV LICENSE_MANAGER_PATH /opt/rstudio-license ENV WORKBENCH_JUPYTER_PATH=/usr/local/bin/jupyter +### Copy scripts from Posit Base ### +COPY --from=posit_base /opt/positscripts /opt/positscripts + ### Copy package lists and install scripts ### -COPY deps/* / +COPY deps/* /tmp/ ### Update/upgrade system packages ### +COPY deps/apt_packages.txt /tmp/apt_packages.txt 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 \ - && rm -rf /var/lib/apt/lists/* + && ${SCRIPTS_DIR}/apt.sh --update upgrade \ + && ${SCRIPTS_DIR}/apt.sh install $(cat /tmp/apt_packages.txt) \ + && ${SCRIPTS_DIR}/apt.sh --clean \ + && rm /tmp/apt_packages.txt ### Install R versions ### -RUN curl -O https://cdn.rstudio.com/r/ubuntu-2204/pkgs/r-${R_VERSION}_1_amd64.deb \ - && curl -O https://cdn.rstudio.com/r/ubuntu-2204/pkgs/r-${R_VERSION_ALT}_1_amd64.deb \ - && apt-get update \ - && apt-get install -yq --no-install-recommends ./r-${R_VERSION}_1_amd64.deb \ - && apt-get install -yq --no-install-recommends ./r-${R_VERSION_ALT}_1_amd64.deb \ - && rm -f ./r-${R_VERSION}_1_amd64.deb \ - && rm -f ./r-${R_VERSION_ALT}_1_amd64.deb \ - && ln -s /opt/R/${R_VERSION}/bin/R /usr/local/bin/R \ - && ln -s /opt/R/${R_VERSION}/bin/Rscript /usr/local/bin/Rscript \ - && rm -rf /var/lib/apt/lists/* +COPY deps/r_packages.txt /tmp/r_packages.txt +RUN ${SCRIPTS_DIR}/apt.sh --update \ + && R_VERSION=${R_VERSION} ${SCRIPTS_DIR}/install_r.sh -r /tmp/r_packages.txt \ + && R_VERSION=${R_VERSION_ALT} ${SCRIPTS_DIR}/install_r.sh -r /tmp/r_packages.txt \ + && ${SCRIPTS_DIR}/apt.sh --clean \ + && ln -s /opt/R/${R_VERSION} /opt/R/default \ + && ln -s /opt/R/default/bin/R /usr/local/bin/R \ + && ln -s /opt/R/default/bin/Rscript /usr/local/bin/Rscript \ + && rm -f /tmp/r_packages.txt ### Install Python versions ### -RUN curl -O https://cdn.rstudio.com/python/ubuntu-2204/pkgs/python-${PYTHON_VERSION}_1_amd64.deb \ - && curl -O https://cdn.rstudio.com/python/ubuntu-2204/pkgs/python-${PYTHON_VERSION_ALT}_1_amd64.deb \ - && apt-get update \ - && apt-get install -yq --no-install-recommends ./python-${PYTHON_VERSION}_1_amd64.deb \ - && apt-get install -yq --no-install-recommends ./python-${PYTHON_VERSION_ALT}_1_amd64.deb \ - && rm -rf python-${PYTHON_VERSION}_1_amd64.deb \ - && rm -rf python-${PYTHON_VERSION_ALT}_1_amd64.deb \ - && /opt/python/${PYTHON_VERSION}/bin/python3 -m ensurepip --upgrade \ - && /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install 'virtualenv<20' \ - && /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install --upgrade setuptools \ - && /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install --upgrade pip \ - && /opt/python/${PYTHON_VERSION}/bin/python3 -m pip cache purge \ - && /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m ensurepip --upgrade \ - && /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install 'virtualenv<20' \ - && /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install --upgrade setuptools \ - && /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install --upgrade pip \ - && /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip cache purge \ - && rm -rf /var/lib/apt/lists/* - -### Install basic data science packages for Python and R ### -RUN /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install -r /py_packages.txt \ - && /opt/python/${PYTHON_VERSION}/bin/python3 -m pip cache purge \ - && /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install -r /py_packages.txt \ - && /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip cache purge \ - && ./install_r_packages.sh \ - && rm install_r_packages.sh py_packages.txt r_packages.txt +COPY deps/requirements.txt /tmp/requirements.txt +RUN ${SCRIPTS_DIR}/apt.sh --update \ + && PYTHON_VERSION=${PYTHON_VERSION} ${SCRIPTS_DIR}/install_python.sh -r /tmp/requirements.txt \ + && PYTHON_VERSION=${PYTHON_VERSION_ALT} ${SCRIPTS_DIR}/install_python.sh -r /tmp/requirements.txt \ + && ${SCRIPTS_DIR}/apt.sh --clean \ + && ln -s /opt/python/${PYTHON_VERSION} /opt/python/default \ + && rm -f /tmp/requirements.txt ### Locale configuration ### RUN localedef -i en_US -f UTF-8 en_US.UTF-8 @@ -89,13 +73,10 @@ ENV LC_ALL en_US.UTF-8 RUN ln -s /lib/rstudio-server/bin/quarto/bin/quarto /usr/local/bin/quarto ### Install Pro Drivers ### -RUN apt-get update \ - && apt-get install -yq --no-install-recommends unixodbc unixodbc-dev \ - && curl -O https://cdn.rstudio.com/drivers/7C152C12/installer/rstudio-drivers_${DRIVERS_VERSION}_amd64.deb \ - && apt-get update \ - && apt-get install -yq --no-install-recommends ./rstudio-drivers_${DRIVERS_VERSION}_amd64.deb \ - && rm -f ./rstudio-drivers_${DRIVERS_VERSION}_amd64.deb \ - && rm -rf /var/lib/apt/lists/* \ +RUN ${SCRIPTS_DIR}/apt.sh --update upgrade \ + && ${SCRIPTS_DIR}/apt.sh install unixodbc unixodbc-dev \ + && DRIVERS_VERSION=${DRIVERS_VERSION} ${SCRIPTS_DIR}/install_drivers.sh \ + && ${SCRIPTS_DIR}/apt.sh --clean \ && 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__/jammy/latest")' @@ -112,6 +93,7 @@ RUN curl -o rstudio-workbench.deb "${RSW_DOWNLOAD_URL}/${RSW_NAME}-${RSW_VERSION # a wild hack to ensure that workbench can install _and start_ completely before shutdown && sleep 30 \ && rm ./rstudio-workbench.deb \ + && apt-get remove -yq dpkg-sig \ && apt-get autoremove -y \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* \ @@ -125,7 +107,7 @@ RUN rm -f /etc/rstudio/launcher.pem /etc/rstudio/launcher.pub # TODO(ianpittwood): Replace monitor download with $RSW_VERSION after upgrading to 2023.06.0 RUN mkdir -p /opt/rstudio-license/ \ && mkdir -p /var/lib/rstudio-workbench \ - && curl -sL "https://s3.amazonaws.com/rstudio-ide-build/monitor/jammy/rsp-monitor-workbench-gcpw-amd64-2023.06.0-419.pro1.tar.gz" | \ + && curl -sL "https://s3.amazonaws.com/rstudio-ide-build/monitor/jammy/rsp-monitor-workbench-gcpw-amd64-${RSW_VERSION//+/-}.tar.gz" | \ tar xzvf - --strip 2 -C /opt/rstudio-license/ \ && chmod 0755 /opt/rstudio-license/license-manager \ && mv /opt/rstudio-license/license-manager /opt/rstudio-license/license-manager-orig \ @@ -172,12 +154,5 @@ COPY conf/* /etc/rstudio/ COPY --chmod=755 workstation-startup/* /etc/workstation-startup.d/ COPY --chmod=644 jupyter/jupyter_notebook_config.json /opt/python/jupyter/etc/jupyter/jupyter_notebook_config.json -### Clean up ### -RUN apt-get remove -yq dpkg-sig \ - && apt-get install -yqf --no-install-recommends \ - && apt-get autoremove -yq \ - && apt-get clean -yq \ - && rm -rf /var/lib/apt/lists/* - EXPOSE 80/tcp EXPOSE 5559/tcp diff --git a/workbench-for-google-cloud-workstations/deps/apt_packages.txt b/workbench-for-google-cloud-workstations/deps/apt_packages.txt index bf6d9c109..df9f99116 100644 --- a/workbench-for-google-cloud-workstations/deps/apt_packages.txt +++ b/workbench-for-google-cloud-workstations/deps/apt_packages.txt @@ -22,6 +22,7 @@ libuser1-dev libxext6 libxrender1 locales +lsb-release oddjob-mkhomedir rrdtool sssd diff --git a/workbench-for-google-cloud-workstations/deps/install_r_packages.sh b/workbench-for-google-cloud-workstations/deps/install_r_packages.sh deleted file mode 100755 index 885ee27fa..000000000 --- a/workbench-for-google-cloud-workstations/deps/install_r_packages.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -set -ex - -UBUNTU_CODENAME=$(lsb_release -cs) -CRAN_REPO="https://packagemanager.posit.co/cran/__linux__/${UBUNTU_CODENAME}/latest" - -r_packages=$(awk '{print "\"" $0 "\""}' r_packages.txt | paste -d',' -s -) -/opt/R/${R_VERSION}/bin/R --slave -e "install.packages(c(${r_packages}), repos = \"${CRAN_REPO}\")" -/opt/R/${R_VERSION_ALT}/bin/R --slave -e "install.packages(c(${r_packages}), repos = \"${CRAN_REPO}\")" diff --git a/workbench-for-google-cloud-workstations/deps/py_packages.txt b/workbench-for-google-cloud-workstations/deps/requirements.txt similarity index 100% rename from workbench-for-google-cloud-workstations/deps/py_packages.txt rename to workbench-for-google-cloud-workstations/deps/requirements.txt diff --git a/workbench-for-google-cloud-workstations/test/goss.yaml b/workbench-for-google-cloud-workstations/test/goss.yaml index c55ff6d86..a978ec251 100644 --- a/workbench-for-google-cloud-workstations/test/goss.yaml +++ b/workbench-for-google-cloud-workstations/test/goss.yaml @@ -204,7 +204,7 @@ command: ] {{ $python_version := .Env.PYTHON_VERSION }} {{ $python_version_alt := .Env.PYTHON_VERSION_ALT }} - {{ $py_package_list := readFile "/tmp/deps/py_packages.txt" | splitList "\n" }} + {{ $py_package_list := readFile "/tmp/deps/requirements.txt" | splitList "\n" }} {{- range $py_package_list }} Check Python {{ $python_version }} has "{{.}}" installed: exec: /opt/python/{{$python_version}}/bin/pip show {{.}} From 6f7c47a9d179f56bc7942e59ae500ce3e7c98459 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 22 Jul 2024 09:56:05 -0600 Subject: [PATCH 122/165] Manage TinyTeX installation with Quarto (#814) * Manage TinyTeX installation with Quarto Add CLI options to `install_quarto.sh` to install, update, add to path, or uninstall TinyTeX Add an option to use Workbench's preinstalled Quarto for TinyTeX management * Add TinyTeX test to Goss Fix usage error * Auto-detect Workbench installed Quarto and use if present * Update product/base/scripts/ubuntu/install_quarto.sh Co-authored-by: Benjamin R. J. Schwedler * Move Quarto and TinyTeX install to after workbench install in WGCW --------- Co-authored-by: Benjamin R. J. Schwedler --- connect/Dockerfile.ubuntu2204 | 2 +- connect/test/goss.yaml | 7 ++ product/base/Dockerfile.ubuntu2204 | 8 -- product/base/scripts/ubuntu/install_quarto.sh | 79 ++++++++++++++++--- r-session-complete/Dockerfile.ubuntu2204 | 3 + r-session-complete/test/goss.yaml | 7 ++ .../Dockerfile.ubuntu2204 | 9 ++- .../test/goss.yaml | 7 ++ .../Dockerfile.ubuntu2204 | 3 + .../test/goss.yaml | 7 ++ workbench/Dockerfile.ubuntu2204 | 3 + workbench/test/goss.yaml | 7 ++ 12 files changed, 121 insertions(+), 21 deletions(-) diff --git a/connect/Dockerfile.ubuntu2204 b/connect/Dockerfile.ubuntu2204 index 593fe1d31..d4d729862 100644 --- a/connect/Dockerfile.ubuntu2204 +++ b/connect/Dockerfile.ubuntu2204 @@ -12,7 +12,7 @@ ARG QUARTO_VERSION=1.4.557 ARG SCRIPTS_DIR=/opt/positscripts ### Install Quarto ### -RUN QUARTO_VERSION=${QUARTO_VERSION} ${SCRIPTS_DIR}/install_quarto.sh \ +RUN QUARTO_VERSION=${QUARTO_VERSION} ${SCRIPTS_DIR}/install_quarto.sh --install-tinytex --add-path-tinytex \ && ln -s /opt/quarto/${QUARTO_VERSION}/bin/quarto /usr/local/bin/quarto SHELL [ "/bin/bash", "-o", "pipefail", "-c"] diff --git a/connect/test/goss.yaml b/connect/test/goss.yaml index 88d87b2de..63cffa16d 100644 --- a/connect/test/goss.yaml +++ b/connect/test/goss.yaml @@ -114,3 +114,10 @@ command: "/usr/local/bin/quarto check --quiet": title: quarto_check exit-status: 0 + +# Ensure TinyTeX is installed + "quarto list tools": + title: quarto_tinytex_installed + exit-status: 0 + stderr: + - "/tinytex\\s+Up to date\\s+v\\d{4}\\.\\d{2}\\.\\d{2}\\s+v\\d{4}\\.\\d{2}\\.\\d{2}/" diff --git a/product/base/Dockerfile.ubuntu2204 b/product/base/Dockerfile.ubuntu2204 index 649dabbf7..c10a69efc 100644 --- a/product/base/Dockerfile.ubuntu2204 +++ b/product/base/Dockerfile.ubuntu2204 @@ -30,14 +30,6 @@ RUN gpg --batch --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 595E85A6B1 && chmod +x /tini \ && ln -s /tini /usr/local/bin/tini -### Install TinyTeX ### -SHELL ["/bin/bash", "-o", "pipefail", "-c"] -RUN curl -sL "https://yihui.org/tinytex/install-bin-unix.sh" | sh \ - && /root/.TinyTeX/bin/*/tlmgr path remove \ - && mv /root/.TinyTeX/ /opt/TinyTeX \ - && /opt/TinyTeX/bin/*/tlmgr option sys_bin /usr/local/bin \ - && /opt/TinyTeX/bin/*/tlmgr path add - ### Install R versions ### RUN R_VERSION=${R_VERSION} ${SCRIPTS_DIR}/install_r.sh \ && R_VERSION=${R_VERSION_ALT} ${SCRIPTS_DIR}/install_r.sh \ diff --git a/product/base/scripts/ubuntu/install_quarto.sh b/product/base/scripts/ubuntu/install_quarto.sh index e6071b137..632eebf35 100755 --- a/product/base/scripts/ubuntu/install_quarto.sh +++ b/product/base/scripts/ubuntu/install_quarto.sh @@ -16,18 +16,34 @@ usage() { echo " QUARTO_VERSION=1.3.340 $0" echo "" echo "Options:" - echo " -d, --debug Enable debug output" - echo " -h, --help Print usage and exit" - echo " --prefix Install Quarto to a custom prefix" - echo " Each version of Quarto will have its own subdirectory" - echo " Default: /opt/quarto" + echo " -d, --debug Enable debug output" + echo " -h, --help Print usage and exit" + echo " --prefix Install Quarto to a custom prefix" + echo " Each version of Quarto will have its own subdirectory" + echo " Default: /opt/quarto" + echo " --install-tinytex Install TinyTeX using Quarto" + echo " --add-path-tinytex Add TinyTeX to PATH using Quarto" + echo " --update-tinytex Update TinyTeX using Quarto" + echo " --uninstall-tinytex Uninstall TinyTeX from Quarto" } # Set defaults PREFIX="/opt/quarto" +QUARTO_PATH="${PREFIX}/${QUARTO_VERSION}/bin/quarto" +ADD_PATH_TINYTEX=0 +INSTALL_TINYTEX=0 +UPDATE_TINYTEX=0 +UNINSTALL_TINYTEX=0 +IS_WORKBENCH_INSTALLATION=0 -OPTIONS=$(getopt -o hdr: --long help,debug,prefix: -- "$@") +# Set Quarto Path to the bundled version in Workbench if it exists +if [ -f "/lib/rstudio-server/bin/quarto/bin/quarto" ]; then + QUARTO_PATH="/lib/rstudio-server/bin/quarto/bin/quarto" + IS_WORKBENCH_INSTALLATION=1 +fi + +OPTIONS=$(getopt -o hd --long help,debug,prefix:,install-tinytex,add-path-tinytex,update-tinytex,uninstall-tinytex -- "$@") # shellcheck disable=SC2181 if [[ $? -ne 0 ]]; then exit 1; @@ -49,13 +65,29 @@ while true; do PREFIX="$2" shift 2 ;; + --install-tinytex) + INSTALL_TINYTEX=1 + shift + ;; + --add-path-tinytex) + ADD_PATH_TINYTEX=1 + shift + ;; + --update-tinytex) + UPDATE_TINYTEX=1 + shift + ;; + --uninstall-tinytex) + UNINSTALL_TINYTEX=1 + shift + ;; --) shift; break ;; esac done -if [ -z "$QUARTO_VERSION" ]; then +if [ -z "$QUARTO_VERSION" ] && [[ "$IS_WORKBENCH_INSTALLATION" -eq 0 ]]; then usage exit 1 fi @@ -63,7 +95,7 @@ fi install_quarto() { # Check if Quarto is already installed # shellcheck disable=SC2086 - if ${PREFIX}/${QUARTO_VERSION}/bin/quarto --version | grep -qE "^${QUARTO_VERSION}" ; then + if $QUARTO_PATH --version | grep -qE "^${QUARTO_VERSION}" ; then echo "$d Quarto $QUARTO_VERSION is already installed in $PREFIX/$QUARTO_VERSION $d" return fi @@ -72,4 +104,33 @@ install_quarto() { wget -q -O - "https://github.com/quarto-dev/quarto-cli/releases/download/v${QUARTO_VERSION}/quarto-${QUARTO_VERSION}-linux-amd64.tar.gz" | tar xzf - -C "/opt/quarto/${QUARTO_VERSION}" --strip-components=1 } -install_quarto +update_tinytex() { + $QUARTO_PATH update tinytex --no-prompt +} + +uninstall_tinytex() { + $QUARTO_PATH uninstall tinytex --no-prompt +} + +install_tinytex() { + uninstall_tinytex + if [[ "$ADD_PATH_TINYTEX" -eq 1 ]]; then + $QUARTO_PATH install tinytex --update-path --no-prompt + else + $QUARTO_PATH install tinytex --no-prompt + fi +} + +if [[ "$IS_WORKBENCH_INSTALLATION" -eq 0 ]]; then + # Skip installation if Quarto is bundled with Workbench + install_quarto +fi +if [[ "$INSTALL_TINYTEX" -eq 1 ]]; then + install_tinytex +fi +if [[ "$UPDATE_TINYTEX" -eq 1 ]]; then + update_tinytex +fi +if [[ "$UNINSTALL_TINYTEX" -eq 1 ]]; then + uninstall_tinytex +fi diff --git a/r-session-complete/Dockerfile.ubuntu2204 b/r-session-complete/Dockerfile.ubuntu2204 index 8a608cc55..ec3a8658a 100644 --- a/r-session-complete/Dockerfile.ubuntu2204 +++ b/r-session-complete/Dockerfile.ubuntu2204 @@ -40,6 +40,9 @@ RUN apt-get update \ ### Install Quarto to PATH ### RUN ln -s /lib/rstudio-server/bin/quarto/bin/quarto /usr/local/bin/quarto +### Install TinyTeX using Quarto ### +RUN $SCRIPTS_DIR/install_quarto.sh --install-tinytex --add-path-tinytex + COPY maybe_install_vs_code.sh /tmp/maybe_install_vs_code.sh RUN /tmp/maybe_install_vs_code.sh \ && rm /tmp/maybe_install_vs_code.sh diff --git a/r-session-complete/test/goss.yaml b/r-session-complete/test/goss.yaml index 1c7bf3367..44e611ec6 100644 --- a/r-session-complete/test/goss.yaml +++ b/r-session-complete/test/goss.yaml @@ -60,3 +60,10 @@ command: "/usr/local/bin/quarto check --quiet": title: quarto_check exit-status: 0 + +# Ensure TinyTeX is installed + "quarto list tools": + title: quarto_tinytex_installed + exit-status: 0 + stderr: + - "/tinytex\\s+Up to date\\s+v\\d{4}\\.\\d{2}\\.\\d{2}\\s+v\\d{4}\\.\\d{2}\\.\\d{2}/" diff --git a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 index 668557d1b..324371c96 100644 --- a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 +++ b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 @@ -69,9 +69,6 @@ ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en ENV LC_ALL en_US.UTF-8 -### Install Quarto to PATH ### -RUN ln -s /lib/rstudio-server/bin/quarto/bin/quarto /usr/local/bin/quarto - ### Install Pro Drivers ### RUN ${SCRIPTS_DIR}/apt.sh --update upgrade \ && ${SCRIPTS_DIR}/apt.sh install unixodbc unixodbc-dev \ @@ -99,6 +96,12 @@ RUN curl -o rstudio-workbench.deb "${RSW_DOWNLOAD_URL}/${RSW_NAME}-${RSW_VERSION && rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/rstudio-server/r-versions +### Install Quarto to PATH ### +RUN ln -s /lib/rstudio-server/bin/quarto/bin/quarto /usr/local/bin/quarto + +### Install TinyTeX using Quarto ### +RUN $SCRIPTS_DIR/install_quarto.sh --install-tinytex --add-path-tinytex + # Workaround to ensure no pre-generated certificates are included in image distributions. # This happens in the step immediately following Workbench installation in case the certificates are generated. RUN rm -f /etc/rstudio/launcher.pem /etc/rstudio/launcher.pub diff --git a/workbench-for-google-cloud-workstations/test/goss.yaml b/workbench-for-google-cloud-workstations/test/goss.yaml index a978ec251..547a503a1 100644 --- a/workbench-for-google-cloud-workstations/test/goss.yaml +++ b/workbench-for-google-cloud-workstations/test/goss.yaml @@ -233,3 +233,10 @@ command: "/usr/local/bin/quarto check --quiet": title: quarto_check exit-status: 0 + +# Ensure TinyTeX is installed + "quarto list tools": + title: quarto_tinytex_installed + exit-status: 0 + stderr: + - "/tinytex\\s+Up to date\\s+v\\d{4}\\.\\d{2}\\.\\d{2}\\s+v\\d{4}\\.\\d{2}\\.\\d{2}/" diff --git a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 index 16a6b4fd8..bcb6139d7 100644 --- a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 +++ b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 @@ -68,6 +68,9 @@ RUN rm -f /etc/rstudio/launcher.pem /etc/rstudio/launcher.pub ### Install Quarto to PATH ### RUN ln -s /lib/rstudio-server/bin/quarto/bin/quarto /usr/local/bin/quarto +### Install TinyTeX using Quarto ### +RUN $SCRIPTS_DIR/install_quarto.sh --install-tinytex --add-path-tinytex + COPY --chmod=0755 license-manager-shim /opt/rstudio-license/license-manager COPY --chmod=0775 startup.sh /usr/local/bin/startup.sh COPY startup/* /startup/base/ diff --git a/workbench-for-microsoft-azure-ml/test/goss.yaml b/workbench-for-microsoft-azure-ml/test/goss.yaml index b94fae546..332ad325c 100644 --- a/workbench-for-microsoft-azure-ml/test/goss.yaml +++ b/workbench-for-microsoft-azure-ml/test/goss.yaml @@ -151,3 +151,10 @@ command: "/usr/local/bin/quarto check --quiet": title: quarto_check exit-status: 0 + +# Ensure TinyTeX is installed + "quarto list tools": + title: quarto_tinytex_installed + exit-status: 0 + stderr: + - "/tinytex\\s+Up to date\\s+v\\d{4}\\.\\d{2}\\.\\d{2}\\s+v\\d{4}\\.\\d{2}\\.\\d{2}/" diff --git a/workbench/Dockerfile.ubuntu2204 b/workbench/Dockerfile.ubuntu2204 index b3bebcb97..c6d0cb1f5 100644 --- a/workbench/Dockerfile.ubuntu2204 +++ b/workbench/Dockerfile.ubuntu2204 @@ -70,6 +70,9 @@ RUN rm -f /etc/rstudio/launcher.pem /etc/rstudio/launcher.pub ### Install Quarto to PATH ### RUN ln -s /lib/rstudio-server/bin/quarto/bin/quarto /usr/local/bin/quarto +### Install TinyTeX using Quarto ### +RUN $SCRIPTS_DIR/install_quarto.sh --install-tinytex --add-path-tinytex + COPY maybe_install_vs_code.sh /tmp/maybe_install_vs_code.sh RUN /tmp/maybe_install_vs_code.sh \ && rm /tmp/maybe_install_vs_code.sh diff --git a/workbench/test/goss.yaml b/workbench/test/goss.yaml index bfbee8d03..a7a2beb2c 100644 --- a/workbench/test/goss.yaml +++ b/workbench/test/goss.yaml @@ -148,3 +148,10 @@ command: "/usr/local/bin/quarto check --quiet": title: quarto_check exit-status: 0 + +# Ensure TinyTeX is installed + "quarto list tools": + title: quarto_tinytex_installed + exit-status: 0 + stderr: + - "/tinytex\\s+Up to date\\s+v\\d{4}\\.\\d{2}\\.\\d{2}\\s+v\\d{4}\\.\\d{2}\\.\\d{2}/" From 6d54a2e49c396f75d6987485a5d5a409b5616413 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Tue, 30 Jul 2024 08:52:18 -0600 Subject: [PATCH 123/165] Fix scheduled image builds not pushing --- .github/workflows/build-bake.yaml | 88 +++++++++++++++++++++++++++---- 1 file changed, 79 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-bake.yaml b/.github/workflows/build-bake.yaml index 50b2cd45d..ff72a44cd 100644 --- a/.github/workflows/build-bake.yaml +++ b/.github/workflows/build-bake.yaml @@ -22,6 +22,13 @@ jobs: steps: - name: Checkout + if: github.event.schedule == '0 8 * * 1' + uses: actions/checkout@v4 + with: + ref: 'main' + + - name: Checkout + if: github.event.schedule != '0 8 * * 1' uses: actions/checkout@v4 - name: Get commit SHA @@ -46,6 +53,13 @@ jobs: steps: - name: Checkout + if: github.event.schedule == '0 8 * * 1' + uses: actions/checkout@v4 + with: + ref: 'main' + + - name: Checkout + if: github.event.schedule != '0 8 * * 1' uses: actions/checkout@v4 - name: Set up Docker Buildx @@ -58,7 +72,7 @@ jobs: uses: ./.github/actions/bake-test-push with: target: ${{ env.target }} - push-image: ${{ github.ref == 'refs/heads/main' }} + push-image: ${{ github.ref == 'refs/heads/main' || github.event.schedule == '0 8 * * 1' }} ghcr-token: ${{ secrets.GITHUB_TOKEN }} dockerhub-username: ${{ secrets.DOCKER_HUB_USERNAME }} dockerhub-token: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} @@ -81,6 +95,13 @@ jobs: steps: - name: Checkout + if: github.event.schedule == '0 8 * * 1' + uses: actions/checkout@v4 + with: + ref: 'main' + + - name: Checkout + if: github.event.schedule != '0 8 * * 1' uses: actions/checkout@v4 - name: Set up Docker Buildx @@ -93,7 +114,7 @@ jobs: uses: ./.github/actions/bake-test-push with: target: ${{ env.target }} - push-image: ${{ github.ref == 'refs/heads/main' }} + push-image: ${{ github.ref == 'refs/heads/main' || github.event.schedule == '0 8 * * 1' }} ghcr-token: ${{ secrets.GITHUB_TOKEN }} dockerhub-username: ${{ secrets.DOCKER_HUB_USERNAME }} dockerhub-token: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} @@ -116,6 +137,13 @@ jobs: steps: - name: Checkout + if: github.event.schedule == '0 8 * * 1' + uses: actions/checkout@v4 + with: + ref: 'main' + + - name: Checkout + if: github.event.schedule != '0 8 * * 1' uses: actions/checkout@v4 - name: Set up Docker Buildx @@ -128,7 +156,7 @@ jobs: uses: ./.github/actions/bake-test-push with: target: ${{ env.target }} - push-image: ${{ github.ref == 'refs/heads/main' }} + push-image: ${{ github.ref == 'refs/heads/main' || github.event.schedule == '0 8 * * 1' }} ghcr-token: ${{ secrets.GITHUB_TOKEN }} dockerhub-username: ${{ secrets.DOCKER_HUB_USERNAME }} dockerhub-token: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} @@ -151,6 +179,13 @@ jobs: steps: - name: Checkout + if: github.event.schedule == '0 8 * * 1' + uses: actions/checkout@v4 + with: + ref: 'main' + + - name: Checkout + if: github.event.schedule != '0 8 * * 1' uses: actions/checkout@v4 - name: Set up Docker Buildx @@ -163,7 +198,7 @@ jobs: uses: ./.github/actions/bake-test-push with: target: ${{ env.target }} - push-image: ${{ github.ref == 'refs/heads/main' }} + push-image: ${{ github.ref == 'refs/heads/main' || github.event.schedule == '0 8 * * 1' }} ghcr-token: ${{ secrets.GITHUB_TOKEN }} dockerhub-username: ${{ secrets.DOCKER_HUB_USERNAME }} dockerhub-token: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} @@ -186,6 +221,13 @@ jobs: steps: - name: Checkout + if: github.event.schedule == '0 8 * * 1' + uses: actions/checkout@v4 + with: + ref: 'main' + + - name: Checkout + if: github.event.schedule != '0 8 * * 1' uses: actions/checkout@v4 - name: Set up Docker Buildx @@ -198,7 +240,7 @@ jobs: uses: ./.github/actions/bake-test-push with: target: ${{ env.target }} - push-image: ${{ github.ref == 'refs/heads/main' }} + push-image: ${{ github.ref == 'refs/heads/main' || github.event.schedule == '0 8 * * 1' }} ghcr-token: ${{ secrets.GITHUB_TOKEN }} dockerhub-username: ${{ secrets.DOCKER_HUB_USERNAME }} dockerhub-token: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} @@ -221,6 +263,13 @@ jobs: steps: - name: Checkout + if: github.event.schedule == '0 8 * * 1' + uses: actions/checkout@v4 + with: + ref: 'main' + + - name: Checkout + if: github.event.schedule != '0 8 * * 1' uses: actions/checkout@v4 - name: Set up Docker Buildx @@ -233,7 +282,7 @@ jobs: uses: ./.github/actions/bake-test-push with: target: ${{ env.target }} - push-image: ${{ github.ref == 'refs/heads/main' }} + push-image: ${{ github.ref == 'refs/heads/main' || github.event.schedule == '0 8 * * 1' }} ghcr-token: ${{ secrets.GITHUB_TOKEN }} dockerhub-username: ${{ secrets.DOCKER_HUB_USERNAME }} dockerhub-token: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} @@ -256,6 +305,13 @@ jobs: steps: - name: Checkout + if: github.event.schedule == '0 8 * * 1' + uses: actions/checkout@v4 + with: + ref: 'main' + + - name: Checkout + if: github.event.schedule != '0 8 * * 1' uses: actions/checkout@v4 - name: Set up Docker Buildx @@ -268,7 +324,7 @@ jobs: uses: ./.github/actions/bake-test-push with: target: ${{ env.target }} - push-image: ${{ github.ref == 'refs/heads/main' }} + push-image: ${{ github.ref == 'refs/heads/main' || github.event.schedule == '0 8 * * 1' }} ghcr-token: ${{ secrets.GITHUB_TOKEN }} dockerhub-username: ${{ secrets.DOCKER_HUB_USERNAME }} dockerhub-token: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} @@ -291,6 +347,13 @@ jobs: steps: - name: Checkout + if: github.event.schedule == '0 8 * * 1' + uses: actions/checkout@v4 + with: + ref: 'main' + + - name: Checkout + if: github.event.schedule != '0 8 * * 1' uses: actions/checkout@v4 - name: Set up Docker Buildx @@ -303,7 +366,7 @@ jobs: uses: ./.github/actions/bake-test-push with: target: ${{ env.target }} - push-image: ${{ github.ref == 'refs/heads/main' }} + push-image: ${{ github.ref == 'refs/heads/main' || github.event.schedule == '0 8 * * 1' }} ghcr-token: ${{ secrets.GITHUB_TOKEN }} dockerhub-username: ${{ secrets.DOCKER_HUB_USERNAME }} dockerhub-token: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} @@ -326,6 +389,13 @@ jobs: steps: - name: Checkout + if: github.event.schedule == '0 8 * * 1' + uses: actions/checkout@v4 + with: + ref: 'main' + + - name: Checkout + if: github.event.schedule != '0 8 * * 1' uses: actions/checkout@v4 - name: Set up Docker Buildx @@ -338,7 +408,7 @@ jobs: uses: ./.github/actions/bake-test-push with: target: ${{ env.target }} - push-image: ${{ github.ref == 'refs/heads/main' }} + push-image: ${{ github.ref == 'refs/heads/main' || github.event.schedule == '0 8 * * 1' }} ghcr-token: ${{ secrets.GITHUB_TOKEN }} dockerhub-username: ${{ secrets.DOCKER_HUB_USERNAME }} dockerhub-token: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} From efe0d3f412739874f41ade09cba4cc222e316ce7 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Tue, 30 Jul 2024 09:12:13 -0600 Subject: [PATCH 124/165] Check event_name instead of cron string --- .github/workflows/build-bake.yaml | 58 +++++++++++++++---------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/.github/workflows/build-bake.yaml b/.github/workflows/build-bake.yaml index ff72a44cd..c1c67e11a 100644 --- a/.github/workflows/build-bake.yaml +++ b/.github/workflows/build-bake.yaml @@ -22,13 +22,13 @@ jobs: steps: - name: Checkout - if: github.event.schedule == '0 8 * * 1' + if: github.event_name == 'schedule' uses: actions/checkout@v4 with: ref: 'main' - name: Checkout - if: github.event.schedule != '0 8 * * 1' + if: github.event_name != 'schedule' uses: actions/checkout@v4 - name: Get commit SHA @@ -53,13 +53,13 @@ jobs: steps: - name: Checkout - if: github.event.schedule == '0 8 * * 1' + if: github.event_name == 'schedule' uses: actions/checkout@v4 with: ref: 'main' - name: Checkout - if: github.event.schedule != '0 8 * * 1' + if: github.event_name != 'schedule' uses: actions/checkout@v4 - name: Set up Docker Buildx @@ -72,7 +72,7 @@ jobs: uses: ./.github/actions/bake-test-push with: target: ${{ env.target }} - push-image: ${{ github.ref == 'refs/heads/main' || github.event.schedule == '0 8 * * 1' }} + 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 }} @@ -95,13 +95,13 @@ jobs: steps: - name: Checkout - if: github.event.schedule == '0 8 * * 1' + if: github.event_name == 'schedule' uses: actions/checkout@v4 with: ref: 'main' - name: Checkout - if: github.event.schedule != '0 8 * * 1' + if: github.event_name != 'schedule' uses: actions/checkout@v4 - name: Set up Docker Buildx @@ -114,7 +114,7 @@ jobs: uses: ./.github/actions/bake-test-push with: target: ${{ env.target }} - push-image: ${{ github.ref == 'refs/heads/main' || github.event.schedule == '0 8 * * 1' }} + 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 }} @@ -137,13 +137,13 @@ jobs: steps: - name: Checkout - if: github.event.schedule == '0 8 * * 1' + if: github.event_name == 'schedule' uses: actions/checkout@v4 with: ref: 'main' - name: Checkout - if: github.event.schedule != '0 8 * * 1' + if: github.event_name != 'schedule' uses: actions/checkout@v4 - name: Set up Docker Buildx @@ -156,7 +156,7 @@ jobs: uses: ./.github/actions/bake-test-push with: target: ${{ env.target }} - push-image: ${{ github.ref == 'refs/heads/main' || github.event.schedule == '0 8 * * 1' }} + 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 }} @@ -179,13 +179,13 @@ jobs: steps: - name: Checkout - if: github.event.schedule == '0 8 * * 1' + if: github.event_name == 'schedule' uses: actions/checkout@v4 with: ref: 'main' - name: Checkout - if: github.event.schedule != '0 8 * * 1' + if: github.event_name != 'schedule' uses: actions/checkout@v4 - name: Set up Docker Buildx @@ -198,7 +198,7 @@ jobs: uses: ./.github/actions/bake-test-push with: target: ${{ env.target }} - push-image: ${{ github.ref == 'refs/heads/main' || github.event.schedule == '0 8 * * 1' }} + 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 }} @@ -221,13 +221,13 @@ jobs: steps: - name: Checkout - if: github.event.schedule == '0 8 * * 1' + if: github.event_name == 'schedule' uses: actions/checkout@v4 with: ref: 'main' - name: Checkout - if: github.event.schedule != '0 8 * * 1' + if: github.event_name != 'schedule' uses: actions/checkout@v4 - name: Set up Docker Buildx @@ -240,7 +240,7 @@ jobs: uses: ./.github/actions/bake-test-push with: target: ${{ env.target }} - push-image: ${{ github.ref == 'refs/heads/main' || github.event.schedule == '0 8 * * 1' }} + 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 }} @@ -263,13 +263,13 @@ jobs: steps: - name: Checkout - if: github.event.schedule == '0 8 * * 1' + if: github.event_name == 'schedule' uses: actions/checkout@v4 with: ref: 'main' - name: Checkout - if: github.event.schedule != '0 8 * * 1' + if: github.event_name != 'schedule' uses: actions/checkout@v4 - name: Set up Docker Buildx @@ -282,7 +282,7 @@ jobs: uses: ./.github/actions/bake-test-push with: target: ${{ env.target }} - push-image: ${{ github.ref == 'refs/heads/main' || github.event.schedule == '0 8 * * 1' }} + 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 }} @@ -305,13 +305,13 @@ jobs: steps: - name: Checkout - if: github.event.schedule == '0 8 * * 1' + if: github.event_name == 'schedule' uses: actions/checkout@v4 with: ref: 'main' - name: Checkout - if: github.event.schedule != '0 8 * * 1' + if: github.event_name != 'schedule' uses: actions/checkout@v4 - name: Set up Docker Buildx @@ -324,7 +324,7 @@ jobs: uses: ./.github/actions/bake-test-push with: target: ${{ env.target }} - push-image: ${{ github.ref == 'refs/heads/main' || github.event.schedule == '0 8 * * 1' }} + 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 }} @@ -347,13 +347,13 @@ jobs: steps: - name: Checkout - if: github.event.schedule == '0 8 * * 1' + if: github.event_name == 'schedule' uses: actions/checkout@v4 with: ref: 'main' - name: Checkout - if: github.event.schedule != '0 8 * * 1' + if: github.event_name != 'schedule' uses: actions/checkout@v4 - name: Set up Docker Buildx @@ -366,7 +366,7 @@ jobs: uses: ./.github/actions/bake-test-push with: target: ${{ env.target }} - push-image: ${{ github.ref == 'refs/heads/main' || github.event.schedule == '0 8 * * 1' }} + 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 }} @@ -389,13 +389,13 @@ jobs: steps: - name: Checkout - if: github.event.schedule == '0 8 * * 1' + if: github.event_name == 'schedule' uses: actions/checkout@v4 with: ref: 'main' - name: Checkout - if: github.event.schedule != '0 8 * * 1' + if: github.event_name != 'schedule' uses: actions/checkout@v4 - name: Set up Docker Buildx @@ -408,7 +408,7 @@ jobs: uses: ./.github/actions/bake-test-push with: target: ${{ env.target }} - push-image: ${{ github.ref == 'refs/heads/main' || github.event.schedule == '0 8 * * 1' }} + 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 }} From 048215a4f8a4ca15e20256e075148e181de8e177 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Wed, 31 Jul 2024 11:52:07 -0600 Subject: [PATCH 125/165] Filter SARIF paths on images with >20 paths --- docker-bake.hcl | 4 +- tools/snyk_bake_artifacts.py | 45 ++++++++++++++++++- workbench-for-google-cloud-workstations/.snyk | 14 +++--- workbench-for-microsoft-azure-ml/.snyk | 9 ++-- workbench/.snyk | 9 ++-- 5 files changed, 64 insertions(+), 17 deletions(-) diff --git a/docker-bake.hcl b/docker-bake.hcl index bf9957c3d..a203ea39b 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -461,12 +461,12 @@ target "workbench-for-google-cloud-workstations" { tags = [ "us-central1-docker.pkg.dev/posit-images/cloud-workstations/workbench:${tag_safe_version(WORKBENCH_VERSION)}", "us-central1-docker.pkg.dev/posit-images/cloud-workstations/workbench:latest", - "us-docker.pkg.dev/posit-images/cloud-workstations/workbench:${tag_safe_version(WORKBENCH_VERSION)}", - "us-docker.pkg.dev/posit-images/cloud-workstations/workbench:latest", "europe-docker.pkg.dev/posit-images/cloud-workstations/workbench:${tag_safe_version(WORKBENCH_VERSION)}", "europe-docker.pkg.dev/posit-images/cloud-workstations/workbench:latest", "asia-docker.pkg.dev/posit-images/cloud-workstations/workbench:${tag_safe_version(WORKBENCH_VERSION)}", "asia-docker.pkg.dev/posit-images/cloud-workstations/workbench:latest", + "us-docker.pkg.dev/posit-images/cloud-workstations/workbench:${tag_safe_version(WORKBENCH_VERSION)}", + "us-docker.pkg.dev/posit-images/cloud-workstations/workbench:latest", ] dockerfile = "Dockerfile.${builds.os}" diff --git a/tools/snyk_bake_artifacts.py b/tools/snyk_bake_artifacts.py index 1983b43e3..87281b027 100644 --- a/tools/snyk_bake_artifacts.py +++ b/tools/snyk_bake_artifacts.py @@ -17,6 +17,15 @@ LOGGER = logging.getLogger(__name__) SNYK_ORG = os.getenv("SNYK_ORG") SERVICE_IMAGES = ["workbench-for-microsoft-azure=ml", "workbench-for-google-cloud-workstations"] +SARIF_PATH_FILTERS = { + "connect": ["/opt/rstudio-connect/examples"], + "workbench-for-google-cloud-workstations": [ + "/usr/lib/google-cloud-sdk", + "/usr/share", + "/usr/bin", + "/usr/local/go", + ], +} PROJECT_DIR = Path(__file__).resolve().parents[1] @@ -78,7 +87,8 @@ def build_snyk_command(target_name, target_spec, snyk_command, opts): f"--file={str(docker_file_path)}", "--platform=linux/amd64", f"--project-name={target_spec['tags'][-1]}", - f"--sarif-file-output=container.sarif", + "--sarif-file-output=container.sarif", + "--json-file-output=container.json", "--severity-threshold=high", f"--policy-path={target_spec['context']}", ]) @@ -112,6 +122,36 @@ def build_snyk_command(target_name, target_spec, snyk_command, opts): return cmd +def filter_sarif_file(target_spec): + with open("container.sarif", "r") as f: + c_sarif = json.load(f) + with open("container.json", "r") as f: + c_json = json.load(f) + c_sarif_paths = c_sarif["runs"] + c_sarif_root = c_sarif_paths.pop(0) + c_json_paths = c_json["applications"] + filter_paths = SARIF_PATH_FILTERS.get(target_spec["context"], []) + filtered_c_sarif_paths = [c_sarif_root] + if len(c_sarif_paths) != len(c_json_paths): + LOGGER.error("SARIF and JSON number of discovered paths do not match") + return + for i in range(len(c_sarif_paths)): + if c_json_paths[i]["dependencyCount"] != c_sarif_paths[i]["tool"]["driver"]["properties"]["artifactsScanned"]: + LOGGER.warning( + f"Artifact count in JSON, {c_json_paths[i]['dependencyCount']}, " + f"differs from artifact count in SARIF, " + f"{c_sarif_paths[i]['tool']['driver']['properties']['artifactsScanned']}, for " + f"{c_json_paths[i]['displayTargetFile']}. This may cause incorrect filtering in the SARIF file." + ) + if not any(p in c_json_paths[i]["targetFile"] for p in filter_paths): + filtered_c_sarif_paths.append(c_sarif_paths[i]) + c_sarif["runs"] = filtered_c_sarif_paths + num_filtered_paths = len(c_sarif_paths) - len(filtered_c_sarif_paths) + LOGGER.info(f"Filtered {num_filtered_paths} paths from SARIF file") + with open("container.sarif", "w") as f: + json.dump(c_sarif, f, indent=2) + + def run_cmd(target_name, cmd): LOGGER.info(f"Running tests for {target_name}") LOGGER.info(f"{' '.join(cmd)}") @@ -139,6 +179,9 @@ def main(): if return_code != 0: failed_targets.append(target_name) result = 1 + if target_spec["context"] in SARIF_PATH_FILTERS and args.command == "test": + LOGGER.info("Filtering SARIF output file for excluded paths...") + filter_sarif_file(target_spec) LOGGER.info(f"Failed targets: {failed_targets}") exit(result) diff --git a/workbench-for-google-cloud-workstations/.snyk b/workbench-for-google-cloud-workstations/.snyk index 875581950..909ad99a1 100644 --- a/workbench-for-google-cloud-workstations/.snyk +++ b/workbench-for-google-cloud-workstations/.snyk @@ -11,12 +11,10 @@ ignore: created: 2024-07-02T20:33:30.847Z SNYK-GOLANG-GITHUBCOMGOJOSEGOJOSEV3-6070737: - '*': - reason: 'Reported upstream in https://github.com/rstudio/openid/issues/18' - expires: 2024-07-31T00:00:00.000Z - created: 2024-07-02T20:52:24.627Z - SNYK-GOLANG-GOLANGORGXNETHTTP2-6531285: - - '*': - reason: 'Patched in later version https://cloud.google.com/support/bulletins#gcp-2024-023' - expires: 2024-07-31T00:00:00.000Z - created: 2024-07-03T16:16:45.000Z + reason: >- + Confirmed fixed upstream in + https://github.com/rstudio/rstudio-pro/issues/6635. Patch will be + ingested in Workbench 2024.08.0 (expected within 1 week). + expires: 2024-08-07T00:00:00.000Z + created: 2024-07-31T17:46:24.852Z patch: {} diff --git a/workbench-for-microsoft-azure-ml/.snyk b/workbench-for-microsoft-azure-ml/.snyk index 095a845b7..909ad99a1 100644 --- a/workbench-for-microsoft-azure-ml/.snyk +++ b/workbench-for-microsoft-azure-ml/.snyk @@ -11,7 +11,10 @@ ignore: created: 2024-07-02T20:33:30.847Z SNYK-GOLANG-GITHUBCOMGOJOSEGOJOSEV3-6070737: - '*': - reason: 'Reported upstream in https://github.com/rstudio/openid/issues/18' - expires: 2024-07-31T00:00:00.000Z - created: 2024-07-02T20:52:24.627Z + reason: >- + Confirmed fixed upstream in + https://github.com/rstudio/rstudio-pro/issues/6635. Patch will be + ingested in Workbench 2024.08.0 (expected within 1 week). + expires: 2024-08-07T00:00:00.000Z + created: 2024-07-31T17:46:24.852Z patch: {} diff --git a/workbench/.snyk b/workbench/.snyk index 095a845b7..909ad99a1 100644 --- a/workbench/.snyk +++ b/workbench/.snyk @@ -11,7 +11,10 @@ ignore: created: 2024-07-02T20:33:30.847Z SNYK-GOLANG-GITHUBCOMGOJOSEGOJOSEV3-6070737: - '*': - reason: 'Reported upstream in https://github.com/rstudio/openid/issues/18' - expires: 2024-07-31T00:00:00.000Z - created: 2024-07-02T20:52:24.627Z + reason: >- + Confirmed fixed upstream in + https://github.com/rstudio/rstudio-pro/issues/6635. Patch will be + ingested in Workbench 2024.08.0 (expected within 1 week). + expires: 2024-08-07T00:00:00.000Z + created: 2024-07-31T17:46:24.852Z patch: {} From c50026bf723b6280c50b147f5fc9f4ed9f892d35 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Wed, 31 Jul 2024 13:47:36 -0600 Subject: [PATCH 126/165] Add .snyk ignores for r-session-complete and WGCW --- r-session-complete/.snyk | 9 ++++++--- workbench-for-google-cloud-workstations/.snyk | 5 +++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/r-session-complete/.snyk b/r-session-complete/.snyk index 095a845b7..909ad99a1 100644 --- a/r-session-complete/.snyk +++ b/r-session-complete/.snyk @@ -11,7 +11,10 @@ ignore: created: 2024-07-02T20:33:30.847Z SNYK-GOLANG-GITHUBCOMGOJOSEGOJOSEV3-6070737: - '*': - reason: 'Reported upstream in https://github.com/rstudio/openid/issues/18' - expires: 2024-07-31T00:00:00.000Z - created: 2024-07-02T20:52:24.627Z + reason: >- + Confirmed fixed upstream in + https://github.com/rstudio/rstudio-pro/issues/6635. Patch will be + ingested in Workbench 2024.08.0 (expected within 1 week). + expires: 2024-08-07T00:00:00.000Z + created: 2024-07-31T17:46:24.852Z patch: {} diff --git a/workbench-for-google-cloud-workstations/.snyk b/workbench-for-google-cloud-workstations/.snyk index 909ad99a1..557b169de 100644 --- a/workbench-for-google-cloud-workstations/.snyk +++ b/workbench-for-google-cloud-workstations/.snyk @@ -17,4 +17,9 @@ ignore: ingested in Workbench 2024.08.0 (expected within 1 week). expires: 2024-08-07T00:00:00.000Z created: 2024-07-31T17:46:24.852Z + SNYK-GOLANG-GOLANGORGXNETHTTP2-6531285: + - '*': + reason: Vulnerability in Google Cloud SDK. + expires: 2024-09-01T00:00:00.000Z + created: 2024-07-31T19:45:25.728Z patch: {} From 149995b15a0a689cbdfa8dc911c4678c42faa4f1 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Wed, 31 Jul 2024 13:50:11 -0600 Subject: [PATCH 127/165] Update checkout to v4 --- .github/workflows/build-bake-preview.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-bake-preview.yaml b/.github/workflows/build-bake-preview.yaml index c95dea69a..641787f5b 100644 --- a/.github/workflows/build-bake-preview.yaml +++ b/.github/workflows/build-bake-preview.yaml @@ -77,7 +77,7 @@ jobs: steps: - name: Check Out main Branch if: github.event.schedule == '0 8 * * *' - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: 'main' @@ -104,7 +104,7 @@ jobs: connect-daily: needs: [versions] - name: Connect Image - Daily + name: Connect - Daily runs-on: ubuntu-latest-4x env: From 8f25a8ec047f47c9f4219f2e55cb50af205c4f7d Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Wed, 7 Aug 2024 13:41:54 -0600 Subject: [PATCH 128/165] Add `snyk-org` and `snyk-token` args to build-manual.yaml --- .github/workflows/build-manual.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-manual.yaml b/.github/workflows/build-manual.yaml index 7e0fd5da1..2f9917747 100644 --- a/.github/workflows/build-manual.yaml +++ b/.github/workflows/build-manual.yaml @@ -163,3 +163,5 @@ jobs: 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 }}' From 4b04cafb8b7ba31aeb5b9dfad5666c617c3e29e0 Mon Sep 17 00:00:00 2001 From: David Kegley Date: Wed, 7 Aug 2024 15:42:46 -0400 Subject: [PATCH 129/165] Bump Connect to version 2024.08.0 --- Justfile | 2 +- connect-content-init/Dockerfile.ubuntu2204 | 2 +- connect-content-init/README.md | 6 +++--- connect/.env | 2 +- connect/Dockerfile.ubuntu2204 | 2 +- connect/README.md | 2 +- docker-bake.hcl | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Justfile b/Justfile index 6f2641869..a6ddcad2d 100644 --- a/Justfile +++ b/Justfile @@ -7,7 +7,7 @@ sed_vars := if os() == "macos" { "-i ''" } else { "-i" } BUILDX_PATH := "" -RSC_VERSION := "2024.06.0" +RSC_VERSION := "2024.08.0" RSPM_VERSION := "2024.04.4-35" RSW_VERSION := "2024.04.2+764.pro1" diff --git a/connect-content-init/Dockerfile.ubuntu2204 b/connect-content-init/Dockerfile.ubuntu2204 index 9816c8e68..9a260dba5 100644 --- a/connect-content-init/Dockerfile.ubuntu2204 +++ b/connect-content-init/Dockerfile.ubuntu2204 @@ -9,7 +9,7 @@ RUN apt-get update && \ apt-get install -y --no-install-recommends ca-certificates curl && \ rm -rf /var/lib/apt/lists/* -ARG RSC_VERSION=2024.06.0 +ARG RSC_VERSION=2024.08.0 SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN mkdir -p /rsc-staging && \ RSC_VERSION_URL=$(echo -n "${RSC_VERSION}" | sed 's/+/%2B/g') && \ diff --git a/connect-content-init/README.md b/connect-content-init/README.md index 5bb8e7799..1fce505f0 100644 --- a/connect-content-init/README.md +++ b/connect-content-init/README.md @@ -9,7 +9,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2024.06.0`, `ubuntu2204-2024.06.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.08.0`, `ubuntu2204-2024.08.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) # RStudio Connect Content Init Container @@ -31,7 +31,7 @@ The version of the release package to use can be overridden with the `RSC_VERSION` build arg. ```console -just build ubuntu2204 2024.06.0 +just build ubuntu2204 2024.08.0 ``` ## Testing @@ -56,7 +56,7 @@ just test You can see the different layers that make up the image: ```console -docker history rstudio/rstudio-connect-content-init-preview:2024.06.0-dev-326 +docker history rstudio/rstudio-connect-content-init-preview:2024.08.0-dev-326 ``` NOTE: almost all the image size is pandoc. diff --git a/connect/.env b/connect/.env index fca74e643..142c04b89 100644 --- a/connect/.env +++ b/connect/.env @@ -1,4 +1,4 @@ -RSC_VERSION=2024.06.0 +RSC_VERSION=2024.08.0 R_VERSION=4.2.3 R_VERSION_ALT=4.1.3 PYTHON_VERSION=3.9.17 diff --git a/connect/Dockerfile.ubuntu2204 b/connect/Dockerfile.ubuntu2204 index d4d729862..5aea9e84d 100644 --- a/connect/Dockerfile.ubuntu2204 +++ b/connect/Dockerfile.ubuntu2204 @@ -7,7 +7,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 RSC_VERSION=2024.06.0 +ARG RSC_VERSION=2024.08.0 ARG QUARTO_VERSION=1.4.557 ARG SCRIPTS_DIR=/opt/positscripts diff --git a/connect/README.md b/connect/README.md index c4203c557..488e72d30 100644 --- a/connect/README.md +++ b/connect/README.md @@ -7,7 +7,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2024.06.0`, `ubuntu2204-2024.06.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.08.0`, `ubuntu2204-2024.08.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) # What is Posit Connect? diff --git a/docker-bake.hcl b/docker-bake.hcl index a203ea39b..b2d3aceca 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -1,6 +1,6 @@ ### Variable definitions ### variable CONNECT_VERSION { - default = "2024.06.0" + default = "2024.08.0" } variable PACKAGE_MANAGER_VERSION { From e88dcbe207c92839b811ee6a6046f0ed2d8e28cf Mon Sep 17 00:00:00 2001 From: Tyler Date: Thu, 15 Aug 2024 13:11:47 -0400 Subject: [PATCH 130/165] Bump PPM to 2024.08.0-6 --- Justfile | 2 +- docker-bake.hcl | 2 +- package-manager/.env | 2 +- package-manager/Dockerfile.ubuntu2204 | 2 +- package-manager/README.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Justfile b/Justfile index a6ddcad2d..fc43e484f 100644 --- a/Justfile +++ b/Justfile @@ -8,7 +8,7 @@ sed_vars := if os() == "macos" { "-i ''" } else { "-i" } BUILDX_PATH := "" RSC_VERSION := "2024.08.0" -RSPM_VERSION := "2024.04.4-35" +RSPM_VERSION := "2024.08.0-6" RSW_VERSION := "2024.04.2+764.pro1" DRIVERS_VERSION := "2023.05.0" diff --git a/docker-bake.hcl b/docker-bake.hcl index b2d3aceca..f583d3fe9 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -4,7 +4,7 @@ variable CONNECT_VERSION { } variable PACKAGE_MANAGER_VERSION { - default = "2024.04.4-35" + default = "2024.08.0-6" } variable WORKBENCH_VERSION { diff --git a/package-manager/.env b/package-manager/.env index 8e974f21a..0900bba0c 100644 --- a/package-manager/.env +++ b/package-manager/.env @@ -1,4 +1,4 @@ -RSPM_VERSION=2024.04.4-35 +RSPM_VERSION=2024.08.0-6 R_VERSION=4.4.0 R_VERSION_ALT=4.1.3 PYTHON_VERSION=3.9.17 diff --git a/package-manager/Dockerfile.ubuntu2204 b/package-manager/Dockerfile.ubuntu2204 index a7658da07..ccbf9088f 100644 --- a/package-manager/Dockerfile.ubuntu2204 +++ b/package-manager/Dockerfile.ubuntu2204 @@ -13,7 +13,7 @@ RUN /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install --no-cache-dir buil RUN /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install --no-cache-dir build virtualenv # Download RStudio Package Manager ---------------------------------------------# -ARG RSPM_VERSION=2024.04.4-35 +ARG RSPM_VERSION=2024.08.0-6 ARG RSPM_DOWNLOAD_URL=https://cdn.rstudio.com/package-manager/deb/amd64 RUN curl -O ${RSPM_DOWNLOAD_URL}/rstudio-pm_${RSPM_VERSION}_amd64.deb \ # Pre 7/25/23 packages diff --git a/package-manager/README.md b/package-manager/README.md index aade5bec1..a1c442429 100644 --- a/package-manager/README.md +++ b/package-manager/README.md @@ -6,7 +6,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2024.04.2`, `ubuntu2204-2024.04.2`](https://github.com/rstudio/rstudio-docker-products/blob/main/package-manager/Dockerfile.ubuntu2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.08.0`, `ubuntu2204-2024.08.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/package-manager/Dockerfile.ubuntu2204) # What is RStudio Package Manager? From 460d015ae1fc2865148fa51c79f8f804ec866501 Mon Sep 17 00:00:00 2001 From: kfeinauer Date: Fri, 23 Aug 2024 10:22:10 -0500 Subject: [PATCH 131/165] Change Workbench home umask permissions from 0022 to 0027 to ensure other users cannot read a user's home directory --- workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 | 2 +- workbench-for-google-cloud-workstations/pam/rstudio-session | 2 +- workbench-for-google-cloud-workstations/test/goss.yaml | 2 +- workbench/Dockerfile.ubuntu2204 | 2 +- workbench/pam/rstudio-session | 2 +- workbench/test/goss.yaml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 index 324371c96..d9a91c812 100644 --- a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 +++ b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 @@ -141,7 +141,7 @@ ADD --chmod=755 https://raw.githubusercontent.com/rstudio/wait-for-it/master/wai RUN mkdir -p /var/lib/rstudio-server/monitor/log \ && chown -R rstudio-server:rstudio-server /var/lib/rstudio-server/monitor \ && mkdir -p /startup/custom/ \ - && printf '\n# allow home directory creation\nsession required pam_mkhomedir.so skel=/etc/skel umask=0022' >> /etc/pam.d/common-session + && printf '\n# allow home directory creation\nsession required pam_mkhomedir.so skel=/etc/skel umask=0027' >> /etc/pam.d/common-session COPY --chmod=755 TurboActivate.dat /opt/rstudio-license/license-manager.conf COPY --chmod=755 license-manager-shim /opt/rstudio-license/license-manager diff --git a/workbench-for-google-cloud-workstations/pam/rstudio-session b/workbench-for-google-cloud-workstations/pam/rstudio-session index 058947084..81bbcd184 100644 --- a/workbench-for-google-cloud-workstations/pam/rstudio-session +++ b/workbench-for-google-cloud-workstations/pam/rstudio-session @@ -17,7 +17,7 @@ password sufficient pam_sss.so use_authtok password required pam_unix.so try_first_pass nullok sha512 shadow password optional pam_permit.so -session required pam_mkhomedir.so skel=/etc/skel umask=0022 +session required pam_mkhomedir.so skel=/etc/skel umask=0027 session required pam_env.so readenv=1 session required pam_env.so readenv=1 envfile=/etc/default/locale session required pam_limits.so diff --git a/workbench-for-google-cloud-workstations/test/goss.yaml b/workbench-for-google-cloud-workstations/test/goss.yaml index 547a503a1..121ca8974 100644 --- a/workbench-for-google-cloud-workstations/test/goss.yaml +++ b/workbench-for-google-cloud-workstations/test/goss.yaml @@ -106,7 +106,7 @@ file: /etc/pam.d/common-session: exists: true contents: - - "/^session required pam_mkhomedir.so skel=/etc/skel umask=0022$/" + - "/^session required pam_mkhomedir.so skel=/etc/skel umask=0027$/" /etc/sssd/sssd.conf: exists: true owner: root diff --git a/workbench/Dockerfile.ubuntu2204 b/workbench/Dockerfile.ubuntu2204 index c6d0cb1f5..fd09b7e0d 100644 --- a/workbench/Dockerfile.ubuntu2204 +++ b/workbench/Dockerfile.ubuntu2204 @@ -107,7 +107,7 @@ COPY conf/* /etc/rstudio/ RUN mkdir -p /var/lib/rstudio-server/monitor/log && \ chown -R rstudio-server:rstudio-server /var/lib/rstudio-server/monitor && \ mkdir -p /startup/custom/ && \ - printf '\n# allow home directory creation\nsession required pam_mkhomedir.so skel=/etc/skel umask=0022' >> /etc/pam.d/common-session + printf '\n# allow home directory creation\nsession required pam_mkhomedir.so skel=/etc/skel umask=0027' >> /etc/pam.d/common-session EXPOSE 8787/tcp EXPOSE 5559/tcp diff --git a/workbench/pam/rstudio-session b/workbench/pam/rstudio-session index 058947084..81bbcd184 100644 --- a/workbench/pam/rstudio-session +++ b/workbench/pam/rstudio-session @@ -17,7 +17,7 @@ password sufficient pam_sss.so use_authtok password required pam_unix.so try_first_pass nullok sha512 shadow password optional pam_permit.so -session required pam_mkhomedir.so skel=/etc/skel umask=0022 +session required pam_mkhomedir.so skel=/etc/skel umask=0027 session required pam_env.so readenv=1 session required pam_env.so readenv=1 envfile=/etc/default/locale session required pam_limits.so diff --git a/workbench/test/goss.yaml b/workbench/test/goss.yaml index a7a2beb2c..5830f11af 100644 --- a/workbench/test/goss.yaml +++ b/workbench/test/goss.yaml @@ -88,7 +88,7 @@ file: /etc/pam.d/common-session: exists: true contains: - - "/^session required pam_mkhomedir.so skel=/etc/skel umask=0022$/" + - "/^session required pam_mkhomedir.so skel=/etc/skel umask=0027$/" /etc/sssd/sssd.conf: exists: true owner: root From 37ea56327811218ded01d115305407da6d8cb4b0 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Thu, 29 Aug 2024 10:32:18 -0600 Subject: [PATCH 132/165] Use `--fail` flag for curl in Quarto binary fetch --- product/base/scripts/ubuntu/install_quarto.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/product/base/scripts/ubuntu/install_quarto.sh b/product/base/scripts/ubuntu/install_quarto.sh index 632eebf35..ad0564e3c 100755 --- a/product/base/scripts/ubuntu/install_quarto.sh +++ b/product/base/scripts/ubuntu/install_quarto.sh @@ -87,6 +87,8 @@ while true; do esac done +set -u + if [ -z "$QUARTO_VERSION" ] && [[ "$IS_WORKBENCH_INSTALLATION" -eq 0 ]]; then usage exit 1 @@ -101,7 +103,7 @@ install_quarto() { fi mkdir -p "/opt/quarto/${QUARTO_VERSION}" - wget -q -O - "https://github.com/quarto-dev/quarto-cli/releases/download/v${QUARTO_VERSION}/quarto-${QUARTO_VERSION}-linux-amd64.tar.gz" | tar xzf - -C "/opt/quarto/${QUARTO_VERSION}" --strip-components=1 + curl -fsL "https://github.com/quarto-dev/quarto-cli/releases/download/v${QUARTO_VERSION}/quarto-${QUARTO_VERSION}-linux-amd64.tar.gz" | tar xzf - -C "/opt/quarto/${QUARTO_VERSION}" --strip-components=1 } update_tinytex() { From ffb761ce2fea403446c6be0867153f3d045e2e5e Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Wed, 4 Sep 2024 11:00:25 -0600 Subject: [PATCH 133/165] Update product/base/scripts/ubuntu/install_quarto.sh Co-authored-by: Benjamin R. J. Schwedler --- product/base/scripts/ubuntu/install_quarto.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product/base/scripts/ubuntu/install_quarto.sh b/product/base/scripts/ubuntu/install_quarto.sh index ad0564e3c..4bc67e276 100755 --- a/product/base/scripts/ubuntu/install_quarto.sh +++ b/product/base/scripts/ubuntu/install_quarto.sh @@ -103,7 +103,7 @@ install_quarto() { fi mkdir -p "/opt/quarto/${QUARTO_VERSION}" - curl -fsL "https://github.com/quarto-dev/quarto-cli/releases/download/v${QUARTO_VERSION}/quarto-${QUARTO_VERSION}-linux-amd64.tar.gz" | tar xzf - -C "/opt/quarto/${QUARTO_VERSION}" --strip-components=1 + curl -fsSL "https://github.com/quarto-dev/quarto-cli/releases/download/v${QUARTO_VERSION}/quarto-${QUARTO_VERSION}-linux-amd64.tar.gz" | tar xzf - -C "/opt/quarto/${QUARTO_VERSION}" --strip-components=1 } update_tinytex() { From 58b744b8c2ee93c0a9a048a4e8fc4559c6a42d37 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Wed, 4 Sep 2024 11:46:42 -0600 Subject: [PATCH 134/165] Unify curl flags across all files --- connect-content-init/test/run_tests.sh | 2 +- connect/Dockerfile.ubuntu2204 | 4 ++-- connect/test/run_tests.sh | 2 +- content/base/Dockerfile.ubuntu1804 | 2 +- content/base/Dockerfile.ubuntu2204 | 4 ++-- content/base/maybe_install_quarto.sh | 4 ++-- content/pro/Dockerfile.ubuntu1804 | 2 +- content/pro/Dockerfile.ubuntu2204 | 2 +- float/Dockerfile.ubuntu1804 | 4 ++-- package-manager/Dockerfile.ubuntu2204 | 2 +- package-manager/test/run_tests.sh | 2 +- product/base/Dockerfile.centos7 | 2 +- product/base/scripts/rhel/install_drivers.sh | 2 +- product/base/scripts/rhel/install_python.sh | 2 +- product/base/scripts/rhel/install_r.sh | 4 ++-- product/base/scripts/ubuntu/install_drivers.sh | 2 +- product/base/scripts/ubuntu/install_python.sh | 2 +- product/base/scripts/ubuntu/install_quarto.sh | 2 -- product/base/scripts/ubuntu/install_r.sh | 4 ++-- product/base/test/run_tests.sh | 2 +- product/pro/test/run_tests.sh | 2 +- r-session-complete/Dockerfile.ubuntu2204 | 2 +- r-session-complete/test/run_tests.sh | 2 +- .../Dockerfile.ubuntu2204 | 6 +++--- workbench-for-google-cloud-workstations/test/run_tests.sh | 2 +- workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 | 6 +++--- workbench-for-microsoft-azure-ml/deps/install-r.sh | 2 +- workbench-for-microsoft-azure-ml/test/run_tests.sh | 2 +- workbench/Dockerfile.ubuntu2204 | 4 ++-- workbench/test/run_tests.sh | 2 +- 30 files changed, 40 insertions(+), 42 deletions(-) diff --git a/connect-content-init/test/run_tests.sh b/connect-content-init/test/run_tests.sh index 840d328ae..b06a01f9b 100755 --- a/connect-content-init/test/run_tests.sh +++ b/connect-content-init/test/run_tests.sh @@ -15,7 +15,7 @@ else fi # install goss to tmp location and make executable -curl -sL https://github.com/aelsabbahy/goss/releases/download/v$GOSS_VERSION/goss-linux-amd64 -o /tmp/goss \ +curl -fsSL https://github.com/aelsabbahy/goss/releases/download/v$GOSS_VERSION/goss-linux-amd64 -o /tmp/goss \ && chmod +x /tmp/goss \ && GOSS=/tmp/goss diff --git a/connect/Dockerfile.ubuntu2204 b/connect/Dockerfile.ubuntu2204 index 5aea9e84d..23a9c4e3c 100644 --- a/connect/Dockerfile.ubuntu2204 +++ b/connect/Dockerfile.ubuntu2204 @@ -19,7 +19,7 @@ SHELL [ "/bin/bash", "-o", "pipefail", "-c"] ### Install TensorFlow Serving ### RUN echo "deb [arch=amd64] http://storage.googleapis.com/tensorflow-serving-apt stable tensorflow-model-server tensorflow-model-server-universal" > /etc/apt/sources.list.d/tensorflow-serving.list && \ - curl https://storage.googleapis.com/tensorflow-serving-apt/tensorflow-serving.release.pub.gpg | apt-key add - + curl -fsSL https://storage.googleapis.com/tensorflow-serving-apt/tensorflow-serving.release.pub.gpg | apt-key add - RUN apt-get update \ && apt-get install -yq --no-install-recommends \ tensorflow-model-server-universal \ @@ -34,7 +34,7 @@ RUN apt-get update --fix-missing \ libpam-sss \ libglib2.0-0 \ && RSC_VERSION_URL=$(echo -n "${RSC_VERSION}" | sed 's/+/%2B/g') \ - && curl -L -o rstudio-connect.deb "https://cdn.rstudio.com/connect/$(echo $RSC_VERSION | sed -r 's/([0-9]+\.[0-9]+).*/\1/')/rstudio-connect_${RSC_VERSION_URL}~ubuntu22_amd64.deb" \ + && curl -fsSL -o rstudio-connect.deb "https://cdn.rstudio.com/connect/$(echo $RSC_VERSION | sed -r 's/([0-9]+\.[0-9]+).*/\1/')/rstudio-connect_${RSC_VERSION_URL}~ubuntu22_amd64.deb" \ # Pre 7/25/23 packages && gpg --keyserver keyserver.ubuntu.com --recv-keys 3F32EE77E331692F \ # Post 7/25 packages diff --git a/connect/test/run_tests.sh b/connect/test/run_tests.sh index 10dcb7f75..de8d6f9f5 100755 --- a/connect/test/run_tests.sh +++ b/connect/test/run_tests.sh @@ -24,7 +24,7 @@ GOSS_VERSION=${GOSS_VERSION:-0.4.6} GOSS_MAX_CONCURRENT=${GOSS_MAX_CONCURRENT:-50} # install goss to tmp location and make executable -curl -sL https://github.com/aelsabbahy/goss/releases/download/v$GOSS_VERSION/goss-linux-amd64 -o /tmp/goss \ +curl -fsSL https://github.com/aelsabbahy/goss/releases/download/v$GOSS_VERSION/goss-linux-amd64 -o /tmp/goss \ && chmod +x /tmp/goss \ && GOSS=/tmp/goss diff --git a/content/base/Dockerfile.ubuntu1804 b/content/base/Dockerfile.ubuntu1804 index 9ef4363e5..87c2d09e4 100644 --- a/content/base/Dockerfile.ubuntu1804 +++ b/content/base/Dockerfile.ubuntu1804 @@ -77,7 +77,7 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN apt-get update \ && apt-get install -y --no-install-recommends wget \ && rm -rf /var/lib/apt/lists/* \ - && curl -sL "https://yihui.org/tinytex/install-bin-unix.sh" | sh \ + && curl -fsSL "https://yihui.org/tinytex/install-bin-unix.sh" | sh \ && /root/.TinyTeX/bin/*/tlmgr path remove \ && mv /root/.TinyTeX/ /opt/TinyTeX \ && /opt/TinyTeX/bin/*/tlmgr option sys_bin /usr/local/bin \ diff --git a/content/base/Dockerfile.ubuntu2204 b/content/base/Dockerfile.ubuntu2204 index 05a4886e4..241df921a 100644 --- a/content/base/Dockerfile.ubuntu2204 +++ b/content/base/Dockerfile.ubuntu2204 @@ -86,7 +86,7 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN apt-get update \ && apt-get install -y --no-install-recommends wget \ && rm -rf /var/lib/apt/lists/* \ - && curl -sL "https://yihui.org/tinytex/install-bin-unix.sh" | sh \ + && curl -fsSL "https://yihui.org/tinytex/install-bin-unix.sh" | sh \ && /root/.TinyTeX/bin/*/tlmgr path remove \ && mv /root/.TinyTeX/ /opt/TinyTeX \ && /opt/TinyTeX/bin/*/tlmgr option sys_bin /usr/local/bin \ @@ -111,7 +111,7 @@ RUN curl -fsSL -O https://cdn.rstudio.com/r/${DISTRIBUTION}/pkgs/${R_INSTALLER} # We are NOT linking one of these Python versions into the PATH. -RUN curl -O https://cdn.rstudio.com/python/${DISTRIBUTION}/pkgs/python-${PYTHON_VERSION}_1_amd64.deb \ +RUN curl -fsSL -O https://cdn.rstudio.com/python/${DISTRIBUTION}/pkgs/python-${PYTHON_VERSION}_1_amd64.deb \ && apt-get install -yq --no-install-recommends ./python-${PYTHON_VERSION}_1_amd64.deb \ && rm -rf python-${PYTHON_VERSION}_1_amd64.deb \ && /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install --upgrade setuptools diff --git a/content/base/maybe_install_quarto.sh b/content/base/maybe_install_quarto.sh index cb06e6c82..ea8c928aa 100755 --- a/content/base/maybe_install_quarto.sh +++ b/content/base/maybe_install_quarto.sh @@ -5,7 +5,7 @@ if [[ `grep -oE bionic /etc/lsb-release` ]] && [[ `ls /opt/python/ | grep '3\.10\.'` ]] && [[ `ls /opt/R | grep '4\.1\.'` ]]; then qver=${QUARTO_VERSION:-1.3.340} echo '--> Installing Quarto' - curl -L -o /quarto.deb https://github.com/quarto-dev/quarto-cli/releases/download/v${qver}/quarto-${qver}-linux-amd64.deb + curl -fsSL -o /quarto.deb https://github.com/quarto-dev/quarto-cli/releases/download/v${qver}/quarto-${qver}-linux-amd64.deb apt install /quarto.deb rm -f /quarto.deb fi @@ -14,7 +14,7 @@ fi if [[ `grep -oE jammy /etc/lsb-release` ]]; then qver=${QUARTO_VERSION:-1.3.340} echo '--> Installing Quarto' - curl -L -o /quarto.tar.gz "https://github.com/quarto-dev/quarto-cli/releases/download/v${qver}/quarto-${qver}-linux-amd64.tar.gz" + curl -fsSL -o /quarto.tar.gz "https://github.com/quarto-dev/quarto-cli/releases/download/v${qver}/quarto-${qver}-linux-amd64.tar.gz" mkdir -p /opt/quarto/${qver} tar -zxvf quarto.tar.gz -C "/opt/quarto/${qver}" --strip-components=1 rm -f /quarto.tar.gz diff --git a/content/pro/Dockerfile.ubuntu1804 b/content/pro/Dockerfile.ubuntu1804 index 7b6f34c12..551a278aa 100644 --- a/content/pro/Dockerfile.ubuntu1804 +++ b/content/pro/Dockerfile.ubuntu1804 @@ -9,7 +9,7 @@ RUN apt-get update -y \ && apt-get install -y --no-install-recommends unixodbc unixodbc-dev \ && rm -rf /var/lib/apt/lists/* -RUN curl -O https://cdn.rstudio.com/drivers/7C152C12/installer/rstudio-drivers_${DRIVERS_VERSION}_amd64.deb \ +RUN curl -fsSL -O https://cdn.rstudio.com/drivers/7C152C12/installer/rstudio-drivers_${DRIVERS_VERSION}_amd64.deb \ && apt-get update \ && apt-get install -yq --no-install-recommends ./rstudio-drivers_${DRIVERS_VERSION}_amd64.deb \ && rm -rf /var/lib/apt/lists/* \ diff --git a/content/pro/Dockerfile.ubuntu2204 b/content/pro/Dockerfile.ubuntu2204 index 7b6f34c12..551a278aa 100644 --- a/content/pro/Dockerfile.ubuntu2204 +++ b/content/pro/Dockerfile.ubuntu2204 @@ -9,7 +9,7 @@ RUN apt-get update -y \ && apt-get install -y --no-install-recommends unixodbc unixodbc-dev \ && rm -rf /var/lib/apt/lists/* -RUN curl -O https://cdn.rstudio.com/drivers/7C152C12/installer/rstudio-drivers_${DRIVERS_VERSION}_amd64.deb \ +RUN curl -fsSL -O https://cdn.rstudio.com/drivers/7C152C12/installer/rstudio-drivers_${DRIVERS_VERSION}_amd64.deb \ && apt-get update \ && apt-get install -yq --no-install-recommends ./rstudio-drivers_${DRIVERS_VERSION}_amd64.deb \ && rm -rf /var/lib/apt/lists/* \ diff --git a/float/Dockerfile.ubuntu1804 b/float/Dockerfile.ubuntu1804 index e0fb76e2d..274412c38 100644 --- a/float/Dockerfile.ubuntu1804 +++ b/float/Dockerfile.ubuntu1804 @@ -13,14 +13,14 @@ RUN apt-get update \ # Runtime settings ARG TINI_VERSION=0.18.0 -RUN curl -L -o /usr/local/bin/tini https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini \ +RUN curl -fsSL -o /usr/local/bin/tini https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini \ && chmod +x /usr/local/bin/tini # install license server binary ARG PRODUCT=rsp ARG VERSION=1.1.2 ARG PORT=8989 -RUN curl -L -o "${PRODUCT}-license-server.deb" "https://s3.amazonaws.com/rstudio-license-server/${PRODUCT}-license-server-${VERSION}-x86_64.deb" \ +RUN curl -fsSL -o "${PRODUCT}-license-server.deb" "https://s3.amazonaws.com/rstudio-license-server/${PRODUCT}-license-server-${VERSION}-x86_64.deb" \ && gdebi -n ${PRODUCT}-license-server.deb \ && rm ${PRODUCT}-license-server.deb diff --git a/package-manager/Dockerfile.ubuntu2204 b/package-manager/Dockerfile.ubuntu2204 index ccbf9088f..58dd04a42 100644 --- a/package-manager/Dockerfile.ubuntu2204 +++ b/package-manager/Dockerfile.ubuntu2204 @@ -15,7 +15,7 @@ RUN /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install --no-cache-dir # Download RStudio Package Manager ---------------------------------------------# ARG RSPM_VERSION=2024.08.0-6 ARG RSPM_DOWNLOAD_URL=https://cdn.rstudio.com/package-manager/deb/amd64 -RUN curl -O ${RSPM_DOWNLOAD_URL}/rstudio-pm_${RSPM_VERSION}_amd64.deb \ +RUN curl -fsSL -O ${RSPM_DOWNLOAD_URL}/rstudio-pm_${RSPM_VERSION}_amd64.deb \ # Pre 7/25/23 packages && gpg --keyserver keyserver.ubuntu.com --recv-keys 3F32EE77E331692F \ # Post 7/25 packages diff --git a/package-manager/test/run_tests.sh b/package-manager/test/run_tests.sh index 4cf48553d..388df3433 100755 --- a/package-manager/test/run_tests.sh +++ b/package-manager/test/run_tests.sh @@ -23,7 +23,7 @@ else fi # install goss to tmp location and make executable -curl -sL https://github.com/aelsabbahy/goss/releases/download/v$GOSS_VERSION/goss-linux-amd64 -o /tmp/goss \ +curl -fsSL https://github.com/aelsabbahy/goss/releases/download/v$GOSS_VERSION/goss-linux-amd64 -o /tmp/goss \ && chmod +x /tmp/goss \ && GOSS=/tmp/goss diff --git a/product/base/Dockerfile.centos7 b/product/base/Dockerfile.centos7 index dfd13ed94..70c53154c 100644 --- a/product/base/Dockerfile.centos7 +++ b/product/base/Dockerfile.centos7 @@ -29,7 +29,7 @@ RUN gpg --batch --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 595E85A6B1 ### Install TinyTeX ### SHELL ["/bin/bash", "-o", "pipefail", "-c"] -RUN curl -sL "https://yihui.org/tinytex/install-bin-unix.sh" | sh \ +RUN curl -fsSL "https://yihui.org/tinytex/install-bin-unix.sh" | sh \ && /root/.TinyTeX/bin/*/tlmgr path remove \ && mv /root/.TinyTeX/ /opt/TinyTeX \ && /opt/TinyTeX/bin/*/tlmgr option sys_bin /usr/local/bin \ diff --git a/product/base/scripts/rhel/install_drivers.sh b/product/base/scripts/rhel/install_drivers.sh index 40538b100..7d227f1a0 100755 --- a/product/base/scripts/rhel/install_drivers.sh +++ b/product/base/scripts/rhel/install_drivers.sh @@ -13,7 +13,7 @@ fi echo "$d$d Installing Professional Drivers ${DRIVERS_VERSION} $d$d" drivers_url="https://cdn.rstudio.com/drivers/7C152C12/installer/rstudio-drivers-${DRIVERS_VERSION}.el.x86_64.rpm" -curl -sL "$drivers_url" -o "/tmp/rstudio-drivers_${DRIVERS_VERSION}.el.x86_64.rpm" +curl -fsSL "$drivers_url" -o "/tmp/rstudio-drivers_${DRIVERS_VERSION}.el.x86_64.rpm" yum install -y -q "/tmp/rstudio-drivers_${DRIVERS_VERSION}.el.x86_64.rpm" cat /opt/rstudio-drivers/odbcinst.ini.sample > /etc/odbcinst.ini diff --git a/product/base/scripts/rhel/install_python.sh b/product/base/scripts/rhel/install_python.sh index 8ee269607..14275973b 100755 --- a/product/base/scripts/rhel/install_python.sh +++ b/product/base/scripts/rhel/install_python.sh @@ -92,7 +92,7 @@ install_python() { mkdir -p "$PREFIX" local python_url="https://cdn.rstudio.com/python/${DISTRO}-${OS_VERSION}/pkgs/python-${PYTHON_VERSION}-1-1.x86_64.rpm" - curl -sL "$python_url" -o "/tmp/python-${PYTHON_VERSION}.rpm" + curl -fsSL "$python_url" -o "/tmp/python-${PYTHON_VERSION}.rpm" # shellcheck disable=SC2086 yum install $YUM_ARGS "/tmp/python-${PYTHON_VERSION}.rpm" diff --git a/product/base/scripts/rhel/install_r.sh b/product/base/scripts/rhel/install_r.sh index b346ea123..1dc254f27 100755 --- a/product/base/scripts/rhel/install_r.sh +++ b/product/base/scripts/rhel/install_r.sh @@ -98,7 +98,7 @@ install_r() { mkdir -p "$PREFIX" local r_url="https://cdn.rstudio.com/r/${DISTRO}-${OS_VERSION}/pkgs/R-${R_VERSION}-1-1.x86_64.rpm" - curl -sL "$r_url" -o "/tmp/r-${R_VERSION}.rpm" + curl -fsSL "$r_url" -o "/tmp/r-${R_VERSION}.rpm" # shellcheck disable=SC2086 yum install $YUM_ARGS "/tmp/r-${R_VERSION}.rpm" @@ -146,7 +146,7 @@ get_r_source() { echo "$d Fetching R-${R_VERSION} source code into $r_source_dir $d" mkdir -p "$r_source_dir" - curl -sL "$r_source_url" -o "$r_source_dir/R-${R_VERSION}.tar.gz" + curl -fsSL "$r_source_url" -o "$r_source_dir/R-${R_VERSION}.tar.gz" } diff --git a/product/base/scripts/ubuntu/install_drivers.sh b/product/base/scripts/ubuntu/install_drivers.sh index 68d332d97..9b956ad62 100755 --- a/product/base/scripts/ubuntu/install_drivers.sh +++ b/product/base/scripts/ubuntu/install_drivers.sh @@ -13,7 +13,7 @@ fi echo "$d$d Installing Professional Drivers ${DRIVERS_VERSION} $d$d" drivers_url="https://cdn.rstudio.com/drivers/7C152C12/installer/rstudio-drivers_${DRIVERS_VERSION}_amd64.deb" -curl -sL "$drivers_url" -o "/tmp/rstudio-drivers_${DRIVERS_VERSION}_amd64.deb" +curl -fsSL "$drivers_url" -o "/tmp/rstudio-drivers_${DRIVERS_VERSION}_amd64.deb" apt-get install -y -qq "/tmp/rstudio-drivers_${DRIVERS_VERSION}_amd64.deb" cat /opt/rstudio-drivers/odbcinst.ini.sample > /etc/odbcinst.ini diff --git a/product/base/scripts/ubuntu/install_python.sh b/product/base/scripts/ubuntu/install_python.sh index 13515ef74..e1178af81 100755 --- a/product/base/scripts/ubuntu/install_python.sh +++ b/product/base/scripts/ubuntu/install_python.sh @@ -88,7 +88,7 @@ install_python() { mkdir -p "$PREFIX" local python_url="https://cdn.rstudio.com/python/ubuntu-${UBUNTU_VERSION//./}/pkgs/python-${PYTHON_VERSION}_1_amd64.deb" - curl -sL "$python_url" -o "/tmp/python-${PYTHON_VERSION}.deb" + curl -fsSL "$python_url" -o "/tmp/python-${PYTHON_VERSION}.deb" # shellcheck disable=SC2086 apt-get install $APT_ARGS "/tmp/python-${PYTHON_VERSION}.deb" diff --git a/product/base/scripts/ubuntu/install_quarto.sh b/product/base/scripts/ubuntu/install_quarto.sh index 4bc67e276..f1f499c34 100755 --- a/product/base/scripts/ubuntu/install_quarto.sh +++ b/product/base/scripts/ubuntu/install_quarto.sh @@ -87,8 +87,6 @@ while true; do esac done -set -u - if [ -z "$QUARTO_VERSION" ] && [[ "$IS_WORKBENCH_INSTALLATION" -eq 0 ]]; then usage exit 1 diff --git a/product/base/scripts/ubuntu/install_r.sh b/product/base/scripts/ubuntu/install_r.sh index 03284b618..98d487458 100755 --- a/product/base/scripts/ubuntu/install_r.sh +++ b/product/base/scripts/ubuntu/install_r.sh @@ -122,7 +122,7 @@ install_r() { mkdir -p "$PREFIX" local r_url="https://cdn.rstudio.com/r/ubuntu-${UBUNTU_VERSION//./}/pkgs/r-${R_VERSION}_1_amd64.deb" - curl -sL "$r_url" -o "/tmp/r-${R_VERSION}.deb" + curl -fsSL "$r_url" -o "/tmp/r-${R_VERSION}.deb" # shellcheck disable=SC2086 apt-get install $APT_ARGS "/tmp/r-${R_VERSION}.deb" @@ -152,7 +152,7 @@ get_r_source() { echo "$d Fetching R-${R_VERSION} source code into $r_source_dir $d" mkdir -p "$r_source_dir" - curl -sL "$r_source_url" -o "$r_source_dir/R-${R_VERSION}.tar.gz" + curl -fsSL "$r_source_url" -o "$r_source_dir/R-${R_VERSION}.tar.gz" } diff --git a/product/base/test/run_tests.sh b/product/base/test/run_tests.sh index c18d6a8cd..a82b8362e 100755 --- a/product/base/test/run_tests.sh +++ b/product/base/test/run_tests.sh @@ -19,7 +19,7 @@ else fi # install goss to tmp location and make executable -curl -sL https://github.com/aelsabbahy/goss/releases/download/v$GOSS_VERSION/goss-linux-amd64 -o /tmp/goss \ +curl -fsSL https://github.com/aelsabbahy/goss/releases/download/v$GOSS_VERSION/goss-linux-amd64 -o /tmp/goss \ && chmod +x /tmp/goss \ && GOSS=/tmp/goss diff --git a/product/pro/test/run_tests.sh b/product/pro/test/run_tests.sh index c18d6a8cd..a82b8362e 100755 --- a/product/pro/test/run_tests.sh +++ b/product/pro/test/run_tests.sh @@ -19,7 +19,7 @@ else fi # install goss to tmp location and make executable -curl -sL https://github.com/aelsabbahy/goss/releases/download/v$GOSS_VERSION/goss-linux-amd64 -o /tmp/goss \ +curl -fsSL https://github.com/aelsabbahy/goss/releases/download/v$GOSS_VERSION/goss-linux-amd64 -o /tmp/goss \ && chmod +x /tmp/goss \ && GOSS=/tmp/goss diff --git a/r-session-complete/Dockerfile.ubuntu2204 b/r-session-complete/Dockerfile.ubuntu2204 index ec3a8658a..7db63af7c 100644 --- a/r-session-complete/Dockerfile.ubuntu2204 +++ b/r-session-complete/Dockerfile.ubuntu2204 @@ -24,7 +24,7 @@ RUN apt-get update \ rrdtool \ subversion \ && RSW_VERSION_URL=$(echo -n "${RSW_VERSION}" | sed 's/+/-/g') \ - && curl -o rstudio-workbench.deb "${RSW_DOWNLOAD_URL}/${RSW_NAME}-${RSW_VERSION_URL}-amd64.deb" \ + && curl -fsSL -o rstudio-workbench.deb "${RSW_DOWNLOAD_URL}/${RSW_NAME}-${RSW_VERSION_URL}-amd64.deb" \ # Pre 7/25/23 packages && gpg --keyserver keyserver.ubuntu.com --recv-keys 3F32EE77E331692F \ # Post 7/25 packages diff --git a/r-session-complete/test/run_tests.sh b/r-session-complete/test/run_tests.sh index f5744551d..8aff0f845 100755 --- a/r-session-complete/test/run_tests.sh +++ b/r-session-complete/test/run_tests.sh @@ -12,7 +12,7 @@ else fi # install goss to tmp location and make executable -curl -sL https://github.com/aelsabbahy/goss/releases/download/v$GOSS_VERSION/goss-linux-amd64 -o /tmp/goss \ +curl -fsSL https://github.com/aelsabbahy/goss/releases/download/v$GOSS_VERSION/goss-linux-amd64 -o /tmp/goss \ && chmod +x /tmp/goss \ && GOSS=/tmp/goss diff --git a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 index d9a91c812..6d2225b61 100644 --- a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 +++ b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 @@ -37,7 +37,7 @@ COPY deps/* /tmp/ ### Update/upgrade system packages ### COPY deps/apt_packages.txt /tmp/apt_packages.txt -RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - \ +RUN curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - \ && ${SCRIPTS_DIR}/apt.sh --update upgrade \ && ${SCRIPTS_DIR}/apt.sh install $(cat /tmp/apt_packages.txt) \ && ${SCRIPTS_DIR}/apt.sh --clean \ @@ -79,7 +79,7 @@ RUN ${SCRIPTS_DIR}/apt.sh --update upgrade \ ### Install Workbench ### SHELL ["/bin/bash", "-o", "pipefail", "-c"] -RUN curl -o rstudio-workbench.deb "${RSW_DOWNLOAD_URL}/${RSW_NAME}-${RSW_VERSION//+/-}-amd64.deb" \ +RUN curl -fsSL -o rstudio-workbench.deb "${RSW_DOWNLOAD_URL}/${RSW_NAME}-${RSW_VERSION//+/-}-amd64.deb" \ # Pre 7/25/23 packages && gpg --keyserver keyserver.ubuntu.com --recv-keys 3F32EE77E331692F \ # Post 7/25 packages @@ -110,7 +110,7 @@ RUN rm -f /etc/rstudio/launcher.pem /etc/rstudio/launcher.pub # TODO(ianpittwood): Replace monitor download with $RSW_VERSION after upgrading to 2023.06.0 RUN mkdir -p /opt/rstudio-license/ \ && mkdir -p /var/lib/rstudio-workbench \ - && curl -sL "https://s3.amazonaws.com/rstudio-ide-build/monitor/jammy/rsp-monitor-workbench-gcpw-amd64-${RSW_VERSION//+/-}.tar.gz" | \ + && curl -fsSL "https://s3.amazonaws.com/rstudio-ide-build/monitor/jammy/rsp-monitor-workbench-gcpw-amd64-${RSW_VERSION//+/-}.tar.gz" | \ tar xzvf - --strip 2 -C /opt/rstudio-license/ \ && chmod 0755 /opt/rstudio-license/license-manager \ && mv /opt/rstudio-license/license-manager /opt/rstudio-license/license-manager-orig \ diff --git a/workbench-for-google-cloud-workstations/test/run_tests.sh b/workbench-for-google-cloud-workstations/test/run_tests.sh index 9e86f1287..253e02863 100755 --- a/workbench-for-google-cloud-workstations/test/run_tests.sh +++ b/workbench-for-google-cloud-workstations/test/run_tests.sh @@ -30,7 +30,7 @@ GOSS_VERSION=${GOSS_VERSION:-0.4.6} GOSS_MAX_CONCURRENT=${GOSS_MAX_CONCURRENT:-5} # install goss to tmp location and make executable -curl -sL https://github.com/aelsabbahy/goss/releases/download/v$GOSS_VERSION/goss-linux-amd64 -o /tmp/goss \ +curl -fsSL https://github.com/aelsabbahy/goss/releases/download/v$GOSS_VERSION/goss-linux-amd64 -o /tmp/goss \ && chmod +x /tmp/goss \ && GOSS=/tmp/goss diff --git a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 index bcb6139d7..1f6437c9a 100644 --- a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 +++ b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 @@ -39,7 +39,7 @@ RUN apt-get update --fix-missing \ && rm -rf /var/lib/apt/lists/* RUN apt-get update \ - && curl -o rstudio-workbench.deb "${RSW_DOWNLOAD_URL}/${RSW_NAME}-${RSW_VERSION//+/-}-amd64.deb" \ + && curl -fsSL -o rstudio-workbench.deb "${RSW_DOWNLOAD_URL}/${RSW_NAME}-${RSW_VERSION//+/-}-amd64.deb" \ # Pre 7/25/23 packages && gpg --keyserver keyserver.ubuntu.com --recv-keys 3F32EE77E331692F \ # Post 7/25 packages @@ -51,7 +51,7 @@ RUN apt-get update \ && rm ./rstudio-workbench.deb \ && mkdir -p /opt/rstudio-license/ \ && mkdir -p /var/lib/rstudio-workbench/ \ - && curl -sL "https://s3.amazonaws.com/rstudio-ide-build/monitor/jammy/rsp-monitor-workbench-azureml-amd64-${RSW_VERSION//+/-}.tar.gz" \ + && curl -fsSL "https://s3.amazonaws.com/rstudio-ide-build/monitor/jammy/rsp-monitor-workbench-azureml-amd64-${RSW_VERSION//+/-}.tar.gz" \ | tar xzvf - --strip 2 -C /opt/rstudio-license/ \ && chmod 0755 /opt/rstudio-license/license-manager \ && mv /opt/rstudio-license/license-manager /opt/rstudio-license/license-manager-orig \ @@ -122,7 +122,7 @@ RUN /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install -r /tmp/py_packages ADD --chmod=755 https://raw.githubusercontent.com/rstudio/wait-for-it/master/wait-for-it.sh /usr/local/bin/wait-for-it.sh -RUN curl -sL https://aka.ms/InstallAzureCLIDeb | bash \ +RUN curl -fsSL https://aka.ms/InstallAzureCLIDeb | bash \ && az extension add -n ml -y COPY conf/* /etc/rstudio/ diff --git a/workbench-for-microsoft-azure-ml/deps/install-r.sh b/workbench-for-microsoft-azure-ml/deps/install-r.sh index 996206149..4fccb8295 100755 --- a/workbench-for-microsoft-azure-ml/deps/install-r.sh +++ b/workbench-for-microsoft-azure-ml/deps/install-r.sh @@ -31,7 +31,7 @@ install_r_packages() { for rvers in 4.0.5 4.1.3 4.2.3 4.3.2; do # install r version - curl -O https://cdn.rstudio.com/r/ubuntu-$(lsb_release -rs | sed 's/\.//g')/pkgs/r-${rvers}_1_amd64.deb + curl -fsSL -O https://cdn.rstudio.com/r/ubuntu-$(lsb_release -rs | sed 's/\.//g')/pkgs/r-${rvers}_1_amd64.deb DEBIAN_FRONTEND=noninteractive apt-get install -y ./r-${rvers}_1_amd64.deb rm -f ./r-${rvers}_1_amd64.deb diff --git a/workbench-for-microsoft-azure-ml/test/run_tests.sh b/workbench-for-microsoft-azure-ml/test/run_tests.sh index 8c14be699..c938aa52a 100755 --- a/workbench-for-microsoft-azure-ml/test/run_tests.sh +++ b/workbench-for-microsoft-azure-ml/test/run_tests.sh @@ -31,7 +31,7 @@ GOSS_VERSION=${GOSS_VERSION:-0.4.6} GOSS_MAX_CONCURRENT=${GOSS_MAX_CONCURRENT:-5} # install goss to tmp location and make executable -curl -sL https://github.com/aelsabbahy/goss/releases/download/v$GOSS_VERSION/goss-linux-amd64 -o /tmp/goss \ +curl -fsSL https://github.com/aelsabbahy/goss/releases/download/v$GOSS_VERSION/goss-linux-amd64 -o /tmp/goss \ && chmod +x /tmp/goss \ && GOSS=/tmp/goss diff --git a/workbench/Dockerfile.ubuntu2204 b/workbench/Dockerfile.ubuntu2204 index fd09b7e0d..544fe97bb 100644 --- a/workbench/Dockerfile.ubuntu2204 +++ b/workbench/Dockerfile.ubuntu2204 @@ -47,7 +47,7 @@ RUN apt-get update \ sssd \ supervisor \ && RSW_VERSION_URL=$(echo -n "${RSW_VERSION}" | sed 's/+/-/g') \ - && curl -o rstudio-workbench.deb "${RSW_DOWNLOAD_URL}/${RSW_NAME}-${RSW_VERSION_URL}-amd64.deb" \ + && curl -fsSL -o rstudio-workbench.deb "${RSW_DOWNLOAD_URL}/${RSW_NAME}-${RSW_VERSION_URL}-amd64.deb" \ # Pre 7/25/23 packages && gpg --keyserver keyserver.ubuntu.com --recv-keys 3F32EE77E331692F \ # Post 7/25 packages @@ -98,7 +98,7 @@ RUN /opt/python/"${PYTHON_VERSION_JUPYTER}"/bin/python -m venv /opt/python/jupyt && /opt/python/jupyter/bin/jupyter-nbextension enable --sys-prefix --py rsconnect_jupyter \ && /opt/python/jupyter/bin/jupyter-serverextension enable --sys-prefix --py rsconnect_jupyter -RUN curl -L -o /usr/local/bin/wait-for-it.sh https://raw.githubusercontent.com/rstudio/wait-for-it/master/wait-for-it.sh && \ +RUN curl -fsSL -o /usr/local/bin/wait-for-it.sh https://raw.githubusercontent.com/rstudio/wait-for-it/master/wait-for-it.sh && \ chmod +x /usr/local/bin/wait-for-it.sh COPY --chmod=600 sssd.conf /etc/sssd/sssd.conf diff --git a/workbench/test/run_tests.sh b/workbench/test/run_tests.sh index ccec65e4b..fd157f7ac 100755 --- a/workbench/test/run_tests.sh +++ b/workbench/test/run_tests.sh @@ -30,7 +30,7 @@ GOSS_VERSION=${GOSS_VERSION:-0.4.6} GOSS_MAX_CONCURRENT=${GOSS_MAX_CONCURRENT:-5} # install goss to tmp location and make executable -curl -sL https://github.com/aelsabbahy/goss/releases/download/v$GOSS_VERSION/goss-linux-amd64 -o /tmp/goss \ +curl -fsSL https://github.com/aelsabbahy/goss/releases/download/v$GOSS_VERSION/goss-linux-amd64 -o /tmp/goss \ && chmod +x /tmp/goss \ && GOSS=/tmp/goss From c0ba2f7a6e6eeefa78e63b12779a73a9b3bfcb55 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Wed, 4 Sep 2024 12:03:32 -0600 Subject: [PATCH 135/165] Fix Quarto tools output test pattern --- connect/test/goss.yaml | 2 +- r-session-complete/test/goss.yaml | 2 +- workbench-for-google-cloud-workstations/test/goss.yaml | 2 +- workbench-for-microsoft-azure-ml/test/goss.yaml | 2 +- workbench/test/goss.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/connect/test/goss.yaml b/connect/test/goss.yaml index 63cffa16d..739b02ce6 100644 --- a/connect/test/goss.yaml +++ b/connect/test/goss.yaml @@ -120,4 +120,4 @@ command: title: quarto_tinytex_installed exit-status: 0 stderr: - - "/tinytex\\s+Up to date\\s+v\\d{4}\\.\\d{2}\\.\\d{2}\\s+v\\d{4}\\.\\d{2}\\.\\d{2}/" + - "/tinytex\\s+Up to date\\s+v\\d{4}\\.\\d{2}\\s+v\\d{4}\\.\\d{2}/" diff --git a/r-session-complete/test/goss.yaml b/r-session-complete/test/goss.yaml index 44e611ec6..0c8a9b282 100644 --- a/r-session-complete/test/goss.yaml +++ b/r-session-complete/test/goss.yaml @@ -66,4 +66,4 @@ command: title: quarto_tinytex_installed exit-status: 0 stderr: - - "/tinytex\\s+Up to date\\s+v\\d{4}\\.\\d{2}\\.\\d{2}\\s+v\\d{4}\\.\\d{2}\\.\\d{2}/" + - "/tinytex\\s+Up to date\\s+v\\d{4}\\.\\d{2}\\s+v\\d{4}\\.\\d{2}/" diff --git a/workbench-for-google-cloud-workstations/test/goss.yaml b/workbench-for-google-cloud-workstations/test/goss.yaml index 121ca8974..b7bbf71b6 100644 --- a/workbench-for-google-cloud-workstations/test/goss.yaml +++ b/workbench-for-google-cloud-workstations/test/goss.yaml @@ -239,4 +239,4 @@ command: title: quarto_tinytex_installed exit-status: 0 stderr: - - "/tinytex\\s+Up to date\\s+v\\d{4}\\.\\d{2}\\.\\d{2}\\s+v\\d{4}\\.\\d{2}\\.\\d{2}/" + - "/tinytex\\s+Up to date\\s+v\\d{4}\\.\\d{2}\\s+v\\d{4}\\.\\d{2}/" diff --git a/workbench-for-microsoft-azure-ml/test/goss.yaml b/workbench-for-microsoft-azure-ml/test/goss.yaml index 332ad325c..aa3550544 100644 --- a/workbench-for-microsoft-azure-ml/test/goss.yaml +++ b/workbench-for-microsoft-azure-ml/test/goss.yaml @@ -157,4 +157,4 @@ command: title: quarto_tinytex_installed exit-status: 0 stderr: - - "/tinytex\\s+Up to date\\s+v\\d{4}\\.\\d{2}\\.\\d{2}\\s+v\\d{4}\\.\\d{2}\\.\\d{2}/" + - "/tinytex\\s+Up to date\\s+v\\d{4}\\.\\d{2}\\s+v\\d{4}\\.\\d{2}/" diff --git a/workbench/test/goss.yaml b/workbench/test/goss.yaml index 5830f11af..f2d54f298 100644 --- a/workbench/test/goss.yaml +++ b/workbench/test/goss.yaml @@ -154,4 +154,4 @@ command: title: quarto_tinytex_installed exit-status: 0 stderr: - - "/tinytex\\s+Up to date\\s+v\\d{4}\\.\\d{2}\\.\\d{2}\\s+v\\d{4}\\.\\d{2}\\.\\d{2}/" + - "/tinytex\\s+Up to date\\s+v\\d{4}\\.\\d{2}\\s+v\\d{4}\\.\\d{2}/" From 10c0e622c0e99f9509d93ccd97e8e86a2b37c011 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Wed, 4 Sep 2024 12:06:05 -0600 Subject: [PATCH 136/165] Change third part to optional --- connect/test/goss.yaml | 2 +- r-session-complete/test/goss.yaml | 2 +- workbench-for-google-cloud-workstations/test/goss.yaml | 2 +- workbench-for-microsoft-azure-ml/test/goss.yaml | 2 +- workbench/test/goss.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/connect/test/goss.yaml b/connect/test/goss.yaml index 739b02ce6..d44b4257f 100644 --- a/connect/test/goss.yaml +++ b/connect/test/goss.yaml @@ -120,4 +120,4 @@ command: title: quarto_tinytex_installed exit-status: 0 stderr: - - "/tinytex\\s+Up to date\\s+v\\d{4}\\.\\d{2}\\s+v\\d{4}\\.\\d{2}/" + - "/tinytex\\s+Up to date\\s+v\\d{4}\\.\\d{2}(\\.\\d{2})?\\s+v\\d{4}\\.\\d{2}(\\.\\d{2})?/" diff --git a/r-session-complete/test/goss.yaml b/r-session-complete/test/goss.yaml index 0c8a9b282..c5ea93a40 100644 --- a/r-session-complete/test/goss.yaml +++ b/r-session-complete/test/goss.yaml @@ -66,4 +66,4 @@ command: title: quarto_tinytex_installed exit-status: 0 stderr: - - "/tinytex\\s+Up to date\\s+v\\d{4}\\.\\d{2}\\s+v\\d{4}\\.\\d{2}/" + - "/tinytex\\s+Up to date\\s+v\\d{4}\\.\\d{2}(\\.\\d{2})?\\s+v\\d{4}\\.\\d{2}(\\.\\d{2})?/" diff --git a/workbench-for-google-cloud-workstations/test/goss.yaml b/workbench-for-google-cloud-workstations/test/goss.yaml index b7bbf71b6..8285d1b74 100644 --- a/workbench-for-google-cloud-workstations/test/goss.yaml +++ b/workbench-for-google-cloud-workstations/test/goss.yaml @@ -239,4 +239,4 @@ command: title: quarto_tinytex_installed exit-status: 0 stderr: - - "/tinytex\\s+Up to date\\s+v\\d{4}\\.\\d{2}\\s+v\\d{4}\\.\\d{2}/" + - "/tinytex\\s+Up to date\\s+v\\d{4}\\.\\d{2}(\\.\\d{2})?\\s+v\\d{4}\\.\\d{2}(\\.\\d{2})?/" diff --git a/workbench-for-microsoft-azure-ml/test/goss.yaml b/workbench-for-microsoft-azure-ml/test/goss.yaml index aa3550544..5983284a2 100644 --- a/workbench-for-microsoft-azure-ml/test/goss.yaml +++ b/workbench-for-microsoft-azure-ml/test/goss.yaml @@ -157,4 +157,4 @@ command: title: quarto_tinytex_installed exit-status: 0 stderr: - - "/tinytex\\s+Up to date\\s+v\\d{4}\\.\\d{2}\\s+v\\d{4}\\.\\d{2}/" + - "/tinytex\\s+Up to date\\s+v\\d{4}\\.\\d{2}(\\.\\d{2})?\\s+v\\d{4}\\.\\d{2}(\\.\\d{2})?/" diff --git a/workbench/test/goss.yaml b/workbench/test/goss.yaml index f2d54f298..297662dec 100644 --- a/workbench/test/goss.yaml +++ b/workbench/test/goss.yaml @@ -154,4 +154,4 @@ command: title: quarto_tinytex_installed exit-status: 0 stderr: - - "/tinytex\\s+Up to date\\s+v\\d{4}\\.\\d{2}\\s+v\\d{4}\\.\\d{2}/" + - "/tinytex\\s+Up to date\\s+v\\d{4}\\.\\d{2}(\\.\\d{2})?\\s+v\\d{4}\\.\\d{2}(\\.\\d{2})?/" From ca5a6a875852b914ff89bfed1a78d29a7c4fe8bf Mon Sep 17 00:00:00 2001 From: Trevor-Reid <104936561+Trevor-Reid@users.noreply.github.com> Date: Wed, 4 Sep 2024 17:24:22 -0400 Subject: [PATCH 137/165] Unpin ms-python.python ext and installms-toolsai.jupyter ext (#834) Co-authored-by: Ian Pittwood --- r-session-complete/vscode.extensions.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/r-session-complete/vscode.extensions.conf b/r-session-complete/vscode.extensions.conf index 0e38faabc..80e04b95c 100644 --- a/r-session-complete/vscode.extensions.conf +++ b/r-session-complete/vscode.extensions.conf @@ -1,4 +1,5 @@ quarto.quarto REditorSupport.r@2.8.2 -ms-python.python@2023.6.1 +ms-python.python posit.shiny +ms-toolsai.jupyter From 78b507757a7b0f7c5f62d733f9e10c32268f0fb1 Mon Sep 17 00:00:00 2001 From: Pablo Bianco Lascaray Date: Fri, 6 Sep 2024 16:45:11 -0400 Subject: [PATCH 138/165] Replaced broken sed command (on macs) with ed alternative. --- Justfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Justfile b/Justfile index fc43e484f..92de65f50 100644 --- a/Justfile +++ b/Justfile @@ -335,7 +335,14 @@ update-rsc-versions: sed {{ sed_vars }} -E "s/[0-9]{4}\.[0-9]{1,2}\.[0-9]{1,2}/`just _get-clean-version {{ RSC_VERSION }}`/g" \ connect/README.md \ connect-content-init/README.md - sed -i '/variable CONNECT_VERSION/!b;n;c\ \ \ \ default = "{{ RSC_VERSION }}"' docker-bake.hcl + ed -s docker-bake.hcl < Date: Tue, 10 Sep 2024 12:57:41 -0400 Subject: [PATCH 139/165] fix: update downloads.json to point to posit.co --- tools/get-version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/get-version.py b/tools/get-version.py index 6c73fd72a..411d18eac 100755 --- a/tools/get-version.py +++ b/tools/get-version.py @@ -108,7 +108,7 @@ def download_json(url): def get_downloads_json(): - return download_json("https://www.rstudio.com/wp-content/downloads.json") + return download_json("https://posit.co/wp-content/uploads/downloads.json") def rstudio_workbench_preview(): From 01a8a6d6a3d6578a8d3fc69ccd3e29ff01c94a2a Mon Sep 17 00:00:00 2001 From: Zach Hannum Date: Thu, 12 Sep 2024 17:35:19 -0400 Subject: [PATCH 140/165] Update umask from 0027 to 0077 per security recommendation To prevent group access --- workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 | 2 +- workbench-for-google-cloud-workstations/pam/rstudio-session | 2 +- workbench-for-google-cloud-workstations/test/goss.yaml | 2 +- workbench/Dockerfile.ubuntu2204 | 2 +- workbench/pam/rstudio-session | 2 +- workbench/test/goss.yaml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 index 6d2225b61..a8fb97d4a 100644 --- a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 +++ b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 @@ -141,7 +141,7 @@ ADD --chmod=755 https://raw.githubusercontent.com/rstudio/wait-for-it/master/wai RUN mkdir -p /var/lib/rstudio-server/monitor/log \ && chown -R rstudio-server:rstudio-server /var/lib/rstudio-server/monitor \ && mkdir -p /startup/custom/ \ - && printf '\n# allow home directory creation\nsession required pam_mkhomedir.so skel=/etc/skel umask=0027' >> /etc/pam.d/common-session + && printf '\n# allow home directory creation\nsession required pam_mkhomedir.so skel=/etc/skel umask=0077' >> /etc/pam.d/common-session COPY --chmod=755 TurboActivate.dat /opt/rstudio-license/license-manager.conf COPY --chmod=755 license-manager-shim /opt/rstudio-license/license-manager diff --git a/workbench-for-google-cloud-workstations/pam/rstudio-session b/workbench-for-google-cloud-workstations/pam/rstudio-session index 81bbcd184..3f6f23c86 100644 --- a/workbench-for-google-cloud-workstations/pam/rstudio-session +++ b/workbench-for-google-cloud-workstations/pam/rstudio-session @@ -17,7 +17,7 @@ password sufficient pam_sss.so use_authtok password required pam_unix.so try_first_pass nullok sha512 shadow password optional pam_permit.so -session required pam_mkhomedir.so skel=/etc/skel umask=0027 +session required pam_mkhomedir.so skel=/etc/skel umask=0077 session required pam_env.so readenv=1 session required pam_env.so readenv=1 envfile=/etc/default/locale session required pam_limits.so diff --git a/workbench-for-google-cloud-workstations/test/goss.yaml b/workbench-for-google-cloud-workstations/test/goss.yaml index 8285d1b74..7839667cf 100644 --- a/workbench-for-google-cloud-workstations/test/goss.yaml +++ b/workbench-for-google-cloud-workstations/test/goss.yaml @@ -106,7 +106,7 @@ file: /etc/pam.d/common-session: exists: true contents: - - "/^session required pam_mkhomedir.so skel=/etc/skel umask=0027$/" + - "/^session required pam_mkhomedir.so skel=/etc/skel umask=0077$/" /etc/sssd/sssd.conf: exists: true owner: root diff --git a/workbench/Dockerfile.ubuntu2204 b/workbench/Dockerfile.ubuntu2204 index 544fe97bb..581222f64 100644 --- a/workbench/Dockerfile.ubuntu2204 +++ b/workbench/Dockerfile.ubuntu2204 @@ -107,7 +107,7 @@ COPY conf/* /etc/rstudio/ RUN mkdir -p /var/lib/rstudio-server/monitor/log && \ chown -R rstudio-server:rstudio-server /var/lib/rstudio-server/monitor && \ mkdir -p /startup/custom/ && \ - printf '\n# allow home directory creation\nsession required pam_mkhomedir.so skel=/etc/skel umask=0027' >> /etc/pam.d/common-session + printf '\n# allow home directory creation\nsession required pam_mkhomedir.so skel=/etc/skel umask=0077' >> /etc/pam.d/common-session EXPOSE 8787/tcp EXPOSE 5559/tcp diff --git a/workbench/pam/rstudio-session b/workbench/pam/rstudio-session index 81bbcd184..3f6f23c86 100644 --- a/workbench/pam/rstudio-session +++ b/workbench/pam/rstudio-session @@ -17,7 +17,7 @@ password sufficient pam_sss.so use_authtok password required pam_unix.so try_first_pass nullok sha512 shadow password optional pam_permit.so -session required pam_mkhomedir.so skel=/etc/skel umask=0027 +session required pam_mkhomedir.so skel=/etc/skel umask=0077 session required pam_env.so readenv=1 session required pam_env.so readenv=1 envfile=/etc/default/locale session required pam_limits.so diff --git a/workbench/test/goss.yaml b/workbench/test/goss.yaml index 297662dec..9d8ae4a62 100644 --- a/workbench/test/goss.yaml +++ b/workbench/test/goss.yaml @@ -88,7 +88,7 @@ file: /etc/pam.d/common-session: exists: true contains: - - "/^session required pam_mkhomedir.so skel=/etc/skel umask=0027$/" + - "/^session required pam_mkhomedir.so skel=/etc/skel umask=0077$/" /etc/sssd/sssd.conf: exists: true owner: root From ededfde3f88f5fe7b15d5ed4e725198ba1ced805 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 16 Sep 2024 13:34:04 -0600 Subject: [PATCH 141/165] Pin WGCW build back to Ubuntu 22.04 --- workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 index 6d2225b61..d32b72feb 100644 --- a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 +++ b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 @@ -1,5 +1,5 @@ FROM product-base-pro as posit_base -FROM us-central1-docker.pkg.dev/cloud-workstations-images/predefined/base:latest as build +FROM us-central1-docker.pkg.dev/cloud-workstations-images/predefined/base:last-ubuntu2204 as build ### ARG declarations ### ARG DEBIAN_FRONTEND=noninteractive From 9cf4a2b3f319e7c29befb8e622d6afeaddd51506 Mon Sep 17 00:00:00 2001 From: "Benjamin R. J. Schwedler" Date: Thu, 5 Sep 2024 09:05:15 -0500 Subject: [PATCH 142/165] Change Domain for P3M to posit.co Several configurations were using the rstudio.com domain --- connect/rstudio-connect.gcfg | 4 ++-- content/base/Dockerfile.ubuntu1804 | 2 +- content/base/Dockerfile.ubuntu2204 | 2 +- product/base/scripts/rhel/install_r.sh | 2 +- product/base/scripts/ubuntu/install_r.sh | 2 +- workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 | 2 +- workbench-for-microsoft-azure-ml/conf/repos.conf | 2 +- workbench-for-microsoft-azure-ml/deps/install-r.sh | 4 ++-- workbench/conf/repos.conf | 4 ++-- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/connect/rstudio-connect.gcfg b/connect/rstudio-connect.gcfg index 133126646..65bc81058 100644 --- a/connect/rstudio-connect.gcfg +++ b/connect/rstudio-connect.gcfg @@ -42,10 +42,10 @@ Enabled = true Executable = /usr/bin/tensorflow_model_server [RPackageRepository "CRAN"] -URL = https://packagemanager.rstudio.com/cran/__linux__/jammy/latest +URL = https://packagemanager.posit.co/cran/__linux__/jammy/latest [RPackageRepository "RSPM"] -URL = https://packagemanager.rstudio.com/cran/__linux__/jammy/latest +URL = https://packagemanager.posit.co/cran/__linux__/jammy/latest [Logging] ServiceLog = STDOUT diff --git a/content/base/Dockerfile.ubuntu1804 b/content/base/Dockerfile.ubuntu1804 index 87c2d09e4..9c9efb81b 100644 --- a/content/base/Dockerfile.ubuntu1804 +++ b/content/base/Dockerfile.ubuntu1804 @@ -125,6 +125,6 @@ RUN curl -fsSL -o miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-${ # install quarto ARG QUARTO_VERSION=1.0.37 COPY maybe_install_quarto.sh /tmp/maybe_install_quarto.sh -RUN /opt/R/${R_VERSION}/bin/R -e 'install.packages("odbc", repos="https://packagemanager.rstudio.com/cran/__linux__/bionic/latest")' \ +RUN /opt/R/${R_VERSION}/bin/R -e 'install.packages("odbc", repos="https://packagemanager.posit.co/cran/__linux__/bionic/latest")' \ && /tmp/maybe_install_quarto.sh \ && rm -f /tmp/maybe_install_quarto.sh diff --git a/content/base/Dockerfile.ubuntu2204 b/content/base/Dockerfile.ubuntu2204 index 241df921a..9397dfb83 100644 --- a/content/base/Dockerfile.ubuntu2204 +++ b/content/base/Dockerfile.ubuntu2204 @@ -119,6 +119,6 @@ RUN curl -fsSL -O https://cdn.rstudio.com/python/${DISTRIBUTION}/pkgs/python-${P # install quarto ARG QUARTO_VERSION=1.3.340 COPY maybe_install_quarto.sh /tmp/maybe_install_quarto.sh -RUN /opt/R/${R_VERSION}/bin/R -e 'install.packages("odbc", repos="https://packagemanager.rstudio.com/cran/__linux__/bionic/latest")' \ +RUN /opt/R/${R_VERSION}/bin/R -e 'install.packages("odbc", repos="https://packagemanager.posit.co/cran/__linux__/bionic/latest")' \ && /tmp/maybe_install_quarto.sh \ && rm -f /tmp/maybe_install_quarto.sh diff --git a/product/base/scripts/rhel/install_r.sh b/product/base/scripts/rhel/install_r.sh index 1dc254f27..76f28669d 100755 --- a/product/base/scripts/rhel/install_r.sh +++ b/product/base/scripts/rhel/install_r.sh @@ -130,7 +130,7 @@ install_r_packages() { fi echo "$d$d Installing R-${R_VERSION} packages from ${R_PKG_FILE} $d$d" - local cran_repo="https://packagemanager.rstudio.com/cran/__linux__/${DISTRO}${OS_VERSION}/latest" + local cran_repo="https://packagemanager.posit.co/cran/__linux__/${DISTRO}${OS_VERSION}/latest" $R_BIN --vanilla --no-echo < /dev/null install.packages(readLines("$R_PKG_FILE"), repos = "$cran_repo") diff --git a/product/base/scripts/ubuntu/install_r.sh b/product/base/scripts/ubuntu/install_r.sh index 98d487458..306d953c7 100755 --- a/product/base/scripts/ubuntu/install_r.sh +++ b/product/base/scripts/ubuntu/install_r.sh @@ -136,7 +136,7 @@ install_r_packages() { fi echo "$d$d Installing R-${R_VERSION} packages from ${R_PKG_FILE} $d$d" - local cran_repo="https://packagemanager.rstudio.com/cran/__linux__/${UBUNTU_CODENAME}/latest" + local cran_repo="https://packagemanager.posit.co/cran/__linux__/${UBUNTU_CODENAME}/latest" $R_BIN --vanilla --no-echo < /dev/null install.packages(readLines("$R_PKG_FILE"), repos = "$cran_repo", clean = TRUE) diff --git a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 index d32b72feb..d62faba03 100644 --- a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 +++ b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 @@ -75,7 +75,7 @@ RUN ${SCRIPTS_DIR}/apt.sh --update upgrade \ && DRIVERS_VERSION=${DRIVERS_VERSION} ${SCRIPTS_DIR}/install_drivers.sh \ && ${SCRIPTS_DIR}/apt.sh --clean \ && 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__/jammy/latest")' + && /opt/R/${R_VERSION}/bin/R -e 'install.packages("odbc", repos="https://packagemanager.posit.co/cran/__linux__/jammy/latest")' ### Install Workbench ### SHELL ["/bin/bash", "-o", "pipefail", "-c"] diff --git a/workbench-for-microsoft-azure-ml/conf/repos.conf b/workbench-for-microsoft-azure-ml/conf/repos.conf index 5745e36cf..f80e3772b 100644 --- a/workbench-for-microsoft-azure-ml/conf/repos.conf +++ b/workbench-for-microsoft-azure-ml/conf/repos.conf @@ -1 +1 @@ -CRAN=https://packagemanager.rstudio.com/cran/__linux__/jammy/latest +CRAN=https://packagemanager.posit.co/cran/__linux__/jammy/latest diff --git a/workbench-for-microsoft-azure-ml/deps/install-r.sh b/workbench-for-microsoft-azure-ml/deps/install-r.sh index 4fccb8295..41dec5e4c 100755 --- a/workbench-for-microsoft-azure-ml/deps/install-r.sh +++ b/workbench-for-microsoft-azure-ml/deps/install-r.sh @@ -18,7 +18,7 @@ install_r_packages() { # passing a CRAN repo as third arg will install from that repo, in this case however, # we are using the RStudio public package manager so we can install from binaries and not source # this speeds everything up dramatically - local CRAN_REPO=${3:-"https://packagemanager.rstudio.com/cran/__linux__/${UBUNTU_CODENAME}/latest"} + local CRAN_REPO=${3:-"https://packagemanager.posit.co/cran/__linux__/${UBUNTU_CODENAME}/latest"} # create an R matrix-style string of packages local r_packages=$(awk '{print "\"" $0 "\""}' "$1" | paste -d',' -s -) @@ -36,5 +36,5 @@ for rvers in 4.0.5 4.1.3 4.2.3 4.3.2; do rm -f ./r-${rvers}_1_amd64.deb # install packages - install_r_packages /tmp/r_packages.txt /opt/R/${rvers}/bin/R https://packagemanager.rstudio.com/cran/__linux__/${UBUNTU_CODENAME}/latest + install_r_packages /tmp/r_packages.txt /opt/R/${rvers}/bin/R https://packagemanager.posit.co/cran/__linux__/${UBUNTU_CODENAME}/latest done diff --git a/workbench/conf/repos.conf b/workbench/conf/repos.conf index e0a56fc08..39b07032f 100644 --- a/workbench/conf/repos.conf +++ b/workbench/conf/repos.conf @@ -1,2 +1,2 @@ -RSPM=https://packagemanager.rstudio.com/cran/__linux__/jammy/latest -CRAN=https://packagemanager.rstudio.com/cran/__linux__/jammy/latest +RSPM=https://packagemanager.posit.co/cran/__linux__/jammy/latest +CRAN=https://packagemanager.posit.co/cran/__linux__/jammy/latest From 97acde2a540d122c29a4d4558c5ef4f11e562ca2 Mon Sep 17 00:00:00 2001 From: "Benjamin R. J. Schwedler" Date: Thu, 5 Sep 2024 09:07:23 -0500 Subject: [PATCH 143/165] Use jammy P3M repo for Ubuntu 22.04 content image --- content/base/Dockerfile.ubuntu2204 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/base/Dockerfile.ubuntu2204 b/content/base/Dockerfile.ubuntu2204 index 9397dfb83..1317741e0 100644 --- a/content/base/Dockerfile.ubuntu2204 +++ b/content/base/Dockerfile.ubuntu2204 @@ -119,6 +119,6 @@ RUN curl -fsSL -O https://cdn.rstudio.com/python/${DISTRIBUTION}/pkgs/python-${P # install quarto ARG QUARTO_VERSION=1.3.340 COPY maybe_install_quarto.sh /tmp/maybe_install_quarto.sh -RUN /opt/R/${R_VERSION}/bin/R -e 'install.packages("odbc", repos="https://packagemanager.posit.co/cran/__linux__/bionic/latest")' \ +RUN /opt/R/${R_VERSION}/bin/R -e 'install.packages("odbc", repos="https://packagemanager.posit.co/cran/__linux__/jammy/latest")' \ && /tmp/maybe_install_quarto.sh \ && rm -f /tmp/maybe_install_quarto.sh From fdd3903348a2b5bfca14632f3900e7533047f37d Mon Sep 17 00:00:00 2001 From: Zach Hannum Date: Wed, 18 Sep 2024 12:13:30 -0400 Subject: [PATCH 144/165] Add NEWS entry for Workbench umask update --- workbench/NEWS.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/workbench/NEWS.md b/workbench/NEWS.md index ab9e0af06..f118fcdfd 100644 --- a/workbench/NEWS.md +++ b/workbench/NEWS.md @@ -1,4 +1,9 @@ +# 2024.09.0 + +- Update umask for user home directory from 0022 to 0077 to improve security of directory permissions + # 2023.03.1 + - No changes # 2023.03.0 From 41f7c8292f39554a5987f8c1b4b3c7ba1af01c80 Mon Sep 17 00:00:00 2001 From: Jonathan Yoder Date: Fri, 20 Sep 2024 10:09:12 -0400 Subject: [PATCH 145/165] Bump PPM to 2024.08.2-9 --- Justfile | 2 +- docker-bake.hcl | 2 +- package-manager/.env | 2 +- package-manager/Dockerfile.ubuntu2204 | 2 +- package-manager/README.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Justfile b/Justfile index fc43e484f..7faebea09 100644 --- a/Justfile +++ b/Justfile @@ -8,7 +8,7 @@ sed_vars := if os() == "macos" { "-i ''" } else { "-i" } BUILDX_PATH := "" RSC_VERSION := "2024.08.0" -RSPM_VERSION := "2024.08.0-6" +RSPM_VERSION := "2024.08.2-9" RSW_VERSION := "2024.04.2+764.pro1" DRIVERS_VERSION := "2023.05.0" diff --git a/docker-bake.hcl b/docker-bake.hcl index f583d3fe9..8309c0ef2 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -4,7 +4,7 @@ variable CONNECT_VERSION { } variable PACKAGE_MANAGER_VERSION { - default = "2024.08.0-6" + default = "2024.08.2-9" } variable WORKBENCH_VERSION { diff --git a/package-manager/.env b/package-manager/.env index 0900bba0c..11b0a634d 100644 --- a/package-manager/.env +++ b/package-manager/.env @@ -1,4 +1,4 @@ -RSPM_VERSION=2024.08.0-6 +RSPM_VERSION=2024.08.2-9 R_VERSION=4.4.0 R_VERSION_ALT=4.1.3 PYTHON_VERSION=3.9.17 diff --git a/package-manager/Dockerfile.ubuntu2204 b/package-manager/Dockerfile.ubuntu2204 index 58dd04a42..771c5a751 100644 --- a/package-manager/Dockerfile.ubuntu2204 +++ b/package-manager/Dockerfile.ubuntu2204 @@ -13,7 +13,7 @@ RUN /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install --no-cache-dir buil RUN /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install --no-cache-dir build virtualenv # Download RStudio Package Manager ---------------------------------------------# -ARG RSPM_VERSION=2024.08.0-6 +ARG RSPM_VERSION=2024.08.2-9 ARG RSPM_DOWNLOAD_URL=https://cdn.rstudio.com/package-manager/deb/amd64 RUN curl -fsSL -O ${RSPM_DOWNLOAD_URL}/rstudio-pm_${RSPM_VERSION}_amd64.deb \ # Pre 7/25/23 packages diff --git a/package-manager/README.md b/package-manager/README.md index a1c442429..c458dd12b 100644 --- a/package-manager/README.md +++ b/package-manager/README.md @@ -6,7 +6,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2024.08.0`, `ubuntu2204-2024.08.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/package-manager/Dockerfile.ubuntu2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.08.2`, `ubuntu2204-2024.08.2`](https://github.com/rstudio/rstudio-docker-products/blob/main/package-manager/Dockerfile.ubuntu2204) # What is RStudio Package Manager? From 2d5d7acae863361b6e465c664b82fe0d07753fdf Mon Sep 17 00:00:00 2001 From: Pablo Bianco Lascaray Date: Mon, 23 Sep 2024 08:28:24 -0400 Subject: [PATCH 146/165] Made changes for all products. --- Justfile | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/Justfile b/Justfile index 92de65f50..ef75c734f 100644 --- a/Justfile +++ b/Justfile @@ -305,7 +305,10 @@ update-rsw-versions: 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 - sed -i '/variable WORKBENCH_VERSION/!b;n;c\ \ \ \ default = "{{ RSW_VERSION }}"' docker-bake.hcl + awk -v new_version="{{ RSW_VERSION }}" ' + /variable WORKBENCH_VERSION/ { print; getline; print " default = \"" new_version "\""; next } + { print } + ' docker-bake.hcl > file.tmp && mv file.tmp docker-bake.hcl # just RSPM_VERSION=1.2.3 update-rspm-versions update-rspm-versions: @@ -320,7 +323,10 @@ update-rspm-versions: package-manager/Justfile \ Justfile sed {{ sed_vars }} -E "s/[0-9]{4}\.[0-9]{1,2}\.[0-9]{1,2}/`just _get-clean-version {{ RSPM_VERSION }}`/g" package-manager/README.md - sed -i '/variable PACKAGE_MANAGER_VERSION/!b;n;c\ \ \ \ default = "{{ RSPM_VERSION }}"' docker-bake.hcl + awk -v new_version="{{ RSPM_VERSION }}" ' + /variable PACKAGE_MANAGER_VERSION/ { print; getline; print " default = \"" new_version "\""; next } + { print } + ' docker-bake.hcl > file.tmp && mv file.tmp docker-bake.hcl # just RSC_VERSION=1.2.3 update-rsc-versions update-rsc-versions: @@ -335,14 +341,10 @@ update-rsc-versions: sed {{ sed_vars }} -E "s/[0-9]{4}\.[0-9]{1,2}\.[0-9]{1,2}/`just _get-clean-version {{ RSC_VERSION }}`/g" \ connect/README.md \ connect-content-init/README.md - ed -s docker-bake.hcl < file.tmp && mv file.tmp docker-bake.hcl # just R_VERSION=3.2.1 R_VERSION_ALT=4.1.0 update-r-versions update-r-versions: update-default-r-versions From bbf7fe9ecaa5a304f28e3ec3eb4077d94d4d17b7 Mon Sep 17 00:00:00 2001 From: Zach Hannum Date: Tue, 24 Sep 2024 09:40:52 -0400 Subject: [PATCH 147/165] Bump Workbench version to 2024.09.0+375.pro3 --- Justfile | 2 +- docker-bake.hcl | 2 +- r-session-complete/.env | 2 +- r-session-complete/Dockerfile.ubuntu2204 | 2 +- r-session-complete/README.md | 2 +- workbench-for-google-cloud-workstations/.env | 4 ++-- workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 | 2 +- workbench-for-microsoft-azure-ml/.env | 2 +- workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 | 4 ++-- workbench/.env | 2 +- workbench/Dockerfile.ubuntu2204 | 2 +- workbench/README.md | 2 +- 12 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Justfile b/Justfile index 648beffb2..7f67569a6 100644 --- a/Justfile +++ b/Justfile @@ -9,7 +9,7 @@ BUILDX_PATH := "" RSC_VERSION := "2024.08.0" RSPM_VERSION := "2024.08.2-9" -RSW_VERSION := "2024.04.2+764.pro1" +RSW_VERSION := "2024.09.0+375.pro3" DRIVERS_VERSION := "2023.05.0" DRIVERS_VERSION_RHEL := DRIVERS_VERSION + "-1" diff --git a/docker-bake.hcl b/docker-bake.hcl index 8309c0ef2..553061c02 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -8,7 +8,7 @@ variable PACKAGE_MANAGER_VERSION { } variable WORKBENCH_VERSION { - default = "2024.04.2+764.pro1" + default = "2024.09.0+375.pro3" } variable DRIVERS_VERSION { diff --git a/r-session-complete/.env b/r-session-complete/.env index 43fc3794d..8ba538cd6 100644 --- a/r-session-complete/.env +++ b/r-session-complete/.env @@ -1,4 +1,4 @@ R_VERSION=4.1.0 PYTHON_VERSION=3.9.5 -RSW_VERSION=2024.04.2+764.pro1 +RSW_VERSION=2024.09.0+375.pro3 DRIVERS_VERSION=2024.03.0-1 diff --git a/r-session-complete/Dockerfile.ubuntu2204 b/r-session-complete/Dockerfile.ubuntu2204 index 7db63af7c..4750bd732 100644 --- a/r-session-complete/Dockerfile.ubuntu2204 +++ b/r-session-complete/Dockerfile.ubuntu2204 @@ -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.04.2+764.pro1 +ARG RSW_VERSION=2024.09.0+375.pro3 ARG RSW_NAME=rstudio-workbench ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64 ARG SCRIPTS_DIR=/opt/positscripts diff --git a/r-session-complete/README.md b/r-session-complete/README.md index 351078ce6..20381c600 100644 --- a/r-session-complete/README.md +++ b/r-session-complete/README.md @@ -7,7 +7,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2024.04.2`, `ubuntu2204-2024.04.2`](https://github.com/rstudio/rstudio-docker-products/blob/main/r-session-complete/Dockerfile.ubuntu2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.09.0`, `ubuntu2204-2024.09.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/r-session-complete/Dockerfile.ubuntu2204) # What are the r-session-complete images? diff --git a/workbench-for-google-cloud-workstations/.env b/workbench-for-google-cloud-workstations/.env index 114613d09..238825926 100644 --- a/workbench-for-google-cloud-workstations/.env +++ b/workbench-for-google-cloud-workstations/.env @@ -1,5 +1,5 @@ -RSW_VERSION=2024.04.2+764.pro1 -RSW_TAG_VERSION=2024.04.2-764.pro1 +RSW_VERSION=2024.09.0+375.pro3 +RSW_TAG_VERSION=2024.09.0-375.pro3 RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64 RSW_NAME=rstudio-workbench PYTHON_VERSION=3.11.9 diff --git a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 index d62faba03..c7c568b83 100644 --- a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 +++ b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 @@ -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.04.2+764.pro1 +ARG RSW_VERSION=2024.09.0+375.pro3 ARG RSW_NAME=rstudio-workbench ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64 ARG SCRIPTS_DIR=/opt/positscripts diff --git a/workbench-for-microsoft-azure-ml/.env b/workbench-for-microsoft-azure-ml/.env index 5cb6825f1..8ed04719c 100644 --- a/workbench-for-microsoft-azure-ml/.env +++ b/workbench-for-microsoft-azure-ml/.env @@ -1,4 +1,4 @@ -RSW_VERSION=2024.04.2+764.pro1 +RSW_VERSION=2024.09.0+375.pro3 RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/bionic/amd64 RSW_NAME=rstudio-workbench PYTHON_VERSION=3.9.14 diff --git a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 index 1f6437c9a..ac1ec2834 100644 --- a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 +++ b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 @@ -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.04.2+764.pro1 +ARG RSW_VERSION=2024.09.0+375.pro3 ARG RSW_NAME=rstudio-workbench ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64 ARG SCRIPTS_DIR=/opt/positscripts @@ -187,5 +187,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.04.2+764.pro1' \ + org.opencontainers.image.version='2024.09.0+375.pro3' \ org.opencontainers.image.url='https://www.rstudio.com/products/workbench/' diff --git a/workbench/.env b/workbench/.env index c5852ccd4..2c1af1c85 100644 --- a/workbench/.env +++ b/workbench/.env @@ -1,4 +1,4 @@ -RSW_VERSION=2024.04.2+764.pro1 +RSW_VERSION=2024.09.0+375.pro3 RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/bionic/amd64 RSW_NAME=rstudio-workbench PYTHON_VERSION=3.9.17 diff --git a/workbench/Dockerfile.ubuntu2204 b/workbench/Dockerfile.ubuntu2204 index 544fe97bb..6903effd1 100644 --- a/workbench/Dockerfile.ubuntu2204 +++ b/workbench/Dockerfile.ubuntu2204 @@ -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.04.2+764.pro1 +ARG RSW_VERSION=2024.09.0+375.pro3 ARG RSW_NAME=rstudio-workbench ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64 ARG SCRIPTS_DIR=/opt/positscripts diff --git a/workbench/README.md b/workbench/README.md index 92584be7c..3b36732e5 100644 --- a/workbench/README.md +++ b/workbench/README.md @@ -7,7 +7,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2024.04.2`, `ubuntu2204-2024.04.2`](https://github.com/rstudio/rstudio-docker-products/blob/main/workbench/Dockerfile.ubuntu2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.09.0`, `ubuntu2204-2024.09.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/workbench/Dockerfile.ubuntu2204) # What is RStudio Workbench? From dda70fddc1475e8c9a29d25cf413fe2c056c6a5d Mon Sep 17 00:00:00 2001 From: "Benjamin R. J. Schwedler" Date: Tue, 24 Sep 2024 09:55:38 -0500 Subject: [PATCH 148/165] Update goss tests for pwb-code-server --- workbench-for-google-cloud-workstations/test/goss.yaml | 5 ++++- workbench-for-microsoft-azure-ml/test/goss.yaml | 5 ++++- workbench/test/goss.yaml | 7 ++----- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/workbench-for-google-cloud-workstations/test/goss.yaml b/workbench-for-google-cloud-workstations/test/goss.yaml index 8285d1b74..f8500c0a3 100644 --- a/workbench-for-google-cloud-workstations/test/goss.yaml +++ b/workbench-for-google-cloud-workstations/test/goss.yaml @@ -70,8 +70,11 @@ file: exists: true owner: rstudio-server group: rstudio-server - /usr/lib/rstudio-server/bin/code-server/bin/code-server: + /usr/lib/rstudio-server/bin/pwb-code-server/bin/code-server: exists: true + # Old code-server location + /usr/lib/rstudio-server/bin/code-server/bin/code-server: + exists: false /etc/rstudio/vscode.conf: exists: true /etc/rstudio/jupyter.conf: diff --git a/workbench-for-microsoft-azure-ml/test/goss.yaml b/workbench-for-microsoft-azure-ml/test/goss.yaml index 5983284a2..221316fc0 100644 --- a/workbench-for-microsoft-azure-ml/test/goss.yaml +++ b/workbench-for-microsoft-azure-ml/test/goss.yaml @@ -78,8 +78,11 @@ file: exists: true owner: rstudio-server group: rstudio-server - /usr/lib/rstudio-server/bin/code-server/bin/code-server: + /usr/lib/rstudio-server/bin/pwb-code-server/bin/code-server: exists: true + # Old code-server location + /usr/lib/rstudio-server/bin/code-server/bin/code-server: + exists: false /etc/rstudio/vscode.conf: exists: true /tmp/startup.log: diff --git a/workbench/test/goss.yaml b/workbench/test/goss.yaml index 297662dec..2a5ce7b84 100644 --- a/workbench/test/goss.yaml +++ b/workbench/test/goss.yaml @@ -69,14 +69,11 @@ file: exists: true owner: rstudio-server group: rstudio-server - {{ $version_split := split "." .Env.RSW_VERSION }} - {{ if or (ge ($version_split._0 | atoi) 2025) (and (ge ($version_split._0 | atoi) 2024) (ge ($version_split._1 | atoi) 7)) }} /usr/lib/rstudio-server/bin/pwb-code-server/bin/code-server: exists: true - {{ else }} + # Old code-server location /usr/lib/rstudio-server/bin/code-server/bin/code-server: - exists: true - {{ end }} + exists: false /var/lib/rstudio-launcher/Local/jobs/buildkitsandbox: exists: false /etc/rstudio/vscode.conf: From 5019205a7e8390471f446b3548d3c20d9110e56c Mon Sep 17 00:00:00 2001 From: Melissa Barca <5323711+melissa-barca@users.noreply.github.com> Date: Tue, 24 Sep 2024 11:30:09 -0400 Subject: [PATCH 149/165] Updates to support PWB Code Server. * Remove maybe_install_vs_code as the versions that depend on this are no longer supported. * Update default VS Code URL to PWB Code Server. * Remove `--verbose` arg that isn't supported by PWB Code Server --- r-session-complete/Dockerfile.ubuntu2204 | 4 ---- r-session-complete/maybe_install_vs_code.sh | 13 ------------- .../conf/vscode.conf | 4 ++-- workbench-for-microsoft-azure-ml/conf/vscode.conf | 5 +++-- workbench/Dockerfile.ubuntu2204 | 4 ---- workbench/conf/vscode.conf | 4 ++-- workbench/maybe_install_vs_code.sh | 13 ------------- 7 files changed, 7 insertions(+), 40 deletions(-) delete mode 100755 r-session-complete/maybe_install_vs_code.sh delete mode 100755 workbench/maybe_install_vs_code.sh diff --git a/r-session-complete/Dockerfile.ubuntu2204 b/r-session-complete/Dockerfile.ubuntu2204 index 4750bd732..83e4369d4 100644 --- a/r-session-complete/Dockerfile.ubuntu2204 +++ b/r-session-complete/Dockerfile.ubuntu2204 @@ -43,10 +43,6 @@ RUN ln -s /lib/rstudio-server/bin/quarto/bin/quarto /usr/local/bin/quarto ### Install TinyTeX using Quarto ### RUN $SCRIPTS_DIR/install_quarto.sh --install-tinytex --add-path-tinytex -COPY maybe_install_vs_code.sh /tmp/maybe_install_vs_code.sh -RUN /tmp/maybe_install_vs_code.sh \ - && rm /tmp/maybe_install_vs_code.sh - RUN /opt/python/"${PYTHON_VERSION}"/bin/pip install \ jupyter \ jupyterlab=="${JUPYTERLAB_VERSION}" \ diff --git a/r-session-complete/maybe_install_vs_code.sh b/r-session-complete/maybe_install_vs_code.sh deleted file mode 100755 index 949f744f7..000000000 --- a/r-session-complete/maybe_install_vs_code.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -set -ex - -major=$(echo ${RSW_VERSION} | cut -d. -f1) -minor=$(echo ${RSW_VERSION} | cut -d. -f2) -if [ ${major} -lt 2022 ] || [ ${major} -eq 2022 ] && [ ${minor} -lt 12 ]; then - echo "Installing VS Code" - rstudio-server install-vs-code /opt/code-server/ - ln -s /opt/code-server/bin/code-server /usr/local/bin/code-server -else - echo "VS Code is already installed" -fi diff --git a/workbench-for-google-cloud-workstations/conf/vscode.conf b/workbench-for-google-cloud-workstations/conf/vscode.conf index 405ff90eb..4160a8ef6 100644 --- a/workbench-for-google-cloud-workstations/conf/vscode.conf +++ b/workbench-for-google-cloud-workstations/conf/vscode.conf @@ -1,4 +1,4 @@ enabled=1 -args=--verbose --host=0.0.0.0 +args=--host=0.0.0.0 -# exe=/usr/lib/rstudio-server/bin/code-server/bin/code-server +# exe=/usr/lib/rstudio-server/bin/pwb-code-server/bin/code-server diff --git a/workbench-for-microsoft-azure-ml/conf/vscode.conf b/workbench-for-microsoft-azure-ml/conf/vscode.conf index c6abf3ac7..4160a8ef6 100644 --- a/workbench-for-microsoft-azure-ml/conf/vscode.conf +++ b/workbench-for-microsoft-azure-ml/conf/vscode.conf @@ -1,3 +1,4 @@ enabled=1 -exe=/opt/code-server/bin/code-server -args=--verbose --host=0.0.0.0 +args=--host=0.0.0.0 + +# exe=/usr/lib/rstudio-server/bin/pwb-code-server/bin/code-server diff --git a/workbench/Dockerfile.ubuntu2204 b/workbench/Dockerfile.ubuntu2204 index 6903effd1..74a53c7cb 100644 --- a/workbench/Dockerfile.ubuntu2204 +++ b/workbench/Dockerfile.ubuntu2204 @@ -73,10 +73,6 @@ RUN ln -s /lib/rstudio-server/bin/quarto/bin/quarto /usr/local/bin/quarto ### Install TinyTeX using Quarto ### RUN $SCRIPTS_DIR/install_quarto.sh --install-tinytex --add-path-tinytex -COPY maybe_install_vs_code.sh /tmp/maybe_install_vs_code.sh -RUN /tmp/maybe_install_vs_code.sh \ - && rm /tmp/maybe_install_vs_code.sh - COPY --chmod=0775 startup.sh /usr/local/bin/startup.sh COPY startup-launcher/* /startup/launcher/ COPY startup-user-provisioning/* /startup/user-provisioning/ diff --git a/workbench/conf/vscode.conf b/workbench/conf/vscode.conf index 405ff90eb..4160a8ef6 100644 --- a/workbench/conf/vscode.conf +++ b/workbench/conf/vscode.conf @@ -1,4 +1,4 @@ enabled=1 -args=--verbose --host=0.0.0.0 +args=--host=0.0.0.0 -# exe=/usr/lib/rstudio-server/bin/code-server/bin/code-server +# exe=/usr/lib/rstudio-server/bin/pwb-code-server/bin/code-server diff --git a/workbench/maybe_install_vs_code.sh b/workbench/maybe_install_vs_code.sh deleted file mode 100755 index 949f744f7..000000000 --- a/workbench/maybe_install_vs_code.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -set -ex - -major=$(echo ${RSW_VERSION} | cut -d. -f1) -minor=$(echo ${RSW_VERSION} | cut -d. -f2) -if [ ${major} -lt 2022 ] || [ ${major} -eq 2022 ] && [ ${minor} -lt 12 ]; then - echo "Installing VS Code" - rstudio-server install-vs-code /opt/code-server/ - ln -s /opt/code-server/bin/code-server /usr/local/bin/code-server -else - echo "VS Code is already installed" -fi From 61a056a113e650ad4caf3c68809536c3d8752915 Mon Sep 17 00:00:00 2001 From: "Benjamin R. J. Schwedler" Date: Tue, 24 Sep 2024 10:19:35 -0500 Subject: [PATCH 150/165] Update to latest R & Python patch versions for Workbench --- docker-bake.hcl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docker-bake.hcl b/docker-bake.hcl index 8309c0ef2..ec738e279 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -99,6 +99,7 @@ variable BASE_BUILD_MATRIX { {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.17", py_alternate = "3.8.17"}, {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.12.1", py_alternate = "3.11.7"}, {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"}, ] } } @@ -168,7 +169,7 @@ variable CONTENT_BUILD_MATRIX { variable R_SESSION_COMPLETE_BUILD_MATRIX { default = { builds = [ - {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"}, ] } } @@ -176,7 +177,7 @@ variable R_SESSION_COMPLETE_BUILD_MATRIX { variable WORKBENCH_BUILD_MATRIX { default = { builds = [ - {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"}, ] } } @@ -184,7 +185,7 @@ variable WORKBENCH_BUILD_MATRIX { variable WORKBENCH_GOOGLE_CLOUD_WORKSTATION_BUILD_MATRIX { default = { builds = [ - {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"}, ] } } @@ -192,7 +193,7 @@ variable WORKBENCH_GOOGLE_CLOUD_WORKSTATION_BUILD_MATRIX { variable WORKBENCH_MICROSOFT_AZURE_ML_BUILD_MATRIX { default = { builds = [ - {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.17", py_alternate = "3.8.17"}, + {os = "ubuntu2204", r_primary = "4.4.1", r_alternate = "4.3.3", py_primary = "3.12.6", py_alternate = "3.11.10"}, ] } } From ba527be37fa710b558a2f50f125885247967f7d5 Mon Sep 17 00:00:00 2001 From: "Benjamin R. J. Schwedler" Date: Tue, 24 Sep 2024 11:37:50 -0500 Subject: [PATCH 151/165] Remove unused base images --- docker-bake.hcl | 2 -- 1 file changed, 2 deletions(-) diff --git a/docker-bake.hcl b/docker-bake.hcl index ec738e279..1391119cd 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -96,8 +96,6 @@ function get_tags { variable BASE_BUILD_MATRIX { default = { builds = [ - {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.17", py_alternate = "3.8.17"}, - {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.12.1", py_alternate = "3.11.7"}, {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"}, ] From 7b3d42bacb704e2a969123e8ba16ccee171a0dc2 Mon Sep 17 00:00:00 2001 From: "Benjamin R. J. Schwedler" Date: Tue, 24 Sep 2024 13:05:02 -0500 Subject: [PATCH 152/165] Stop writing launcher debug logs to container Additional debug logging can be enabled through logging.conf if required --- workbench-for-google-cloud-workstations/conf/launcher.conf | 1 - workbench-for-microsoft-azure-ml/conf/launcher.conf | 1 - workbench/conf/launcher.conf | 1 - 3 files changed, 3 deletions(-) diff --git a/workbench-for-google-cloud-workstations/conf/launcher.conf b/workbench-for-google-cloud-workstations/conf/launcher.conf index dc48bd190..f41786f50 100644 --- a/workbench-for-google-cloud-workstations/conf/launcher.conf +++ b/workbench-for-google-cloud-workstations/conf/launcher.conf @@ -4,7 +4,6 @@ port=5559 server-user=rstudio-server admin-group=rstudio-server authorization-enabled=1 -enable-debug-logging=1 [cluster] name=Local diff --git a/workbench-for-microsoft-azure-ml/conf/launcher.conf b/workbench-for-microsoft-azure-ml/conf/launcher.conf index c73ef787c..a058867a7 100644 --- a/workbench-for-microsoft-azure-ml/conf/launcher.conf +++ b/workbench-for-microsoft-azure-ml/conf/launcher.conf @@ -5,7 +5,6 @@ server-user=rstudio-server admin-group=rstudio-server authorization-enabled=1 thread-pool-size=4 -enable-debug-logging=1 [cluster] name=Local diff --git a/workbench/conf/launcher.conf b/workbench/conf/launcher.conf index c73ef787c..a058867a7 100644 --- a/workbench/conf/launcher.conf +++ b/workbench/conf/launcher.conf @@ -5,7 +5,6 @@ server-user=rstudio-server admin-group=rstudio-server authorization-enabled=1 thread-pool-size=4 -enable-debug-logging=1 [cluster] name=Local From f477b8e41fc462ed13d9ec1745a234605f57e7be Mon Sep 17 00:00:00 2001 From: Tyler Date: Thu, 26 Sep 2024 10:24:16 -0400 Subject: [PATCH 153/165] Fix: Install `bash-completion` for `rspm` tab completions Refs: https://github.com/rstudio/package-manager/issues/14421 --- package-manager/Dockerfile.ubuntu2204 | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/package-manager/Dockerfile.ubuntu2204 b/package-manager/Dockerfile.ubuntu2204 index 771c5a751..bc8a37301 100644 --- a/package-manager/Dockerfile.ubuntu2204 +++ b/package-manager/Dockerfile.ubuntu2204 @@ -4,14 +4,19 @@ ARG PYTHON_VERSION=3.9.17 ARG PYTHON_VERSION_ALT=3.8.17 # Locale configuration --------------------------------------------------------# -ENV STARTUP_DEBUG_MODE 0 +ENV STARTUP_DEBUG_MODE=0 -ENV PATH /opt/rstudio-pm/bin:$PATH +ENV PATH=/opt/rstudio-pm/bin:$PATH # Required Python packages ----------------------------------------------------# RUN /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install --no-cache-dir build virtualenv RUN /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install --no-cache-dir build virtualenv +# Install bash auto completion ------------------------------------------------# +RUN apt-get update -qq && apt-get install -y --no-install-recommends \ + bash-completion && \ + apt-get clean && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* + # Download RStudio Package Manager ---------------------------------------------# ARG RSPM_VERSION=2024.08.2-9 ARG RSPM_DOWNLOAD_URL=https://cdn.rstudio.com/package-manager/deb/amd64 @@ -35,12 +40,11 @@ RUN mkdir -p /var/run/rstudio-pm \ USER rstudio-pm COPY rstudio-pm.gcfg /etc/rstudio-pm/rstudio-pm.gcfg -RUN echo "source <(rspm completion bash)" >> ~/.bashrc \ # Set up licensing to work in userspace mode. This will not prevent activating a # license as root, but it is required to activate one as the non-root user at # runtime. It's possible for this to fail and the trial will be considered over, # in which case we can ignore it anyway. - && license-manager initialize --userspace || true +RUN license-manager initialize --userspace || true ENTRYPOINT ["tini", "--"] CMD ["/usr/local/bin/startup.sh"] From 26291b5f49ef10cfb74a03a3c50a6c97e2e98981 Mon Sep 17 00:00:00 2001 From: edavidaja Date: Thu, 26 Sep 2024 12:16:22 -0400 Subject: [PATCH 154/165] Bump Connect to version 2024.09.0 --- Justfile | 2 +- connect-content-init/Dockerfile.ubuntu2204 | 2 +- connect-content-init/README.md | 6 +++--- connect/.env | 2 +- connect/Dockerfile.ubuntu2204 | 2 +- connect/README.md | 2 +- docker-bake.hcl | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Justfile b/Justfile index 7f67569a6..ac062e795 100644 --- a/Justfile +++ b/Justfile @@ -7,7 +7,7 @@ sed_vars := if os() == "macos" { "-i ''" } else { "-i" } BUILDX_PATH := "" -RSC_VERSION := "2024.08.0" +RSC_VERSION := "2024.09.0" RSPM_VERSION := "2024.08.2-9" RSW_VERSION := "2024.09.0+375.pro3" diff --git a/connect-content-init/Dockerfile.ubuntu2204 b/connect-content-init/Dockerfile.ubuntu2204 index 9a260dba5..428b6d4c2 100644 --- a/connect-content-init/Dockerfile.ubuntu2204 +++ b/connect-content-init/Dockerfile.ubuntu2204 @@ -9,7 +9,7 @@ RUN apt-get update && \ apt-get install -y --no-install-recommends ca-certificates curl && \ rm -rf /var/lib/apt/lists/* -ARG RSC_VERSION=2024.08.0 +ARG RSC_VERSION=2024.09.0 SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN mkdir -p /rsc-staging && \ RSC_VERSION_URL=$(echo -n "${RSC_VERSION}" | sed 's/+/%2B/g') && \ diff --git a/connect-content-init/README.md b/connect-content-init/README.md index 1fce505f0..f5b153781 100644 --- a/connect-content-init/README.md +++ b/connect-content-init/README.md @@ -9,7 +9,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2024.08.0`, `ubuntu2204-2024.08.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.09.0`, `ubuntu2204-2024.09.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) # RStudio Connect Content Init Container @@ -31,7 +31,7 @@ The version of the release package to use can be overridden with the `RSC_VERSION` build arg. ```console -just build ubuntu2204 2024.08.0 +just build ubuntu2204 2024.09.0 ``` ## Testing @@ -56,7 +56,7 @@ just test You can see the different layers that make up the image: ```console -docker history rstudio/rstudio-connect-content-init-preview:2024.08.0-dev-326 +docker history rstudio/rstudio-connect-content-init-preview:2024.09.0-dev-326 ``` NOTE: almost all the image size is pandoc. diff --git a/connect/.env b/connect/.env index 142c04b89..d941ae40d 100644 --- a/connect/.env +++ b/connect/.env @@ -1,4 +1,4 @@ -RSC_VERSION=2024.08.0 +RSC_VERSION=2024.09.0 R_VERSION=4.2.3 R_VERSION_ALT=4.1.3 PYTHON_VERSION=3.9.17 diff --git a/connect/Dockerfile.ubuntu2204 b/connect/Dockerfile.ubuntu2204 index 23a9c4e3c..40f573f58 100644 --- a/connect/Dockerfile.ubuntu2204 +++ b/connect/Dockerfile.ubuntu2204 @@ -7,7 +7,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 RSC_VERSION=2024.08.0 +ARG RSC_VERSION=2024.09.0 ARG QUARTO_VERSION=1.4.557 ARG SCRIPTS_DIR=/opt/positscripts diff --git a/connect/README.md b/connect/README.md index 488e72d30..252f015f5 100644 --- a/connect/README.md +++ b/connect/README.md @@ -7,7 +7,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2024.08.0`, `ubuntu2204-2024.08.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.09.0`, `ubuntu2204-2024.09.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) # What is Posit Connect? diff --git a/docker-bake.hcl b/docker-bake.hcl index 5db138635..6e5e9bc56 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -1,6 +1,6 @@ ### Variable definitions ### variable CONNECT_VERSION { - default = "2024.08.0" + default = "2024.09.0" } variable PACKAGE_MANAGER_VERSION { From 1a0f205b507027fd255cc49f531c4e98c8117099 Mon Sep 17 00:00:00 2001 From: Cole Arendt Date: Fri, 27 Sep 2024 09:37:54 -0400 Subject: [PATCH 155/165] Update CODEOWNERS --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index b377d8846..7ad379ad9 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -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 @costrouc +* @ianpittwood @bschwedler @costrouc /connect/* @rstudio/connect /connect-content-init/* @rstudio/connect From d502705e949ba906cee9fb8109d365734460b2c9 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Tue, 1 Oct 2024 12:13:04 -0400 Subject: [PATCH 156/165] Upgrade JupyterLab to 4.x --- .../Dockerfile.ubuntu2204 | 20 ++++--------- .../conf/jupyter.conf | 3 +- .../Dockerfile.ubuntu2204 | 28 +++++-------------- .../conf/jupyter.conf | 3 +- workbench/Dockerfile.ubuntu2204 | 20 ++++++------- workbench/conf/jupyter.conf | 3 +- 6 files changed, 24 insertions(+), 53 deletions(-) diff --git a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 index 9e8186f29..e0c638b92 100644 --- a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 +++ b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 @@ -118,23 +118,15 @@ RUN mkdir -p /opt/rstudio-license/ \ ### Install Jupyter and extensions ### RUN /opt/python/"${PYTHON_VERSION_JUPYTER}"/bin/python -m venv /opt/python/jupyter \ - && /opt/python/jupyter/bin/pip install \ - jupyter \ - jupyterlab=="${JUPYTERLAB_VERSION}" \ - rsconnect_jupyter \ - rsconnect_python \ - rsp_jupyter \ - workbench_jupyterlab \ + && /opt/python/jupyter/bin/python -m pip install\ + jupyterlab~=4.2.4 \ + notebook \ + pwb_jupyterlab~=1.0 \ && ln -s /opt/python/jupyter/bin/jupyter /usr/local/bin/jupyter \ - && /opt/python/jupyter/bin/jupyter-nbextension install --sys-prefix --py rsp_jupyter \ - && /opt/python/jupyter/bin/jupyter-nbextension enable --sys-prefix --py rsp_jupyter \ - && /opt/python/jupyter/bin/jupyter-nbextension install --sys-prefix --py rsconnect_jupyter \ - && /opt/python/jupyter/bin/jupyter-nbextension enable --sys-prefix --py rsconnect_jupyter \ - && /opt/python/jupyter/bin/jupyter-serverextension enable --sys-prefix --py rsconnect_jupyter \ + && /opt/python/jupyter/bin/python -m pip install ipykernel \ && /opt/python/jupyter/bin/python -m ipykernel install --name py${PYTHON_VERSION} --display-name "Python ${PYTHON_VERSION}" \ && /opt/python/jupyter/bin/python -m ipykernel install --name py${PYTHON_VERSION_ALT} --display-name "Python ${PYTHON_VERSION_ALT}" \ - && /opt/python/${PYTHON_VERSION}/bin/python3 -m pip cache purge \ - && /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip cache purge + && /opt/python/jupyter/bin/python3 -m pip cache purge ADD --chmod=755 https://raw.githubusercontent.com/rstudio/wait-for-it/master/wait-for-it.sh /usr/local/bin/wait-for-it.sh diff --git a/workbench-for-google-cloud-workstations/conf/jupyter.conf b/workbench-for-google-cloud-workstations/conf/jupyter.conf index c38488e4a..6e7c73b85 100644 --- a/workbench-for-google-cloud-workstations/conf/jupyter.conf +++ b/workbench-for-google-cloud-workstations/conf/jupyter.conf @@ -1,7 +1,6 @@ -notebooks-enabled=1 labs-enabled=1 -jupyter-exe=/usr/local/bin/jupyter +jupyter-exe=/opt/python/jupyter/bin/jupyter lab-args=--no-browser --allow-root --ip=0.0.0.0 --ServerApp.allow_origin="*" --ServerApp.allow_remote_access=True --LabApp.token="" --debug default-session-cluster=Local diff --git a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 index ac1ec2834..abde1303f 100644 --- a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 +++ b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 @@ -89,28 +89,14 @@ RUN apt-get update --fix-missing -qq \ ### Install Jupyter and extensions ### RUN /opt/python/"${PYTHON_VERSION_JUPYTER}"/bin/python -m venv /opt/python/jupyter \ && /opt/python/jupyter/bin/pip install \ - jupyter \ - jupyterlab=="${JUPYTERLAB_VERSION}" \ - rsconnect_jupyter \ - rsconnect_python \ - rsp_jupyter \ - workbench_jupyterlab \ - && /opt/python/jupyter/bin/jupyter kernelspec remove python3 -f \ - && /opt/python/jupyter/bin/pip uninstall -y ipykernel \ + jupyterlab~=4.2.4 \ + notebook \ + pwb_jupyterlab~=1.0 \ && ln -s /opt/python/jupyter/bin/jupyter /usr/local/bin/jupyter \ - && /opt/python/jupyter/bin/jupyter-nbextension install --sys-prefix --py rsp_jupyter \ - && /opt/python/jupyter/bin/jupyter-nbextension enable --sys-prefix --py rsp_jupyter \ - && /opt/python/jupyter/bin/jupyter-nbextension install --sys-prefix --py rsconnect_jupyter \ - && /opt/python/jupyter/bin/jupyter-nbextension enable --sys-prefix --py rsconnect_jupyter \ - && /opt/python/jupyter/bin/jupyter-serverextension enable --sys-prefix --py rsconnect_jupyter \ - && /opt/python/${PYTHON_VERSION}/bin/pip install \ - ipykernel \ - virtualenv \ - && /opt/python/${PYTHON_VERSION}/bin/python -m ipykernel install --name py${PYTHON_VERSION} --display-name "Python ${PYTHON_VERSION}" \ - && /opt/python/${PYTHON_VERSION_ALT}/bin/pip install \ - ipykernel \ - virtualenv \ - && /opt/python/${PYTHON_VERSION_ALT}/bin/python -m ipykernel install --name py${PYTHON_VERSION_ALT} --display-name "Python ${PYTHON_VERSION_ALT}" + && /opt/python/jupyter/bin/python -m pip install ipykernel \ + && /opt/python/jupyter/bin/python -m ipykernel install --name py${PYTHON_VERSION} --display-name "Python ${PYTHON_VERSION}" \ + && /opt/python/jupyter/bin/python -m ipykernel install --name py${PYTHON_VERSION_ALT} --display-name "Python ${PYTHON_VERSION_ALT}" \ + && /opt/python/jupyter/bin/python3 -m pip cache purge ### Install basic data science packages for Python and R ### COPY deps/* / diff --git a/workbench-for-microsoft-azure-ml/conf/jupyter.conf b/workbench-for-microsoft-azure-ml/conf/jupyter.conf index c38488e4a..6e7c73b85 100644 --- a/workbench-for-microsoft-azure-ml/conf/jupyter.conf +++ b/workbench-for-microsoft-azure-ml/conf/jupyter.conf @@ -1,7 +1,6 @@ -notebooks-enabled=1 labs-enabled=1 -jupyter-exe=/usr/local/bin/jupyter +jupyter-exe=/opt/python/jupyter/bin/jupyter lab-args=--no-browser --allow-root --ip=0.0.0.0 --ServerApp.allow_origin="*" --ServerApp.allow_remote_access=True --LabApp.token="" --debug default-session-cluster=Local diff --git a/workbench/Dockerfile.ubuntu2204 b/workbench/Dockerfile.ubuntu2204 index f76f011fd..8a9c447b9 100644 --- a/workbench/Dockerfile.ubuntu2204 +++ b/workbench/Dockerfile.ubuntu2204 @@ -80,19 +80,15 @@ COPY startup/* /startup/base/ COPY supervisord.conf /etc/supervisor/supervisord.conf RUN /opt/python/"${PYTHON_VERSION_JUPYTER}"/bin/python -m venv /opt/python/jupyter \ - && /opt/python/jupyter/bin/pip install \ - jupyter \ - jupyterlab=="${JUPYTERLAB_VERSION}" \ - rsconnect_jupyter \ - rsconnect_python \ - rsp_jupyter \ - workbench_jupyterlab \ + && /opt/python/jupyter/bin/python -m pip install \ + jupyterlab~=4.2.4 \ + notebook \ + pwb_jupyterlab~=1.0 \ && ln -s /opt/python/jupyter/bin/jupyter /usr/local/bin/jupyter \ - && /opt/python/jupyter/bin/jupyter-nbextension install --sys-prefix --py rsp_jupyter \ - && /opt/python/jupyter/bin/jupyter-nbextension enable --sys-prefix --py rsp_jupyter \ - && /opt/python/jupyter/bin/jupyter-nbextension install --sys-prefix --py rsconnect_jupyter \ - && /opt/python/jupyter/bin/jupyter-nbextension enable --sys-prefix --py rsconnect_jupyter \ - && /opt/python/jupyter/bin/jupyter-serverextension enable --sys-prefix --py rsconnect_jupyter + && /opt/python/jupyter/bin/python -m pip install ipykernel \ + && /opt/python/jupyter/bin/python -m ipykernel install --name py${PYTHON_VERSION} --display-name "Python ${PYTHON_VERSION}" \ + && /opt/python/jupyter/bin/python -m ipykernel install --name py${PYTHON_VERSION_ALT} --display-name "Python ${PYTHON_VERSION_ALT}" \ + && /opt/python/jupyter/bin/python -m pip cache purge RUN curl -fsSL -o /usr/local/bin/wait-for-it.sh https://raw.githubusercontent.com/rstudio/wait-for-it/master/wait-for-it.sh && \ chmod +x /usr/local/bin/wait-for-it.sh diff --git a/workbench/conf/jupyter.conf b/workbench/conf/jupyter.conf index abc5cfd53..1b789302a 100644 --- a/workbench/conf/jupyter.conf +++ b/workbench/conf/jupyter.conf @@ -1,6 +1,5 @@ -notebooks-enabled=1 labs-enabled=1 -# jupyter-exe=/usr/local/bin/jupyter +jupyter-exe=/opt/python/jupyter/bin/jupyter default-session-cluster=Local From 27dfcbcb826cd99ea3fd92a865b5a2b90f988bfd Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Tue, 1 Oct 2024 12:34:15 -0400 Subject: [PATCH 157/165] Upgrade Jupyterlab in r-session-complete --- r-session-complete/Dockerfile.ubuntu2204 | 27 +++++++++++------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/r-session-complete/Dockerfile.ubuntu2204 b/r-session-complete/Dockerfile.ubuntu2204 index 83e4369d4..6fde09a96 100644 --- a/r-session-complete/Dockerfile.ubuntu2204 +++ b/r-session-complete/Dockerfile.ubuntu2204 @@ -43,21 +43,18 @@ RUN ln -s /lib/rstudio-server/bin/quarto/bin/quarto /usr/local/bin/quarto ### Install TinyTeX using Quarto ### RUN $SCRIPTS_DIR/install_quarto.sh --install-tinytex --add-path-tinytex -RUN /opt/python/"${PYTHON_VERSION}"/bin/pip install \ - jupyter \ - jupyterlab=="${JUPYTERLAB_VERSION}" \ - rsconnect_jupyter \ - rsconnect_python \ - rsp_jupyter \ - workbench_jupyterlab \ - && ln -s /opt/python/"${PYTHON_VERSION}"/bin/jupyter /usr/local/bin/jupyter \ - && /opt/python/"${PYTHON_VERSION}"/bin/jupyter-nbextension install --sys-prefix --py rsp_jupyter \ - && /opt/python/"${PYTHON_VERSION}"/bin/jupyter-nbextension enable --sys-prefix --py rsp_jupyter \ - && /opt/python/"${PYTHON_VERSION}"/bin/jupyter-nbextension install --sys-prefix --py rsconnect_jupyter \ - && /opt/python/"${PYTHON_VERSION}"/bin/jupyter-nbextension enable --sys-prefix --py rsconnect_jupyter \ - && /opt/python/"${PYTHON_VERSION}"/bin/jupyter-serverextension enable --sys-prefix --py rsconnect_jupyter - -ENV PATH="/opt/python/${PYTHON_VERSION}/bin:${PATH}" +RUN /opt/python/"${PYTHON_VERSION_JUPYTER}"/bin/python -m venv /opt/python/jupyter \ + && /opt/python/jupyter/bin/python -m pip install \ + jupyterlab~=4.2.4 \ + notebook \ + pwb_jupyterlab~=1.0 \ + && ln -s /opt/python/jupyter/bin/jupyter /usr/local/bin/jupyter \ + && /opt/python/jupyter/bin/python -m pip install ipykernel \ + && /opt/python/jupyter/bin/python -m ipykernel install --name py${PYTHON_VERSION} --display-name "Python ${PYTHON_VERSION}" \ + && /opt/python/jupyter/bin/python -m ipykernel install --name py${PYTHON_VERSION_ALT} --display-name "Python ${PYTHON_VERSION_ALT}" \ + && /opt/python/jupyter/bin/python -m pip cache purge + +ENV PATH="/opt/python/jupyter/bin:${PATH}" COPY vscode.extensions.conf /etc/rstudio/vscode.extensions.conf From ce163907080f35c5c889f9520a3697f6bedfda3a Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Tue, 1 Oct 2024 12:47:43 -0400 Subject: [PATCH 158/165] Fix PYTHON_VERSION_JUPYTER usage --- r-session-complete/Dockerfile.ubuntu2204 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r-session-complete/Dockerfile.ubuntu2204 b/r-session-complete/Dockerfile.ubuntu2204 index 6fde09a96..46784c189 100644 --- a/r-session-complete/Dockerfile.ubuntu2204 +++ b/r-session-complete/Dockerfile.ubuntu2204 @@ -43,7 +43,7 @@ RUN ln -s /lib/rstudio-server/bin/quarto/bin/quarto /usr/local/bin/quarto ### Install TinyTeX using Quarto ### RUN $SCRIPTS_DIR/install_quarto.sh --install-tinytex --add-path-tinytex -RUN /opt/python/"${PYTHON_VERSION_JUPYTER}"/bin/python -m venv /opt/python/jupyter \ +RUN /opt/python/"${PYTHON_VERSION}"/bin/python -m venv /opt/python/jupyter \ && /opt/python/jupyter/bin/python -m pip install \ jupyterlab~=4.2.4 \ notebook \ From 3bcd17001ea31109f4917da86df5a4dea1e0bc71 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Tue, 1 Oct 2024 12:52:00 -0400 Subject: [PATCH 159/165] Fix test jupyter path --- r-session-complete/test/goss.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r-session-complete/test/goss.yaml b/r-session-complete/test/goss.yaml index c5ea93a40..030ff1804 100644 --- a/r-session-complete/test/goss.yaml +++ b/r-session-complete/test/goss.yaml @@ -23,7 +23,7 @@ file: filetype: symlink command: - "echo '{ \"cells\": [], \"metadata\": {}, \"nbformat\": 4, \"nbformat_minor\": 2}' | /opt/python/{{.Env.PYTHON_VERSION}}/bin/jupyter nbconvert --to notebook --stdin --stdout": + "echo '{ \"cells\": [], \"metadata\": {}, \"nbformat\": 4, \"nbformat_minor\": 2}' | /opt/python/jupyter/bin/jupyter nbconvert --to notebook --stdin --stdout": title: jupyter_works timeout: 60000 exit-status: 0 From 92ef9da523416dd5f56523266e3c225035382fec Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Fri, 11 Oct 2024 07:21:46 -0600 Subject: [PATCH 160/165] Fix Jupyter kernel Python versions --- r-session-complete/Dockerfile.ubuntu2204 | 7 ++++--- .../Dockerfile.ubuntu2204 | 7 ++++--- workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 | 7 ++++--- workbench/Dockerfile.ubuntu2204 | 7 ++++--- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/r-session-complete/Dockerfile.ubuntu2204 b/r-session-complete/Dockerfile.ubuntu2204 index 46784c189..f16c595cc 100644 --- a/r-session-complete/Dockerfile.ubuntu2204 +++ b/r-session-complete/Dockerfile.ubuntu2204 @@ -49,9 +49,10 @@ RUN /opt/python/"${PYTHON_VERSION}"/bin/python -m venv /opt/python/jupyter \ notebook \ pwb_jupyterlab~=1.0 \ && ln -s /opt/python/jupyter/bin/jupyter /usr/local/bin/jupyter \ - && /opt/python/jupyter/bin/python -m pip install ipykernel \ - && /opt/python/jupyter/bin/python -m ipykernel install --name py${PYTHON_VERSION} --display-name "Python ${PYTHON_VERSION}" \ - && /opt/python/jupyter/bin/python -m ipykernel install --name py${PYTHON_VERSION_ALT} --display-name "Python ${PYTHON_VERSION_ALT}" \ + && /opt/python/${PYTHON_VERSION}/bin/python -m pip install ipykernel \ + && /opt/python/${PYTHON_VERSION_ALT}/bin/python -m pip install ipykernel \ + && /opt/python/${PYTHON_VERSION}/bin/python -m ipykernel install --name py${PYTHON_VERSION} --display-name "Python ${PYTHON_VERSION}" \ + && /opt/python/${PYTHON_VERSION_ALT}/bin/python -m ipykernel install --name py${PYTHON_VERSION_ALT} --display-name "Python ${PYTHON_VERSION_ALT}" \ && /opt/python/jupyter/bin/python -m pip cache purge ENV PATH="/opt/python/jupyter/bin:${PATH}" diff --git a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 index e0c638b92..1cea9f813 100644 --- a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 +++ b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 @@ -123,9 +123,10 @@ RUN /opt/python/"${PYTHON_VERSION_JUPYTER}"/bin/python -m venv /opt/python/jupyt notebook \ pwb_jupyterlab~=1.0 \ && ln -s /opt/python/jupyter/bin/jupyter /usr/local/bin/jupyter \ - && /opt/python/jupyter/bin/python -m pip install ipykernel \ - && /opt/python/jupyter/bin/python -m ipykernel install --name py${PYTHON_VERSION} --display-name "Python ${PYTHON_VERSION}" \ - && /opt/python/jupyter/bin/python -m ipykernel install --name py${PYTHON_VERSION_ALT} --display-name "Python ${PYTHON_VERSION_ALT}" \ + && /opt/python/${PYTHON_VERSION}/bin/python -m pip install ipykernel \ + && /opt/python/${PYTHON_VERSION_ALT}/bin/python -m pip install ipykernel \ + && /opt/python/${PYTHON_VERSION}/bin/python -m ipykernel install --name py${PYTHON_VERSION} --display-name "Python ${PYTHON_VERSION}" \ + && /opt/python/${PYTHON_VERSION_ALT}/bin/python -m ipykernel install --name py${PYTHON_VERSION_ALT} --display-name "Python ${PYTHON_VERSION_ALT}" \ && /opt/python/jupyter/bin/python3 -m pip cache purge ADD --chmod=755 https://raw.githubusercontent.com/rstudio/wait-for-it/master/wait-for-it.sh /usr/local/bin/wait-for-it.sh diff --git a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 index abde1303f..c13954a35 100644 --- a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 +++ b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 @@ -93,9 +93,10 @@ RUN /opt/python/"${PYTHON_VERSION_JUPYTER}"/bin/python -m venv /opt/python/jupyt notebook \ pwb_jupyterlab~=1.0 \ && ln -s /opt/python/jupyter/bin/jupyter /usr/local/bin/jupyter \ - && /opt/python/jupyter/bin/python -m pip install ipykernel \ - && /opt/python/jupyter/bin/python -m ipykernel install --name py${PYTHON_VERSION} --display-name "Python ${PYTHON_VERSION}" \ - && /opt/python/jupyter/bin/python -m ipykernel install --name py${PYTHON_VERSION_ALT} --display-name "Python ${PYTHON_VERSION_ALT}" \ + && /opt/python/${PYTHON_VERSION}/bin/python -m pip install ipykernel \ + && /opt/python/${PYTHON_VERSION_ALT}/bin/python -m pip install ipykernel \ + && /opt/python/${PYTHON_VERSION}/bin/python -m ipykernel install --name py${PYTHON_VERSION} --display-name "Python ${PYTHON_VERSION}" \ + && /opt/python/${PYTHON_VERSION_ALT}/bin/python -m ipykernel install --name py${PYTHON_VERSION_ALT} --display-name "Python ${PYTHON_VERSION_ALT}" \ && /opt/python/jupyter/bin/python3 -m pip cache purge ### Install basic data science packages for Python and R ### diff --git a/workbench/Dockerfile.ubuntu2204 b/workbench/Dockerfile.ubuntu2204 index 8a9c447b9..ba25914a4 100644 --- a/workbench/Dockerfile.ubuntu2204 +++ b/workbench/Dockerfile.ubuntu2204 @@ -85,9 +85,10 @@ RUN /opt/python/"${PYTHON_VERSION_JUPYTER}"/bin/python -m venv /opt/python/jupyt notebook \ pwb_jupyterlab~=1.0 \ && ln -s /opt/python/jupyter/bin/jupyter /usr/local/bin/jupyter \ - && /opt/python/jupyter/bin/python -m pip install ipykernel \ - && /opt/python/jupyter/bin/python -m ipykernel install --name py${PYTHON_VERSION} --display-name "Python ${PYTHON_VERSION}" \ - && /opt/python/jupyter/bin/python -m ipykernel install --name py${PYTHON_VERSION_ALT} --display-name "Python ${PYTHON_VERSION_ALT}" \ + && /opt/python/${PYTHON_VERSION}/bin/python -m pip install ipykernel \ + && /opt/python/${PYTHON_VERSION_ALT}/bin/python -m pip install ipykernel \ + && /opt/python/${PYTHON_VERSION}/bin/python -m ipykernel install --name py${PYTHON_VERSION} --display-name "Python ${PYTHON_VERSION}" \ + && /opt/python/${PYTHON_VERSION_ALT}/bin/python -m ipykernel install --name py${PYTHON_VERSION_ALT} --display-name "Python ${PYTHON_VERSION_ALT}" \ && /opt/python/jupyter/bin/python -m pip cache purge RUN curl -fsSL -o /usr/local/bin/wait-for-it.sh https://raw.githubusercontent.com/rstudio/wait-for-it/master/wait-for-it.sh && \ From 2acf74ce72e8bd1f54fa39f266a7847421471e85 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Tue, 22 Oct 2024 10:13:11 -0600 Subject: [PATCH 161/165] Upgrade pip and setuptools on Jupyter venv creation --- r-session-complete/Dockerfile.ubuntu2204 | 2 ++ workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 | 2 ++ workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 | 2 ++ workbench/Dockerfile.ubuntu2204 | 2 ++ 4 files changed, 8 insertions(+) diff --git a/r-session-complete/Dockerfile.ubuntu2204 b/r-session-complete/Dockerfile.ubuntu2204 index f16c595cc..62a18b6ce 100644 --- a/r-session-complete/Dockerfile.ubuntu2204 +++ b/r-session-complete/Dockerfile.ubuntu2204 @@ -44,6 +44,8 @@ RUN ln -s /lib/rstudio-server/bin/quarto/bin/quarto /usr/local/bin/quarto RUN $SCRIPTS_DIR/install_quarto.sh --install-tinytex --add-path-tinytex RUN /opt/python/"${PYTHON_VERSION}"/bin/python -m venv /opt/python/jupyter \ + && /opt/python/jupyter/bin/python -m pip install --upgrade pip \ + && /opt/python/jupyter/bin/python -m pip install --upgrade setuptools \ && /opt/python/jupyter/bin/python -m pip install \ jupyterlab~=4.2.4 \ notebook \ diff --git a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 index 1cea9f813..aa76f97a5 100644 --- a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 +++ b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 @@ -118,6 +118,8 @@ RUN mkdir -p /opt/rstudio-license/ \ ### Install Jupyter and extensions ### RUN /opt/python/"${PYTHON_VERSION_JUPYTER}"/bin/python -m venv /opt/python/jupyter \ + && /opt/python/jupyter/bin/python -m pip install --upgrade pip \ + && /opt/python/jupyter/bin/python -m pip install --upgrade setuptools \ && /opt/python/jupyter/bin/python -m pip install\ jupyterlab~=4.2.4 \ notebook \ diff --git a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 index c13954a35..9cc5faec7 100644 --- a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 +++ b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 @@ -88,6 +88,8 @@ RUN apt-get update --fix-missing -qq \ ### Install Jupyter and extensions ### RUN /opt/python/"${PYTHON_VERSION_JUPYTER}"/bin/python -m venv /opt/python/jupyter \ + && /opt/python/jupyter/bin/python -m pip install --upgrade pip \ + && /opt/python/jupyter/bin/python -m pip install --upgrade setuptools \ && /opt/python/jupyter/bin/pip install \ jupyterlab~=4.2.4 \ notebook \ diff --git a/workbench/Dockerfile.ubuntu2204 b/workbench/Dockerfile.ubuntu2204 index ba25914a4..3a64b9de8 100644 --- a/workbench/Dockerfile.ubuntu2204 +++ b/workbench/Dockerfile.ubuntu2204 @@ -80,6 +80,8 @@ COPY startup/* /startup/base/ COPY supervisord.conf /etc/supervisor/supervisord.conf RUN /opt/python/"${PYTHON_VERSION_JUPYTER}"/bin/python -m venv /opt/python/jupyter \ + && /opt/python/jupyter/bin/python -m pip install --upgrade pip \ + && /opt/python/jupyter/bin/python -m pip install --upgrade setuptools \ && /opt/python/jupyter/bin/python -m pip install \ jupyterlab~=4.2.4 \ notebook \ From ea37e1d1d22c0dfc9fcd4fd94681321f39fe849d Mon Sep 17 00:00:00 2001 From: "Benjamin R. J. Schwedler" Date: Fri, 25 Oct 2024 15:27:49 -0500 Subject: [PATCH 162/165] Disable Azure ML image build for now The builds for Azure ML continue to fail due to python package incompatibilities introduced upstream. Add this to the issues to resolve in: - https://github.com/rstudio/rstudio-docker-products/issues/562 --- .github/workflows/build-bake.yaml | 43 +--------------------------- .github/workflows/build-manual.yaml | 6 ++-- .github/workflows/update-readme.yaml | 1 - 3 files changed, 4 insertions(+), 46 deletions(-) diff --git a/.github/workflows/build-bake.yaml b/.github/workflows/build-bake.yaml index c1c67e11a..be7b55e77 100644 --- a/.github/workflows/build-bake.yaml +++ b/.github/workflows/build-bake.yaml @@ -6,7 +6,7 @@ on: - main - dev pull_request: - + name: Release - Build, Test, and Push jobs: setup: @@ -374,44 +374,3 @@ 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 }}' diff --git a/.github/workflows/build-manual.yaml b/.github/workflows/build-manual.yaml index 2f9917747..e9ceb46b5 100644 --- a/.github/workflows/build-manual.yaml +++ b/.github/workflows/build-manual.yaml @@ -126,7 +126,7 @@ jobs: else VERSION="${{ inputs.version }}" fi - + # Set the appropriate env var suffix="_VERSION" if [[ "${{ inputs.type }}" == "preview" ]]; then @@ -134,7 +134,7 @@ jobs: 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" @@ -143,7 +143,7 @@ jobs: else product="WORKBENCH" fi - + echo "Setting $product$suffix=$VERSION" echo "$product$suffix=$VERSION" >> $GITHUB_ENV diff --git a/.github/workflows/update-readme.yaml b/.github/workflows/update-readme.yaml index 0e264b21b..78a9db227 100644 --- a/.github/workflows/update-readme.yaml +++ b/.github/workflows/update-readme.yaml @@ -24,7 +24,6 @@ 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'} steps: - name: Check Out Repo From 61d7734fe982f260e59d5aac45bcaadde0343e1e Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Fri, 25 Oct 2024 15:10:50 -0600 Subject: [PATCH 163/165] Always install and upgrade pip and setuptools on WAML image --- workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 index 9cc5faec7..19ec889f4 100644 --- a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 +++ b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 @@ -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 \ + && /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 \ && /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 From 44a7d4e0ea21947deb9fa351f40403438fc2042a Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 28 Oct 2024 09:51:23 -0600 Subject: [PATCH 164/165] Switch from `azure` to `azure-sdk` package Downgrade Python 3.12 to 3.11 for AML --- docker-bake.hcl | 3 ++- workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 | 4 ++-- workbench-for-microsoft-azure-ml/deps/py_packages.txt | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docker-bake.hcl b/docker-bake.hcl index 6e5e9bc56..090a157ec 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -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"}, ] @@ -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"}, ] } } diff --git a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 index 19ec889f4..bb6fd7656 100644 --- a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 +++ b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 @@ -103,10 +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 -U pip setuptools \ +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 \ + && /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 diff --git a/workbench-for-microsoft-azure-ml/deps/py_packages.txt b/workbench-for-microsoft-azure-ml/deps/py_packages.txt index 14a2b945e..8df3ab80f 100644 --- a/workbench-for-microsoft-azure-ml/deps/py_packages.txt +++ b/workbench-for-microsoft-azure-ml/deps/py_packages.txt @@ -1,4 +1,4 @@ -azureml +azureml-sdk azureml-core azureml-dataset-runtime azure-ai-ml From 803089269f42f515ef18b35428b8cf696b8ad6da Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 28 Oct 2024 14:53:23 -0600 Subject: [PATCH 165/165] Revert "Disable Azure ML image build for now" This reverts commit ea37e1d1d22c0dfc9fcd4fd94681321f39fe849d. --- .github/workflows/build-bake.yaml | 43 +++++++++++++++++++++++++++- .github/workflows/build-manual.yaml | 6 ++-- .github/workflows/update-readme.yaml | 1 + 3 files changed, 46 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-bake.yaml b/.github/workflows/build-bake.yaml index be7b55e77..c1c67e11a 100644 --- a/.github/workflows/build-bake.yaml +++ b/.github/workflows/build-bake.yaml @@ -6,7 +6,7 @@ on: - main - dev pull_request: - + name: Release - Build, Test, and Push jobs: setup: @@ -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 }}' diff --git a/.github/workflows/build-manual.yaml b/.github/workflows/build-manual.yaml index e9ceb46b5..2f9917747 100644 --- a/.github/workflows/build-manual.yaml +++ b/.github/workflows/build-manual.yaml @@ -126,7 +126,7 @@ jobs: else VERSION="${{ inputs.version }}" fi - + # Set the appropriate env var suffix="_VERSION" if [[ "${{ inputs.type }}" == "preview" ]]; then @@ -134,7 +134,7 @@ jobs: 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" @@ -143,7 +143,7 @@ jobs: else product="WORKBENCH" fi - + echo "Setting $product$suffix=$VERSION" echo "$product$suffix=$VERSION" >> $GITHUB_ENV diff --git a/.github/workflows/update-readme.yaml b/.github/workflows/update-readme.yaml index 78a9db227..0e264b21b 100644 --- a/.github/workflows/update-readme.yaml +++ b/.github/workflows/update-readme.yaml @@ -24,6 +24,7 @@ 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'} steps: - name: Check Out Repo