aws-samples / sagemaker-studio-lifecycle-config-examples

MIT No Attribution
81 stars 53 forks source link

Auto-shutdown extension installers keep fetching unused files #2

Closed athewsey closed 3 years ago

athewsey commented 3 years ago

Because install-autoshutdown-extension is written with a plain wget command, every JupyterServer start-up causes it to download a new copy of the installer tarball with an extra increment indicator on the end of the filename (e.g. .1)

This also means that although the artifact is re-fetched on each start-up, only the first one is ever used.

This script could instead use e.g. the -O or -N wget flags to overwrite the same filename each time.

I'd also probably recommend it should save the file to a dot-prefixed location, so it doesn't clutter up users' file tree views in Jupyter by default - but they can still find it if they want to go looking?

The same issue also appears to affect install-autoshutdown-server-extension as currently written.

I can open a PR proposing a potential fix.