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

feat(workflows): integrate hadolint (dockle failed) #500

Merged
merged 29 commits into from
Aug 30, 2023

Conversation

Jose-Matsuda
Copy link
Contributor

Description

What your PR adds/fixes/removes
Leverage Dockle, nothing else, will need to determine when we want to fail

Tests / Quality Checks

Are there breaking changes?

Ask yourself the next question;

  • Do we want to maintain the previous image from which we had to do breaking changes from?

If no, then carry on. If yes, there is a breaking change and we want to maintain the previous image do the following

  • Create a new branch for the current version (ex v1) based off the current master/main branch
  • Increment the tag in the CI for pushes to master/main (v1 to v2)
  • Change the CI that on pushes to the newly created "v1" branch (the name of the newly created branch we want to maintain is) it will push to the ACR.

Automated Testing/build and deployment

  • Does the image pass CI successfully (build, pass vulnerability scan, and pass automated test suite)?
  • If new features are added (new image, new binary, etc), have new automated tests been added to cover these?
  • If new features are added that require in-cluster testing (e.g. a new feature that needs to interact with kubernetes), have you added the auto-deploy tag to the PR before pushing in order to build and push the image to ACR so you can test it in cluster as a custom image?

JupyterLab extensions

  • Are all extensions "enabled" (jupyter labextension list from inside the notebook)?

VS Code tests

  • Does VS Code open?
  • Can you install extensions?

Code review

  • Have you added the auto-deploy tag to your PR before your most recent push to this repo? This causes CI to build the image and push to our ACR, letting reviewers access the built image without having to create it themselves
  • Have you chosen a reviewer, attached them as a reviewer to this PR, and messaged them with the SHA-pinned image name for the final image to test on the dev cluster (e.g. k8scc01covidacrdev.azurecr.io/jupyterlab-cpu:746d058e2f37e004da5ca483d121bfb9e0545f2b)?

@Jose-Matsuda
Copy link
Contributor Author

Jose-Matsuda commented Aug 11, 2023

Similar to Pat, some of the images are just failing building (and I definitely did not touch anything that should affect that).

