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

Allow code-server extensions to be installed while the build time #532

Merged
merged 1 commit into from
May 22, 2024

Conversation

atheo89
Copy link
Member

@atheo89 atheo89 commented May 14, 2024

Related to: https://issues.redhat.com/browse/RHOAIENG-6392
#421

Description

This PR Allow code-server extensions to be installed while the build time on --extensions-dir /opt/app-root/extensions-temp and we copy installed extensions to the src extensions directory on runtime vscode script.

How Has This Been Tested?

In disconnected env:
Cluster: https://console-openshift-console.apps.dis-210n.osp.rh-ods.com/k8s/ns/redhat-ods-applications/imagestreams/code-server-notebook/yaml
Image: bastion.dis-210n.osp.rh-ods.com:8443/rh_ee_atheodor/workbench-images@sha256:7ee0cf657d3c287523a5ed155a6fcb009a7aa686ffe828b7eb08e4e27b664048
ImageStreamName:Tag: code-server:pr-532
Notes: Sometimes not always we got some hits on http://127.0.0.1:8787/healthz until copy the tmp extension folder to src
Logs:

spawn-fcgi: child spawned successfully: PID: 10
Debug: User directory already exists.
Debug: '/opt/app-root/src/.local/share/code-server/User/settings.json' file already exists.
Debug: Extension 'ms-python.debugpy-2024.6.0-linux-x64' already exists in runtime directory, skipping.
Debug: Extension 'ms-python.python-2024.2.1' already exists in runtime directory, skipping.
Debug: Extension 'ms-toolsai.jupyter-2023.9.100' already exists in runtime directory, skipping.
Debug: Extension 'ms-toolsai.jupyter-keymap-1.1.2-universal' already exists in runtime directory, skipping.
Debug: Extension 'ms-toolsai.jupyter-renderers-1.0.17-universal' already exists in runtime directory, skipping.
Debug: Extension 'ms-toolsai.vscode-jupyter-cell-tags-0.1.8-universal' already exists in runtime directory, skipping.
Debug: Extension 'ms-toolsai.vscode-jupyter-slideshow-0.1.5-universal' already exists in runtime directory, skipping.
Running command: /usr/bin/code-server --bind-addr 0.0.0.0:8787 --disable-telemetry --auth none --disable-update-check /opt/app-root/src
[2024-05-21T14:22:25.114Z] info code-server 4.22.0 e5d145fdf32e82be2a0f8de9a3b05f65b13052b6
[2024-05-21T14:22:25.115Z] info Using user-data-dir /opt/app-root/src/.local/share/code-server
[2024-05-21T14:22:25.131Z] info Using config file /opt/app-root/src/.config/code-server/config.yaml
[2024-05-21T14:22:25.131Z] info HTTP server listening on http://0.0.0.0:8787/
[2024-05-21T14:22:25.131Z] info - Authentication is disabled
[2024-05-21T14:22:25.131Z] info - Not serving HTTPS
[2024-05-21T14:22:25.131Z] info Session server listening on /opt/app-root/src/.local/share/code-server/code-server-ipc.sock
127.0.0.1 - htpasswd-cluster-admin-user [21/May/2024:14:23:59 +0000] "GET /notebook/test-532/q3 HTTP/1.1" 302 145 "https://oauth-openshift.apps.dis-210n.osp.rh-ods.com/" "Mozilla/5.0 (X11; Linux x86_64; rv:126.0) Gecko/20100101 Firefox/126.0" "10.0.96.119, 10.128.2.2"
[14:23:59]

In connected env:
Image: quay.io/rh_ee_atheodor/workbench-images@sha256:7ee0cf657d3c287523a5ed155a6fcb009a7aa686ffe828b7eb08e4e27b664048
ImageStreamName:Tag: Add a new tag with the given image or the build image from the ci, ex: code-server:pr-532
Notes:
Logs:

spawn-fcgi: child spawned successfully: PID: 10
Debug: User directory already exists.
Debug: '/opt/app-root/src/.local/share/code-server/User/settings.json' file already exists.
Debug: Extension 'ms-python.debugpy-2024.6.0-linux-x64' already exists in runtime directory, skipping.
Debug: Extension 'ms-python.python-2024.2.1' already exists in runtime directory, skipping.
Debug: Extension 'ms-toolsai.jupyter-2023.9.100' already exists in runtime directory, skipping.
Debug: Extension 'ms-toolsai.jupyter-keymap-1.1.2-universal' already exists in runtime directory, skipping.
Debug: Extension 'ms-toolsai.jupyter-renderers-1.0.17-universal' already exists in runtime directory, skipping.
Debug: Extension 'ms-toolsai.vscode-jupyter-cell-tags-0.1.8-universal' already exists in runtime directory, skipping.
Debug: Extension 'ms-toolsai.vscode-jupyter-slideshow-0.1.5-universal' already exists in runtime directory, skipping.
Running command: /usr/bin/code-server --bind-addr 0.0.0.0:8787 --disable-telemetry --auth none --disable-update-check /opt/app-root/src
[2024-05-21T14:22:25.114Z] info code-server 4.22.0 e5d145fdf32e82be2a0f8de9a3b05f65b13052b6
[2024-05-21T14:22:25.115Z] info Using user-data-dir /opt/app-root/src/.local/share/code-server
[2024-05-21T14:22:25.131Z] info Using config file /opt/app-root/src/.config/code-server/config.yaml
[2024-05-21T14:22:25.131Z] info HTTP server listening on http://0.0.0.0:8787/
[2024-05-21T14:22:25.131Z] info - Authentication is disabled
[2024-05-21T14:22:25.131Z] info - Not serving HTTPS
[2024-05-21T14:22:25.131Z] info Session server listening on /opt/app-root/src/.local/share/code-server/code-server-ipc.sock
127.0.0.1 - htpasswd-cluster-admin-user [21/May/2024:14:23:59 +0000] "GET /notebook/test-532/q3 HTTP/1.1" 302 145 "https://oauth-openshift.apps.dis-210n.osp.rh-ods.com/" "Mozilla/5.0 (X11; Linux x86_64; rv:126.0) Gecko/20100101 Firefox/126.0" "10.0.96.119, 10.128.2.2"
[14:23:59]

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

@openshift-ci openshift-ci bot requested review from dibryant and rkpattnaik780 May 14, 2024 11:22
Copy link
Member

@harshad16 harshad16 left a comment

Choose a reason for hiding this comment

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

This looks good to me,
just some nitpick questions

codeserver/ubi9-python-3.9/Dockerfile Outdated Show resolved Hide resolved
codeserver/ubi9-python-3.9/Dockerfile Outdated Show resolved Hide resolved
codeserver/ubi9-python-3.9/Dockerfile Outdated Show resolved Hide resolved
@atheo89 atheo89 force-pushed the install-extensions-on-folder branch from e7d4775 to 3393a01 Compare May 20, 2024 12:48
@atheo89 atheo89 requested review from harshad16 May 20, 2024 13:02
@atheo89 atheo89 force-pushed the install-extensions-on-folder branch from 3393a01 to 9f7dc92 Compare May 21, 2024 13:57
@atheo89 atheo89 force-pushed the install-extensions-on-folder branch from 9f7dc92 to a609ef0 Compare May 21, 2024 14:00
@atheo89
Copy link
Member Author

atheo89 commented May 21, 2024

@harshad16 Thanks for noticing the overriding while the restart of the notebook. I added the logic on the runtime-script to check if an extension already exists. It works now as expected.
Tested with this latest image: quay.io/rh_ee_atheodor/workbench-images@sha256:7ee0cf657d3c287523a5ed155a6fcb009a7aa686ffe828b7eb08e4e27b664048 (Also in the PR description)

Copy link
Contributor

openshift-ci bot commented May 21, 2024

@atheo89: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/notebooks-e2e-tests a609ef0 link true /test notebooks-e2e-tests
ci/prow/images a609ef0 link true /test images

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

Copy link
Member

@harshad16 harshad16 left a comment

Choose a reason for hiding this comment

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

/lgtm

Tested with: quay.io/opendatahub/workbench-images:codeserver-ubi9-python-3.9-pr-532
works as expected:
Screenshot from 2024-05-21 23-59-39

@openshift-ci openshift-ci bot added the lgtm label May 22, 2024
Copy link
Contributor

openshift-ci bot commented May 22, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: harshad16

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

@shalberd
Copy link

great job, thank y'all

@atheo89 atheo89 deleted the install-extensions-on-folder branch October 23, 2024 08:02
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