Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RHOAIENG-7489: Code-Server: Prevent auto updating of the pre-installed extensions #739

Conversation

daniellutz
Copy link
Contributor

@daniellutz daniellutz commented Oct 9, 2024

This PR aims to disable the auto update from installed extensions in the Code Server notebook image.

Jira:

References:

Description

All extensions installed on Code Server will try to update automatically. To keep stability on the deployed notebook image, we aim to disable auto-update extensions, in a way that the user will update if it's really necessary.

Before this change, the extensions were marked for auto updates, as follows:

pre-autoupdate

After the code change, now the user can select to auto update extensions on their own, without the risk of having them updated in a not ideal timing:

post-autoupdate

How Has This Been Tested?

This has been locally tested, which consisted on running the CodeServer image locally with the following commands (example of code-server on ubi9-python-3.9, but the same command was executed for python-3.11):

$ export QUAY_IO=quay.io/{user}/workbench-images
$ export WORKBENCH_RELEASE=2024b
$ make codeserver-ubi9-python-3.9 \
       -e IMAGE_REGISTRY=$QUAY_IO \
       -e RELEASE=$WORKBENCH_RELEASE \
       -e PUSH_IMAGES=no \
       -e CONTAINER_BUILD_CACHE_ARGS=""

This way the image could easily be built and tested, without pushing any images to our quay repository yet.

Now you can run with Podman:

$ export LATEST_TAG=`podman images --format "{{.Repository}}:{{.Tag}}" | grep "$QUAY_IO:codeserver-ubi9-python-3.9-$WORKBENCH_RELEASE" | sort -r | head -n1 | cut -d':' -f2`
$ podman run -it -p 8787:8787 $QUAY_IO:$LATEST_TAG

From there, you could open up in the browser, click on the Extensions tab on the left and check each extension.

Merge criteria:

  • The commits are squashed in a cohesive manner and have meaningful messages.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

Copy link
Contributor

openshift-ci bot commented Oct 9, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@daniellutz daniellutz self-assigned this Oct 9, 2024
@daniellutz daniellutz marked this pull request as ready for review October 9, 2024 13:41
@daniellutz daniellutz changed the title Code-Server: Prevent auto updating of the pre-installed extensions [RHOAIENG-7489] Code-Server: Prevent auto updating of the pre-installed extensions Oct 9, 2024
@daniellutz daniellutz changed the title [RHOAIENG-7489] Code-Server: Prevent auto updating of the pre-installed extensions RHOAIENG-7489: Code-Server: Prevent auto updating of the pre-installed extensions Oct 9, 2024
@jiridanek
Copy link
Member

It does what I was proposing back in the day in a comment on

and from the evidence in the description it seems to be working. For me it's good to be merged.

/lgtm

Copy link
Member

@jstourac jstourac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

It's good we are keeping the python 3.9 code in sync. Just be aware that this change won't land in 2024.1 unless also relevant 2024a branch is updated. In the tracker ticket it's not explicitly stated what all images versions we want to fix this to. I guess that it's 2024b only, but maybe we should consider to specify this explicitly for the future?

@jiridanek
Copy link
Member

It's good we are keeping the python 3.9 code in sync.

I take this as implementing things in main branch; since we have 3.9 and 3.11 vscode image there, then that's where the change should land; unless there are requirements to get this to some specific images release or rhoai release, then let's default to main and just do what's natural

@daniellutz
Copy link
Contributor Author

@jiridanek @jstourac

If there were requirements to fix a specific version, I would follow it up.

Since there were no such requirements, I fixed both that are available on main branch.

@daniellutz
Copy link
Contributor Author

/retest

@atheo89
Copy link
Member

atheo89 commented Oct 10, 2024

/test ci/prow/codeserver-notebook-e2e-tests

Copy link
Contributor

openshift-ci bot commented Oct 10, 2024