So I compared the Dockerfiles for one of the images that fail to build in this current workflow this run from 3 weeks ago](https://github.com/StatCan/aaw-kubeflow-containers/actions/runs/5587354004/job/15131793911) and the sas dockerfile itself has not changed in 3 weeks and was successful (as were all the other images) in pushing
image

Even two weeks ago when I approved Bryan's PR
everything built fine
image

@Jose-Matsuda
Copy link
Contributor Author

Our nightly build pushes also happen to correspond with the merging of that PR somehow.
image
(note that the middle one of the 3rd was cancelled by Pat (but I think this would have succeeded anyways)
image

Bryan's PR was merged in August 4th and the nightly build then failed;
image
but I still dont understand why

@Jose-Matsuda
Copy link
Contributor Author

Jose-Matsuda commented Aug 23, 2023

I dont understand this https://github.com/StatCan/aaw-kubeflow-containers/actions/runs/5952108859/job/16143335555

image
vs
image

As in we have cases where it succeeds and doesnt produce an error, but another where it will just die on trying to pull...

@Jose-Matsuda
Copy link
Contributor Author

Jose-Matsuda commented Aug 29, 2023

even changing from localhost to just the tag of just jupyterlab-pytorch:sha does not work :/

Souheil advised doing a tar thing as in here
I was looking into doing something with xargs but cant really do it I think / cant avoid doing a docker save to a tar file (we cant just use the input).

something like echo "-v" | xargs -I{} curl google.com {} could have been adapted for our use case here if it would take input.

@Jose-Matsuda
Copy link
Contributor Author

Trying hadolint, it seems to have failed for the same reason though I thought it just ran on the Dockerfile definition and NOT the image....

@Jose-Matsuda Jose-Matsuda changed the title feat(workflows): integrate dockle feat(workflows): integrate hadolint (dockle failed) Aug 30, 2023
Copy link
Contributor

@mathis-marcotte mathis-marcotte left a comment

Choose a reason for hiding this comment

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

lgtm

@Jose-Matsuda Jose-Matsuda merged commit 61edd26 into master Aug 30, 2023
7 checks passed
@Jose-Matsuda Jose-Matsuda deleted the 115-leverage-dockle branch August 30, 2023 14:27
bryanpaget added a commit that referenced this pull request Sep 18, 2023
* Update build_push.yaml: actions/setup-python@v4 (#490)

update actions/setup-python@v2 to actions/setup-python@v4

* Update build_push.yaml: deprecate set-output (#491)

* Update build_push.yaml: deprecate set-output

update workflow to use $GITHUB_OUTPUT instead of set-output.

See: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

* Update build_push.yaml: update syntax

* Update build_push.yaml: update syntax for interpolation

* Update build_push.yaml: change notebook name variable name

* update remaining set-output commands

* Update Makefile: reset set-output commands for Makefile

Github Actions was complaining about set-output in the Makefile but I think we have to leave these lines alone since they are used by Make and not by Github Actions.

* Update Makefile (#508)

* update set-output to GITHUB_OUTPUT (#501)

* update set-output to GITHUB_OUTPUT

* feat(workflows): integrate hadolint (dockle failed) (#500)

* feat(workflow): leverage hadolint

* Remove minio (#522)

---------

Co-authored-by: Jose Manuel (Ito) <[email protected]>
Co-authored-by: Wendy Gaultier <[email protected]>
chuckbelisle pushed a commit that referenced this pull request Sep 27, 2023
* update base image and fix errors

* Update 6_remote-desktop.Dockerfile: remove light-locker

The light-locker removal command was failing, as light-locker was not installed... so I removed the removal command but when I launch the container on Kubeflow... the screen is locked.

* make generate-dockerfiles

* trigger CI/CD

* remove light-locker later in build process

the screen is still locking. :-/

* remove xfce4-screensaver

the screen is still locking. :-/

* test(pspp): French UI

Test PSPP from Ubuntu Repo to make sure French UI is shown. Remove installer script and update Dockerfile.

* add apt-get update

* remove pspp.sh

* remove pspp.sh

* Update build_push.yaml: actions/setup-python@v4 (#490)

update actions/setup-python@v2 to actions/setup-python@v4

* Update build_push.yaml: deprecate set-output (#491)

* Update build_push.yaml: deprecate set-output

update workflow to use $GITHUB_OUTPUT instead of set-output.

See: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

* Update build_push.yaml: update syntax

* Update build_push.yaml: update syntax for interpolation

* Update build_push.yaml: change notebook name variable name

* update remaining set-output commands

* Update Makefile: reset set-output commands for Makefile

Github Actions was complaining about set-output in the Makefile but I think we have to leave these lines alone since they are used by Make and not by Github Actions.

* Update Makefile (#508)

* Update rstudio.desktop: /usr/bin/rstudio

The previously set location no longer exists.

* Update 6_rstudio.Dockerfile: update Rstudio version

I've updated rstudio-server to a (hopefully) compatible version.

* make generate-dockerfiles

* downgrade: rstudio-desktop to 2023.06.0-421

* update(r-studio-desktop.sh): sha256

* update(Rprofile.site): dev repo

* update(Rprofile.site): reset R repo

* update(6_rstudio): mkdir -p /etc/rstudio

builds were failing because this dir did not exist

* update set-output to GITHUB_OUTPUT (#501)

* update set-output to GITHUB_OUTPUT

* create(6_rstudio-server.Dockerfile)

* update(6_rstudio): mkdir -p /etc/rstudio

* update(0_cpu, 0_cpu_sas): BASE_VERSION=2023-08-07

* update(6_rstudio): remove tidymodels, causing test to fail

* update(test_packages): add tidymodels to exclude list

* update(test_packages): add more to exclusion list

* update(CUDA): update ubuntu1804 to ubuntu2204

* update(test_packages): tidymodels ==> r-tidymodels

* update(test_packages): comment out two jupyterlab extensions

* update(jupyterlab): jupyterlab-git==0.42.0

* update(jupyterlab): update packages and vscode

* update(jupyterlab): refactor dockerfile

- switch from conda to mamba
- switch some conda statements to pip

* make generate-dockerfiles

* downgrade tidymodels to 1.0.0

We'll have to wait until the rstudio image is based on R 4.3 before we can upgrade to tidymodels==1.1.0

* Update Makefile: remove buildkit=0

remove buildkit=0

* update (0_Rocker, r-studio-desktop): 2023.06.2-561

* update rstudio-server: 2023.06.2-561

* update(PR): based on comments

* update(jupyterlab): jupyter-dash caused build fail

so I tried removing the version pinning, it wasn't breaking before so I'm not sure what changed.

* update(rstudio): remove pin on tidymodels

since it breaks on the newer versions of R but we don't have a consistent version of R across images so it might be helpful to unpin tidymodels so we can let the system resolve a compatible version.

* update(get-nvidia-stuff): 1804 to 2204

* Downgrade remote desktop (#519)

* revert(remote-desktop): to previous working state

* update(r-studio-desktop): revert installer

* update(PR): based on comments

* update(jupyterlab): jupyter-dash caused build fail

so I tried removing the version pinning, it wasn't breaking before so I'm not sure what changed.

* update(rstudio): remove pin on tidymodels

since it breaks on the newer versions of R but we don't have a consistent version of R across images so it might be helpful to unpin tidymodels so we can let the system resolve a compatible version.

* update(get-nvidia-stuff): 1804 to 2204

* Update Dockerfile

---------

Co-authored-by: Bryan Paget <[email protected]>

* make generate-dockerfiles

* update branch (#524)

* Update build_push.yaml: actions/setup-python@v4 (#490)

update actions/setup-python@v2 to actions/setup-python@v4

* Update build_push.yaml: deprecate set-output (#491)

* Update build_push.yaml: deprecate set-output

update workflow to use $GITHUB_OUTPUT instead of set-output.

See: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

* Update build_push.yaml: update syntax

* Update build_push.yaml: update syntax for interpolation

* Update build_push.yaml: change notebook name variable name

* update remaining set-output commands

* Update Makefile: reset set-output commands for Makefile

Github Actions was complaining about set-output in the Makefile but I think we have to leave these lines alone since they are used by Make and not by Github Actions.

* Update Makefile (#508)

* update set-output to GITHUB_OUTPUT (#501)

* update set-output to GITHUB_OUTPUT

* feat(workflows): integrate hadolint (dockle failed) (#500)

* feat(workflow): leverage hadolint

* Remove minio (#522)

---------

Co-authored-by: Jose Manuel (Ito) <[email protected]>
Co-authored-by: Wendy Gaultier <[email protected]>

* revert(6_jupyterlab): revert digression

* make generate-dockerfiles

* Update 6_jupyterlab.Dockerfile

Fix issue with JupyterLab extensions

* Update 6_rstudio.Dockerfile: remove tidymodels

Tidymodels is a troublesome package, will leave to the user to install, if needed.

* make generate-dockerfiles

* update(jupyterlab): 4.0.5

I was getting errors saying xxx extension needs to be included in build.

* update(jupyterlab): 4.0.5

I was getting errors saying xxx extension needs to be included in build.

* update(jupyterlab): 4.0.5

I was getting errors saying xxx extension needs to be included in build.

* update(jupyterlab): fix extensions

I reworked the package install script to use fewer RUN blocks. I also discovered jupyter_contrib_nbextensions prefers pip over mamba. Local testing suggests I've stopped the jupyterlab build errors.

* update(test_packages): add jupyter ext to exclude list

I added pillow and pyyaml to the exclude list since they are not imported by name (e.g. import pil, import yaml).

* Make torch available (#520)

* update(pytorch): remove virtual env

* update(pytorch): remove virtual env

* update(cpu, pytorch): mamba install pytorch to base

* update(pytorch): adjust torch installation

* update(pytorch): add ipykernel and conda env

* update(pytorch): remove CUDA

The PyTorch install command includes CUDA drivers, so I'll try installing those instead of our custom install script.

* update(pytorch): add ipykernel

* update(pytorch): add gputil

gputil has nvidia-smi

* update(tensorflow): add cuda to mamba command

I also tweaked the pytorch image to use mamba for the clean command

* update(tensorflow): add cuda to mamba command

I also tweaked the pytorch image to use mamba for the clean command

* update(tensorflow): remove tensorflow-gpu

tensorflow works for both gpu and cpu

* update(gpu-notebooks): remove conda env

tensorflow tests are failing, I think they expect tensorflow to be installed in the base env, which is what I prefer, so I'll move pytorch into the base env as well.

* update(cpu, pytorch, tensorflow): consistency

* update(test_tensorflow): use tensorflow env

* update(test_packages): add gputil to exclude list

* update(test_packages): add cudnn, cudatoolkit to exclude list

* update(pytorch, tensorflow): ipykernel install

* revert(cpu): fix cpu conda env

* update(tests): gpu available

* update(makefile): restore tensorflow build

* update(tests): remove GPU test

Github Actions won't have a GPU

* update(jupyterlab): jupyter-dash caused build fail

so I tried removing the version pinning, it wasn't breaking before so I'm not sure what changed.

* update(PR): based on comments

* update(rstudio): remove pin on tidymodels

since it breaks on the newer versions of R but we don't have a consistent version of R across images so it might be helpful to unpin tidymodels so we can let the system resolve a compatible version.

* update(get-nvidia-stuff): 1804 to 2204

* revert(2_tensorflow): prev working configuration

* update(0_Rocker): remove whitespace delta

* update(2_tensorflow): new line

* Update test_tensorflow.py: revert test

We are not yet using a Tensorflow conda env.

---------

Co-authored-by: Bryan Paget <[email protected]>

* Update test_packages.py: add missing comma

* Jupyterlab openmpp poc (#518)

* feat: install openmpp as jupyterlab service

* fix: generate dockerfiles

* chore: trigger auto-deploy

* fix: copy oms startup script

* fix: copy script in correct docker bit

* fix: make script executable

* fix: update openm version, fix config

* fix: sync issue

* fix: prepare openmpp config for prod deployment

* fix: move config to start-oms script

* Jupyterlab openmpp poc (#518) (#527)

* feat: install openmpp as jupyterlab service

* fix: generate dockerfiles

* chore: trigger auto-deploy

* fix: copy oms startup script

* fix: copy script in correct docker bit

* fix: make script executable

* fix: update openm version, fix config

* fix: sync issue

* fix: prepare openmpp config for prod deployment

* fix: move config to start-oms script

Co-authored-by: Pat Ledgerwood <[email protected]>

* Jupyterlab openmpp poc (#518) (#528)

* feat: install openmpp as jupyterlab service

* fix: generate dockerfiles

* chore: trigger auto-deploy

* fix: copy oms startup script

* fix: copy script in correct docker bit

* fix: make script executable

* fix: update openm version, fix config

* fix: sync issue

* fix: prepare openmpp config for prod deployment

* fix: move config to start-oms script

Co-authored-by: Pat Ledgerwood <[email protected]>

* update(jupyterlab): add --openssl-legacy-provider

npm build ompp-ui was failing, adding --openssl-legacy-provider  to the build command resolved the issue.

* update(jupyterlab): add ARG NODE_OPTIONS

npm build ompp-ui was failing, adding --openssl-legacy-provider to the build command resolved the issue locally but breaks on Github Actions, will try ARG NODE_OPTIONS=--openssl-legacy-provider.

---------

Co-authored-by: Bryan Paget <[email protected]>
Co-authored-by: Jose Manuel (Ito) <[email protected]>
Co-authored-by: Wendy Gaultier <[email protected]>
Co-authored-by: Pat Ledgerwood <[email protected]>
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.

2 participants