Skip to content

Conversation

@sagerb
Copy link
Contributor

@sagerb sagerb commented May 26, 2022

NOTE: This PR has Bincheng's branch merged in, so that I could holistically search and refactor all image parameter usages.

Description

To maintain compatibility at the public api layer of rsconnect-python, we have made the decision to make the image parameter be optional and default to None.

This impacts the following CLI commands which support the image parameter (--image or -I).

  • rsconnect write-manifest api:

  • rsconnect write-manifest bokeh:

  • rsconnect write-manifest dash:

  • rsconnect write-manifest fastapi:

  • rsconnect write-manifest notebook:

  • rsconnect write-manifest quarto:

  • rsconnect write-manifest streamlit:

  • rsconnect deploy api

  • rsconnect deploy bokeh

  • rsconnect deploy dash

  • rsconnect deploy fastapi

  • rsconnect deploy notebook

  • rsconnect deploy quarto

  • rsconnect deploy streamlit

Not impacted (but related) and unaffected (do not accept the --image parameter)

  • rsconnect deploy manifest
  • rsconnect deploy other-content
  • rsconnect deploy html

Implementation Notes

RSConnect-Python's public API library, uses functions which are not prefixed with an underscore (_) to indicate internal functions. These functions will use fixed arguments to leverage tooling as much as possible and therefore are not effected by this change.

Testing Notes / Validation Steps

Validation follows the approach outlined within #245, where image support was first introduced. These steps should give a good validation for direct usage of the rsconnect-python CLI. It does not include, however, integration testing between rsconnect-python and rsconnect-jupyter (which builds upon the rsconnect-python codebase). That will need to be validated in a separate way.

Approach taken

By using a kubernetes configuration for Connect, which utilizes two duplicate images, we are able to verify the functionality of which image is used by the server when the image flag is specified and when it is not.

Verification for each of the impacted commands is grouped by target, allowing us to focus on a target at a time, but executing fairly similar steps for each target:

Validate write-manifest

  • Validate the help output contains the image option
  • Update the reference manifest.json to be reflective of the active version of python, save this off.
  • Use rsconnect write-manifest -image rstudio/dev-connect-duplicate <target> to update the manifest.json to include the environment.image setting
  • Diff the manifest.json files (with and without image) to confirm there are no other significant differences

Validate deploy manifest for the manifest.json with the image setting

  • Use rsconnect deploy manifest <manifest file> to confirm proper deployment

Validate deploy with and without image

  • Validate the help output contains image
  • Use rsconnect deploy <target> to validate that target is able to be deployed to server and that the server selects the content image target by using the built-in algorithm (will select rstudio/dev-connect).
  • Use rsconnect deploy <target> --image rstudio/dev-connect-duplicate to validate that target is able to be deployed to server and that the server uses the image option to determine the target image (will be rstudio/dev-connect-duplicate).

Testing details

Need to be setup specifically with Python 3.8.x to work with the test data / content outlined below.

brew install python@3.8
#Updated my path to have `/usr/local/opt/python@3.8/bin` ahead of `/usr/local/bin` in ~/.zshenv 
source ~/.zshenv

Setup virtual environment to use branch rsconnect within the base directory of rsconnect-python repo:

# Setup a virtual python environment w/ 3.8.x
rm -rd .venv
python3 --version        
# confirm version listed above is 3.8.x
python3 -m venv .venv
# Activate the virtual environment
source .venv/bin/activate
python3 --version        
# confirm version listed above is 3.8.x
# install our requirements into the virtual environment
pip install -r requirements.txt
# install rsconnect-python with a symbolic link to the locations repository, 
# meaning any changes to code in there will automatically be reflected
pip install -e ./
# clear out path to executables
hash -r

For Connect, I recommend using the new dev-connect docker file workflow, which will be available from main before this PR goes to testing, as will David's supporting server branch which implements the image logic needed on the server.