@atheo89: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test codeserver-notebook-e2e-tests
  • /test images
  • /test intel-notebooks-e2e-tests
  • /test notebook-base-c9s-python-3-11-pr-image-mirror
  • /test notebook-base-c9s-python-3-9-pr-image-mirror
  • /test notebook-base-ubi9-python-3-11-pr-image-mirror
  • /test notebook-base-ubi9-python-3-9-pr-image-mirror
  • /test notebook-codeserver-ubi9-python-3-11-pr-image-mirror
  • /test notebook-codeserver-ubi9-python-3-9-pr-image-mirror
  • /test notebook-cuda-c9s-python-3-11-pr-image-mirror
  • /test notebook-cuda-c9s-python-3-9-pr-image-mirror
  • /test notebook-cuda-jupyter-ds-ubi9-python-3-11-pr-image-mirror
  • /test notebook-cuda-jupyter-ds-ubi9-python-3-9-pr-image-mirror
  • /test notebook-cuda-jupyter-min-ubi9-python-3-11-pr-image-mirror
  • /test notebook-cuda-jupyter-minimal-ubi9-python-3-9-pr-image-mirror
  • /test notebook-cuda-jupyter-tf-ubi9-python-3-11-pr-image-mirror
  • /test notebook-cuda-jupyter-tf-ubi9-python-3-9-pr-image-mirror
  • /test notebook-cuda-rstudio-c9s-python-3-11-pr-image-mirror
  • /test notebook-cuda-rstudio-c9s-python-3-9-pr-image-mirror
  • /test notebook-cuda-ubi9-python-3-11-pr-image-mirror
  • /test notebook-cuda-ubi9-python-3-9-pr-image-mirror
  • /test notebook-jupyter-datascience-ubi9-python-3-11-pr-image-mirror
  • /test notebook-jupyter-datascience-ubi9-python-3-9-pr-image-mirror
  • /test notebook-jupyter-intel-ml-ubi9-python-3-11-pr-image-mirror
  • /test notebook-jupyter-intel-ml-ubi9-python-3-9-pr-image-mirror
  • /test notebook-jupyter-intel-pyt-ubi9-python-3-11-pr-image-mirror
  • /test notebook-jupyter-intel-pyt-ubi9-python-3-9-pr-image-mirror
  • /test notebook-jupyter-intel-tf-ubi9-python-3-11-pr-image-mirror
  • /test notebook-jupyter-intel-tf-ubi9-python-3-9-pr-image-mirror
  • /test notebook-jupyter-minimal-ubi9-python-3-11-pr-image-mirror
  • /test notebook-jupyter-minimal-ubi9-python-3-9-pr-image-mirror
  • /test notebook-jupyter-pytorch-ubi9-python-3-11-pr-image-mirror
  • /test notebook-jupyter-pytorch-ubi9-python-3-9-pr-image-mirror
  • /test notebook-jupyter-trustyai-ubi9-python-3-11-pr-image-mirror
  • /test notebook-jupyter-trustyai-ubi9-python-3-9-pr-image-mirror
  • /test notebook-rocm-jupyter-min-ubi9-python-3-11-pr-image-mirror
  • /test notebook-rocm-jupyter-minimal-ubi9-python-3-9-pr-image-mirror
  • /test notebook-rocm-jupyter-pyt-ubi9-python-3-11-pr-image-mirror
  • /test notebook-rocm-jupyter-pyt-ubi9-python-3-9-pr-image-mirror
  • /test notebook-rocm-jupyter-tf-ubi9-python-3-11-pr-image-mirror
  • /test notebook-rocm-jupyter-tf-ubi9-python-3-9-pr-image-mirror
  • /test notebook-rocm-ubi9-python-3-11-pr-image-mirror
  • /test notebook-rocm-ubi9-python-3-9-pr-image-mirror
  • /test notebook-rstudio-c9s-python-3-11-pr-image-mirror
  • /test notebook-rstudio-c9s-python-3-9-pr-image-mirror
  • /test notebooks-ubi9-e2e-tests
  • /test rocm-notebooks-e2e-tests
  • /test rocm-runtimes-ubi9-e2e-tests
  • /test rstudio-notebook-e2e-tests
  • /test runtime-cuda-tensorflow-ubi9-python-3-11-pr-image-mirror
  • /test runtime-cuda-tensorflow-ubi9-python-3-9-pr-image-mirror
  • /test runtime-datascience-ubi9-python-3-11-pr-image-mirror
  • /test runtime-datascience-ubi9-python-3-9-pr-image-mirror
  • /test runtime-intel-ml-ubi9-python-3-11-pr-image-mirror
  • /test runtime-intel-ml-ubi9-python-3-9-pr-image-mirror
  • /test runtime-intel-pyt-ubi9-python-3-11-pr-image-mirror
  • /test runtime-intel-pyt-ubi9-python-3-9-pr-image-mirror
  • /test runtime-intel-tf-ubi9-python-3-11-pr-image-mirror
  • /test runtime-intel-tf-ubi9-python-3-9-pr-image-mirror
  • /test runtime-minimal-ubi9-python-3-11-pr-image-mirror
  • /test runtime-minimal-ubi9-python-3-9-pr-image-mirror
  • /test runtime-pytorch-ubi9-python-3-11-pr-image-mirror
  • /test runtime-pytorch-ubi9-python-3-9-pr-image-mirror
  • /test runtime-rocm-pytorch-ubi9-python-3-11-pr-image-mirror
  • /test runtime-rocm-pytorch-ubi9-python-3-9-pr-image-mirror
  • /test runtime-rocm-tensorflow-ubi9-python-3-11-pr-image-mirror
  • /test runtime-rocm-tensorflow-ubi9-python-3-9-pr-image-mirror
  • /test runtimes-ubi9-e2e-tests

Use /test all to run the following jobs that were automatically triggered:

  • pull-ci-opendatahub-io-notebooks-main-codeserver-notebook-e2e-tests
  • pull-ci-opendatahub-io-notebooks-main-images
  • pull-ci-opendatahub-io-notebooks-main-notebook-codeserver-ubi9-python-3-11-pr-image-mirror
  • pull-ci-opendatahub-io-notebooks-main-notebook-codeserver-ubi9-python-3-9-pr-image-mirror

In response to this:

/test ci/prow/codeserver-notebook-e2e-tests

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@atheo89
Copy link
Member

atheo89 commented Oct 10, 2024

/test codeserver-notebook-e2e-tests

Copy link
Member

@atheo89 atheo89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, Daniel, for opening this pull request!

I tested it using the generated image from the PR:
quay.io/opendatahub/workbench-images:codeserver-ubi9-python-3.11-pr-739

After comparing the old image with the one from this PR, I can confirm that the auto-update feature is now disabled by default. Users will need to manually enable it if desired.

Here’s a screenshot from the old image (Auto-update enabled by default):

image

And here’s the new image from this PR (Auto-update successfully disabled by default):

image

/lgtm
/approve

Copy link
Contributor

openshift-ci bot commented Oct 10, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: atheo89

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Contributor

openshift-ci bot commented Oct 10, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: atheo89

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@atheo89
Copy link
Member

atheo89 commented Oct 10, 2024

Override the following tests, since the failings are not related to code-server notebook, but it fails to build the rocm

/override ci/prow/codeserver-notebook-e2e-tests
/override ci/prow/images

Copy link
Contributor

openshift-ci bot commented Oct 10, 2024

@atheo89: Overrode contexts on behalf of atheo89: ci/prow/codeserver-notebook-e2e-tests, ci/prow/images

In response to this:

Override the following tests, since the failings are not related to code-server notebook, but it fails to build the rocm

/override ci/prow/codeserver-notebook-e2e-tests
/override ci/prow/images

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-merge-bot openshift-merge-bot bot merged commit 0fc2e6b into opendatahub-io:main Oct 10, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants