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
IA-2965 update home dir for jupyter #2492
Conversation
cf7804a
to
e601f31
Compare
jenkins retest |
jenkins retest |
Codecov Report
@@ Coverage Diff @@
## develop #2492 +/- ##
===========================================
+ Coverage 75.30% 75.31% +0.01%
===========================================
Files 113 113
Lines 8705 8711 +6
Branches 148 144 -4
===========================================
+ Hits 6555 6561 +6
Misses 2150 2150
Continue to review full report at Codecov.
|
...c/test/scala/org/broadinstitute/dsde/workbench/leonardo/notebooks/NotebookPyKernelSpec.scala
Show resolved
Hide resolved
...rc/test/scala/org/broadinstitute/dsde/workbench/leonardo/notebooks/NotebookRKernelSpec.scala
Show resolved
Hide resolved
@@ -31,6 +31,10 @@ services: | |||
PIP_USER: "false" | |||
PIP_TARGET: "${NOTEBOOKS_DIR}/packages" | |||
R_LIBS: "${NOTEBOOKS_DIR}/packages" | |||
# The next two lines aren't great. But they're for updating PYTHONPATH, PATH in older than (inclusive) us.gcr.io/broad-dsp-gcr-public/terra-jupyter-base:1.0.2 | |||
# We should remove the two lines once we no longer support older images. In the meantime, we need to be careful updating Jupyter base images. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice if we could link a ticket here. Seems like one of those things we'd forget to update even if we did no longer support the older images
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's a bit unclear what the condition will be for the ticket. So for now, I'm adding a comment and added date when the comment is added
@@ -68,6 +67,7 @@ export START_USER_SCRIPT_URI=$(startUserScriptUri) | |||
export START_USER_SCRIPT_OUTPUT_URI=$(startUserScriptOutputUri) | |||
export WELDER_MEM_LIMIT=$(welderMemLimit) | |||
export MEM_LIMIT=$(memLimit) | |||
export INIT_BUCKET_NAME=$(initBucketName) | |||
export USE_GCE_STARTUP_SCRIPT=$(useGceStartupScript) | |||
GPU_ENABLED=$(gpuEnabled) | |||
export IS_RSTUDIO_RUNTIME="false" # TODO: update to commented out code once we release Rmd file syncing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not related to this ticket, but is this TODO still valid?
RMD file syncing is released currently as far as I'm aware. cc @gpcarr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's turned off for now. Once @gpcarr 's current rmd ticket is done, we should be able to turn it back on
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah it's still valid - we're hardcoding to false
until everything is in place for Rmd file syncing. I'm not sure we'd be able to turn it on when my backend changes are done though, I think we'd need to wait for the frontend to be ready as well
# This condition assumes Dataproc's cert directory is different from GCE's cert directory, a better condition would be | ||
# a dedicated flag that distinguishes gce and dataproc. But this will do for now | ||
# If it's GCE, we resize the PD. Dataproc doesn't have PD | ||
if [ -f "$FILE" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe make a ticket to template the cloudService in here, would be nice not too rely on this as it could change and break this in an unexpected way;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -209,7 +213,8 @@ abstract private[util] class BaseRuntimeInterpreter[F[_]]( | |||
} | |||
|
|||
// Shutdown script to run after the runtime is paused | |||
protected def getShutdownScript(runtimeAndRuntimeConfig: RuntimeAndRuntimeConfig): F[Map[String, String]] = { | |||
protected def getShutdownScript(runtimeAndRuntimeConfig: RuntimeAndRuntimeConfig, | |||
shouldDeleteJupyterDir: Boolean): F[Map[String, String]] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what exactly is the use case for this flag?
Is the intent to cleanup old /notebooks dirs that exist from before this change? depending on how important the use case is, might be worth having a test where this is true to verify the functionality (I see tests where it is true, but not sure if its verified)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The flag is to tell whether shutdown script should delete .jupyter
dir during shutting down. It's only true when it's GCE VM and user wants to delete the VM.
It'll have issue if we create runtimes with different images using the same PD. Will update RuntimeCreationDiskSpec to verify that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly looks good, a couple nits
multi-test |
1 similar comment
multi-test |
out of the 3 multi test runs, 1 passed, 1 failed at fiab-start, 1 failed with one test failure due to Sam error |
...test/scala/org/broadinstitute/dsde/workbench/leonardo/runtimes/RuntimeCreationDiskSpec.scala
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
https://broadworkbench.atlassian.net/browse/IA-2756
https://broadworkbench.atlassian.net/browse/IA-2965
Main changes:
<work>/.jupyter
dir on the VM is deleted when runtimes are deleted so that when we create a new one, new jupyter process have a clean startPYTHONPATH
andPATH
to new path that doesn't have/notebooks
. Because of this we need to re-copy startup script into the new container, and re-fix welder path for dataproc.jupyter_notebook_config.py
so that it doesn't have/notebooks
as dir for notebooksTested manually:
Create a VM with
develop
branch that hashome/jupyter/notebooks
as work dir. Deploy a new leo with this branch, and see if the following works as expected on the same VMHave you read CONTRIBUTING.md lately? If not, do that first.
I, the developer opening this PR, do solemnly pinky swear that:
In all cases:
jenkins retest
multi-test