To start the server, you'll need to:

  1. Build the codebase, from the root of the rstudio/connect project:
    • just ui/dashboard/clean
    • just bootstrap build
  2. Update yeti/docker/built-in/connect-shared-files/rsc-launcher-runtime.yml to have the following two additional image specifications, to be placed at top of image list (on line 3, after the line images:). This should move all of the other image entries down in the file / list.
  - 
    name: rstudio/dev-connect
    python:
      installations:
        - path: /opt/python/3.8.12/bin/python3.8
          version: 3.8.12
    r:
      installations:
        - path: /opt/R/3.6.3/bin/R
          version: 3.6.3
    quarto:
      installations:
        - path: /opt/rstudio-connect/ext/quarto/bin/quarto
          version: 0.9.16
  - 
    name: rstudio/dev-connect-duplicate
    python:
      installations:
        - path: /opt/python/3.8.12/bin/python3.8
          version: 3.8.12
    r:
      installations:
        - path: /opt/R/3.6.3/bin/R
          version: 3.6.3
    quarto:
      installations:
        - path: /opt/rstudio-connect/ext/quarto/bin/quarto
          version: 0.9.16
  -
  1. Create a custom template and add an imagePullPolicy=Never to the pods volume definition.
    • Copy packaging/launcher/connect-k8s-templates/job.tpl to config/launcher/k8s-custom-templates
    • Edit config/launcher/k8s-custom-templates/job.tpl and add the following line after line 83 (image: {{ toYaml .Job.container.image }}) - should be indented same level as the image line.
          imagePullPolicy: Never
- Save the file with your changes.
  1. Temporarily update the main justfile to have (updating area around 234 of justfile):
    # Always build the docker images
    docker build . -t rstudio/dev-connect -f docker/devconnect/Dockerfile
    if [[ "${USE_KUBERNETES}" == "yes" ]]; then
        docker build . -t rstudio/dev-connect-duplicate -f docker/devconnect/Dockerfile
    fi
  1. Reset the dev-connect data volume:
    • docker volume rm dev-connect-volume
  2. Reset your kubernetes cluster:
    • kubectl -n rsc-dev delete jobs --all
    • kubectl -n rsc-dev delete svc --all
  3. Start the server:
    • USE_KUBERNETES=yes just start-dev-connect

Validate changes for target: API

Verify write-manifest api

WITH the venv active.. cd into your rstudio/connect-content repo.
From: rstudio/connect-content

  1. cd bundles/python-flaskapi
  2. execute:
# baseline the manifest w/ your virtual environment basics
rsconnect write-manifest api . --overwrite
mv manifest.json manifest-original.json
rsconnect write-manifest api --image rstudio/dev-connect-duplicate .
diff manifest.json manifest-original.json

confirm that you see the environment/image path added in the new manifest. This will look something like:

16,18d15
<   "environment": {
<     "image": "rstudio/dev-connect-duplicate"
<   },
26,28d22
<     "manifest-original.json": {
<       "checksum": "f5dcb185f388ab9694ac4e6e3ce9f8e0"
<     },

where the first section is the important verification (and the second is just an artifact that we added a file).

Verify deploy manifest

rsconnect deploy manifest -s http://localhost:3939 -k c7achTdggWVGtr851azThcyYDwH5JRgf --new ./manifest.json

Verify output is similar to:

Deployment log:
Building Python API...
A target image was specified: rstudio/dev-connect-duplicate, checking if it is compatible...
Bundle created with Python version 3.8.13 is compatible with environment Kubernetes::rstudio/dev-connect-duplicate with Python version 3.8.8 from /opt/python/3.8.8/bin/python3.8 
Bundle requested Python version 3.8.13; using /opt/python/3.8.8/bin/python3.8 from Kubernetes::rstudio/dev-connect-duplicate which has version 3.8.8

Verify deploy api

WITH your terminal working directory same as previously (bundles/python-flaskapi)

  1. execute:
rsconnect deploy api -s http://localhost:3939 -k c7achTdggWVGtr851azThcyYDwH5JRgf --new .

Confirm that the automatic image was selected, by verifying the output is similar to:

Deployment log:
Building Python API...
Bundle created with Python version 3.8.13 is compatible with environment Kubernetes::rstudio/dev-connect with Python version 3.8.8 from /opt/python/3.8.8/bin/python3.8 
Bundle requested Python version 3.8.13; using /opt/python/3.8.8/bin/python3.8 from Kubernetes::rstudio/dev-connect which has version 3.8.8
  1. execute:
rsconnect deploy api -s http://localhost:3939 -k c7achTdggWVGtr851azThcyYDwH5JRgf --image rstudio/dev-connect-duplicate --new .

Verify the output is similar to the following:

Deployment log:
Building Python API...
A target image was specified: rstudio/dev-connect-duplicate, checking if it is compatible...
Bundle created with Python version 3.8.13 is compatible with environment Kubernetes::rstudio/dev-connect-duplicate with Python version 3.8.8 from /opt/python/3.8.8/bin/python3.8 
Bundle requested Python version 3.8.13; using /opt/python/3.8.8/bin/python3.8 from Kubernetes::rstudio/dev-connect-duplicate which has version 3.8.8

Validate changes for target: BOKEH

Verify write-manifest bokeh

WITH the venv active.. cd into your rstudio/connect-content repo.
From: rstudio/connect-content:

cd bundles/python-bokeh
# baseline the manifest w/ your virtual environment basics
rsconnect write-manifest bokeh . --overwrite
mv manifest.json manifest-original.json
rsconnect write-manifest bokeh --image rstudio/dev-connect-duplicate .
diff manifest.json manifest-original.json

Confirm that you see the environment/image path added in the new manifest. This will look something like the following

16,18d15
<   "environment": {
<     "image": "rstudio/dev-connect-duplicate"
<   },
26,28d22
<     "manifest-original.json": {
<       "checksum": "f5dcb185f388ab9694ac4e6e3ce9f8e0"
<     },

Where the first section is the important verification (and the second is just an artifact that we added a file).

Verify deploy manifest

rsconnect deploy manifest -s http://localhost:3939 -k c7achTdggWVGtr851azThcyYDwH5JRgf --new  ./manifest.json

Verify output is similar to:

Deployment log:
Building Bokeh application...
A target image was specified: rstudio/dev-connect-duplicate, checking if it is compatible...
Bundle created with Python version 3.8.13 is compatible with environment Kubernetes::rstudio/dev-connect-duplicate with Python version 3.8.8 from /opt/python/3.8.8/bin/python3.8 
Bundle requested Python version 3.8.13; using /opt/python/3.8.8/bin/python3.8 from Kubernetes::rstudio/dev-connect-duplicate which has version 3.8.8

Verify deploy bokeh

WITH your terminal working directory same as previously (bundles/python-bokeh)

  1. execute:
rsconnect deploy bokeh -s http://localhost:3939 -k c7achTdggWVGtr851azThcyYDwH5JRgf --new .

Confirm that the automatic image was selected, by verifying the output is similar to:

Deployment log:
Building Bokeh application...
Bundle created with Python version 3.8.13 is compatible with environment Kubernetes::rstudio/dev-connect with Python version 3.8.8 from /opt/python/3.8.8/bin/python3.8 
Bundle requested Python version 3.8.13; using /opt/python/3.8.8/bin/python3.8 from Kubernetes::rstudio/dev-connect which has version 3.8.8
  1. execute:
rsconnect deploy bokeh -s http://localhost:3939 -k c7achTdggWVGtr851azThcyYDwH5JRgf --image rstudio/dev-connect-duplicate --new .

Verify the output is similar to the following:

Deployment log:
Building Bokeh application...
A target image was specified: rstudio/dev-connect-duplicate, checking if it is compatible...
Bundle created with Python version 3.8.13 is compatible with environment Kubernetes::rstudio/dev-connect-duplicate with Python version 3.8.8 from /opt/python/3.8.8/bin/python3.8 
Bundle requested Python version 3.8.13; using /opt/python/3.8.8/bin/python3.8 from Kubernetes::rstudio/dev-connect-duplicate which has version 3.8.8

Validate changes for target: DASH

Verify write-manifest dash

WITH the venv active.. cd into your rstudio/connect-content repo.
From: rstudio/connect-content:

  1. Execute:
cd bundles/python-dash
# baseline the manifest w/ your virtual environment basics
rsconnect write-manifest dash . --overwrite
mv manifest.json manifest-original.json
rsconnect write-manifest dash --image rstudio/dev-connect-duplicate .
diff manifest.json manifest-original.json

Confirm that you see the environment/image path added in the new manifest. This will look something like the following

16,18d15
<   "environment": {
<     "image": "rstudio/dev-connect-duplicate"
<   },
26,28d22
<     "manifest-original.json": {
<       "checksum": "f5dcb185f388ab9694ac4e6e3ce9f8e0"
<     },

Where the first section is the important verification (and the second is just an artifact that we added a file).

Verify deploy manifest

rsconnect deploy manifest -s http://localhost:3939 -k c7achTdggWVGtr851azThcyYDwH5JRgf --new  ./manifest.json

Verify output is similar to:

Deployment log:
Building Dash application...
A target image was specified: rstudio/dev-connect-duplicate, checking if it is compatible...
Bundle created with Python version 3.8.13 is compatible with environment Kubernetes::rstudio/dev-connect-duplicate with Python version 3.8.8 from /opt/python/3.8.8/bin/python3.8 
Bundle requested Python version 3.8.13; using /opt/python/3.8.8/bin/python3.8 from Kubernetes::rstudio/dev-connect-duplicate which has version 3.8.8

Verify deploy dash

WITH your terminal working directory same as previously (bundles/python-dash)

  1. Execute:
rsconnect deploy dash -s http://localhost:3939 -k c7achTdggWVGtr851azThcyYDwH5JRgf --new .

Confirm that the automatic image was selected, by verifying the output is similar to:

Deployment log:
Building Dash application...
Bundle created with Python version 3.8.13 is compatible with environment Kubernetes::rstudio/dev-connect with Python version 3.8.8 from /opt/python/3.8.8/bin/python3.8 
Bundle requested Python version 3.8.13; using /opt/python/3.8.8/bin/python3.8 from Kubernetes::rstudio/dev-connect which has version 3.8.8
  1. execute:
rsconnect deploy dash -s http://localhost:3939 -k c7achTdggWVGtr851azThcyYDwH5JRgf --image rstudio/dev-connect-duplicate --new .

Verify the output is similar to the following:

Deployment log:
Building Dash application...
A target image was specified: rstudio/dev-connect-duplicate, checking if it is compatible...
Bundle created with Python version 3.8.13 is compatible with environment Kubernetes::rstudio/dev-connect-duplicate with Python version 3.8.8 from /opt/python/3.8.8/bin/python3.8 
Bundle requested Python version 3.8.13; using /opt/python/3.8.8/bin/python3.8 from Kubernetes::rstudio/dev-connect-duplicate which has version 3.8.8

Validate changes for target: FASTAPI

Verify write-manifest fastapi

WITH the venv active.. cd into your rstudio/connect-content repo.
From: rstudio/connect-content:

  1. Execute:
cd bundles/fastapi-simple
# baseline the manifest w/ your virtual environment basics
rsconnect write-manifest fastapi . --overwrite
mv manifest.json manifest-original.json
rsconnect write-manifest fastapi --image rstudio/dev-connect-duplicate .
diff manifest.json manifest-original.json

Confirm that you see the environment/image path added in the new manifest. This will look something like the following

16,18d15
<   "environment": {
<     "image": "rstudio/dev-connect-duplicate"
<   },
26,28d22
<     "manifest-original.json": {
<       "checksum": "f5dcb185f388ab9694ac4e6e3ce9f8e0"
<     },

Where the first section is the important verification (and the second is just an artifact that we added a file).

Verify deploy manifest

rsconnect deploy manifest -s http://localhost:3939 -k c7achTdggWVGtr851azThcyYDwH5JRgf --new  ./manifest.json

Verify output is similar to:

Deployment log:
Building FastAPI application...
A target image was specified: rstudio/dev-connect-duplicate, checking if it is compatible...
Bundle created with Python version 3.8.13 is compatible with environment Kubernetes::rstudio/dev-connect-duplicate with Python version 3.8.8 from /opt/python/3.8.8/bin/python3.8 
Bundle requested Python version 3.8.13; using /opt/python/3.8.8/bin/python3.8 from Kubernetes::rstudio/dev-connect-duplicate which has version 3.8.8

Verify deploy fastapi

WITH your terminal working directory same as previously (bundles/fastapi-simple)

  1. Confirm that the help output contains the image option:
rsconnect deploy fastapi -s http://localhost:3939 -k c7achTdggWVGtr851azThcyYDwH5JRgf --new .

Confirm that the automatic image was selected, by verifying the output is similar to:

Deployment log:
Building FastAPI application...
Bundle created with Python version 3.8.13 is compatible with environment Kubernetes::rstudio/dev-connect with Python version 3.8.8 from /opt/python/3.8.8/bin/python3.8 
Bundle requested Python version 3.8.13; using /opt/python/3.8.8/bin/python3.8 from Kubernetes::rstudio/dev-connect which has version 3.8.8
  1. execute:
rsconnect deploy fastapi -s http://localhost:3939 -k c7achTdggWVGtr851azThcyYDwH5JRgf --image rstudio/dev-connect-duplicate --new .

Verify the output is similar to the following:

Deployment log:
Building FastAPI application...
A target image was specified: rstudio/dev-connect-duplicate, checking if it is compatible...
Bundle created with Python version 3.8.13 is compatible with environment Kubernetes::rstudio/dev-connect-duplicate with Python version 3.8.8 from /opt/python/3.8.8/bin/python3.8 
Bundle requested Python version 3.8.13; using /opt/python/3.8.8/bin/python3.8 from Kubernetes::rstudio/dev-connect-duplicate which has version 3.8.8

Validate changes for target: NOTEBOOK

Verify write-manifest notebook

WITH the venv active.. cd into your rstudio/connect-content repo.
From: rstudio/connect-content:

  1. Execute:
cd bundles/stock-report-jupyter
# baseline the manifest w/ your virtual environment basics
rsconnect write-manifest notebook --overwrite stock-report-jupyter.ipynb quandl-wiki-tsla.json.gz thumbnail.jpg
mv manifest.json manifest-original.json
rsconnect write-manifest notebook --image rstudio/dev-connect-duplicate stock-report-jupyter.ipynb quandl-wiki-tsla.json.gz thumbnail.jpg
diff manifest.json manifest-original.json

Confirm that you see the environment/image path added in the new manifest. This will look something like the following

16,18d15
<   "environment": {
<     "image": "rstudio/dev-connect-duplicate"
<   },

Where the first section is the important verification (and the second is just an artifact that we added a file).

Verify deploy manifest

rsconnect deploy manifest -s http://localhost:3939 -k c7achTdggWVGtr851azThcyYDwH5JRgf --new  ./manifest.json

Verify output is similar to:

Deployment log:
Building Jupyter notebook...
A target image was specified: rstudio/dev-connect-duplicate, checking if it is compatible...
Bundle created with Python version 3.8.13 is compatible with environment Kubernetes::rstudio/dev-connect-duplicate with Python version 3.8.8 from /opt/python/3.8.8/bin/python3.8 
Bundle requested Python version 3.8.13; using /opt/python/3.8.8/bin/python3.8 from Kubernetes::rstudio/dev-connect-duplicate which has version 3.8.8

Verify deploy notebook

WITH your terminal working directory same as previously (bundles/stock-report-jupyter)

  1. Confirm that the help output contains the image option:
rsconnect deploy notebook -s http://localhost:3939 -k c7achTdggWVGtr851azThcyYDwH5JRgf --new stock-report-jupyter.ipynb quandl-wiki-tsla.json.gz thumbnail.jpg

Confirm that the automatic image was selected, by verifying the output is similar to:

Deployment log:
Building Jupyter notebook...
Bundle created with Python version 3.8.13 is compatible with environment Kubernetes::rstudio/dev-connect with Python version 3.8.8 from /opt/python/3.8.8/bin/python3.8 
Bundle requested Python version 3.8.13; using /opt/python/3.8.8/bin/python3.8 from Kubernetes::rstudio/dev-connect which has version 3.8.8
  1. execute:
rsconnect deploy notebook -s http://localhost:3939 -k c7achTdggWVGtr851azThcyYDwH5JRgf --image rstudio/dev-connect-duplicate --new stock-report-jupyter.ipynb quandl-wiki-tsla.json.gz thumbnail.jpg

Verify the output is similar to the following:

Deployment log:
Building Jupyter notebook...
A target image was specified: rstudio/dev-connect-duplicate, checking if it is compatible...
Bundle created with Python version 3.8.13 is compatible with environment Kubernetes::rstudio/dev-connect-duplicate with Python version 3.8.8 from /opt/python/3.8.8/bin/python3.8 
Bundle requested Python version 3.8.13; using /opt/python/3.8.8/bin/python3.8 from Kubernetes::rstudio/dev-connect-duplicate which has version 3.8.8

Validate changes for target: QUARTO

Verify write-manifest quarto

WITH the venv active.. cd into your rstudio/connect-content repo.
From: rstudio/connect-content:

  1. Execute:
cd bundles/quarto-proj-py
# baseline the manifest w/ your virtual environment basics
rsconnect write-manifest quarto . --overwrite
mv manifest.json manifest-original.json
rsconnect write-manifest quarto --image rstudio/dev-connect-duplicate .
diff manifest.json manifest-original.json

Confirm that you see the environment/image path added in the new manifest. This will look something like the following

16,18d15
<   "environment": {
<     "image": "rstudio/dev-connect-duplicate"
<   },
26,28d22
<     "manifest-original.json": {
<       "checksum": "f5dcb185f388ab9694ac4e6e3ce9f8e0"
<     },

Where the first section is the important verification (and the second is just an artifact that we added a file).

Verify deploy manifest

rsconnect deploy manifest -s http://localhost:3939 -k c7achTdggWVGtr851azThcyYDwH5JRgf --new  ./manifest.json

Verify output is similar to:

Deployment log:
Building Quarto document...
Bundle created with Python version 3.8.13 and Quarto version 0.9.16 is compatible with environment Kubernetes::rstudio/dev-connect with Python version 3.8.12 from /opt/python/3.8.12/bin/python3.8 and Quarto version 0.9.16 from /opt/rstudio-connect/ext/quarto/bin/quarto 
Bundle requested Python version 3.8.13; using /opt/python/3.8.12/bin/python3.8 from Kubernetes::rstudio/dev-connect which has version 3.8.12

Verify deploy quarto

WITH your terminal working directory same as previously (bundles/quarto-project-py)

  1. Execute:
rsconnect deploy quarto -s http://localhost:3939 -k c7achTdggWVGtr851azThcyYDwH5JRgf --new .

Confirm that the automatic image was selected, by verifying the output is similar to:

Deployment log:
Building Quarto document...
Bundle created with Python version 3.8.13 and Quarto version 0.9.16 is compatible with environment Kubernetes::rstudio/dev-connect with Python version 3.8.12 from /opt/python/3.8.12/bin/python3.8 and Quarto version 0.9.16 from /opt/rstudio-connect/ext/quarto/bin/quarto 
Bundle requested Python version 3.8.13; using /opt/python/3.8.12/bin/python3.8 from Kubernetes::rstudio/dev-connect which has version 3.8.12
  1. execute:
rsconnect deploy quarto -s http://localhost:3939 -k c7achTdggWVGtr851azThcyYDwH5JRgf --image rstudio/dev-connect-duplicate --new .

Verify the output is similar to the following:

Deployment log:
Building Quarto document...
A target image was specified: rstudio/dev-connect-duplicate, checking if it is compatible...
Bundle created with Python version 3.8.13 and Quarto version 0.9.16 is compatible with environment Kubernetes::rstudio/dev-connect-duplicate with Python version 3.8.12 from /opt/python/3.8.12/bin/python3.8 and Quarto version 0.9.16 from /opt/rstudio-connect/ext/quarto/bin/quarto 
Bundle requested Python version 3.8.13; using /opt/python/3.8.12/bin/python3.8 from Kubernetes::rstudio/dev-connect-duplicate which has version 3.8.12

Validate changes for target: STREAMLIT

Verify write-manifest streamlit

WITH the venv active.. cd into your rstudio/connect-content repo.
From: rstudio/connect-content:

  1. Execute:
cd bundles/python-streamlit
# baseline the manifest w/ your virtual environment basics
rsconnect write-manifest streamlit --overwrite .
mv manifest.json manifest-original.json
rsconnect write-manifest streamlit --image rstudio/dev-connect-duplicate .
diff manifest.json manifest-original.json

Confirm that you see the environment/image path added in the new manifest. This will look something like the following

16,18d15
<   "environment": {
<     "image": "rstudio/dev-connect-duplicate"
<   },

Where the first section is the important verification (and the second is just an artifact that we added a file).

Verify deploy manifest

rsconnect deploy manifest -s http://localhost:3939 -k c7achTdggWVGtr851azThcyYDwH5JRgf --new  ./manifest.json

Verify output is similar to:

Deployment log:
Building Streamlit application...
A target image was specified: rstudio/dev-connect-duplicate, checking if it is compatible...
Bundle created with Python version 3.8.13 is compatible with environment Kubernetes::rstudio/dev-connect-duplicate with Python version 3.8.8 from /opt/python/3.8.8/bin/python3.8 
Bundle requested Python version 3.8.13; using /opt/python/3.8.8/bin/python3.8 from Kubernetes::rstudio/dev-connect-duplicate which has version 3.8.8

Verify deploy streamlit

WITH your terminal working directory same as previously (bundles/python-streamlit)

  1. Confirm that the help output contains the image option:
rsconnect deploy streamlit -s http://localhost:3939 -k c7achTdggWVGtr851azThcyYDwH5JRgf --new .

Confirm that the automatic image was selected, by verifying the output is similar to:

Deployment log:
Building Streamlit application...
Bundle created with Python version 3.8.13 is compatible with environment Kubernetes::rstudio/dev-connect with Python version 3.8.12 from /opt/python/3.8.12/bin/python3.8 
Bundle requested Python version 3.8.13; using /opt/python/3.8.12/bin/python3.8 from Kubernetes::rstudio/dev-connect which has version 3.8.12
  1. execute:
rsconnect deploy streamlit -s http://localhost:3939 -k c7achTdggWVGtr851azThcyYDwH5JRgf --image rstudio/dev-connect-duplicate --new .

Verify the output is similar to the following:

Deployment log:
Building Streamlit application...
A target image was specified: rstudio/dev-connect-duplicate, checking if it is compatible...
Bundle created with Python version 3.8.13 is compatible with environment Kubernetes::rstudio/dev-connect-duplicate with Python version 3.8.8 from /opt/python/3.8.8/bin/python3.8 
Bundle requested Python version 3.8.13; using /opt/python/3.8.8/bin/python3.8 from Kubernetes::rstudio/dev-connect-duplicate which has version 3.8.8

@sagerb sagerb requested review from bcwu and mmarchetti May 26, 2022 21:41
@sagerb sagerb self-assigned this May 26, 2022
@kgartland-rstudio
Copy link
Contributor

Regression testing:

  • all deploy methods
  • all write-manifest options
  • all subcommands
  • successfully deployed content from rsconnect-juptyer (client-side render and server-side render)

Validation complete, ready to merge.

@mmarchetti mmarchetti merged commit 02037fa into master May 31, 2022
@mmarchetti mmarchetti deleted the sagerb-switch-image-to-optional-at-public-api-layer branch May 31, 2022 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants