canonical / charmed-kubeflow-uats

Automated UATs for Charmed Kubeflow
Apache License 2.0
5 stars 2 forks source link

feat: Run UATs from a remote commit #67

Closed orfeas-k closed 3 months ago

orfeas-k commented 3 months ago

This PR fixes #65. Implemented solution is described in https://github.com/canonical/charmed-kubeflow-uats/issues/65#issuecomment-2016884170. It essentially add the option of running tests either from:

Closes #65

Testing

In order to test this, one needs to:

  1. Deploy CKF in a microk8s environment and run tox -e kubeflow-local.
  2. Deploy CKF to an AKS/EKS cluster and run tox -e kubeflow-remote -- --branch kf-5473-add-remote-option.

That being said, I 've tested option 2 in an AKS cluster only (it works) and it will be tested also by the CI once it is implemented in https://github.com/canonical/bundle-kubeflow/pull/850. It should work in EKS too but if it doesn't, we already have a different issue for EKS #55 and a task too https://github.com/canonical/bundle-kubeflow/issues/802, thus if it doesn't work, it will be tackled as part of those efforts.

kimwnasptd commented 3 months ago

@orfeas-k would it be possible to run a git command and detect the commit from which the test runs, and then use this to fetch from when running remotely?

Essentially to avoid having folks to define the branch/commit manually and have the driver code detect the commit and tell it to the remote code. But this is a high level comment, and maybe not feasible depending on how the code is executed in the remote.

orfeas-k commented 3 months ago

@kimwnasptd Changed implementation to grab the checked out commit from the local repository and use this to sync the tests in the created volume. If the commit doesnt exist, tests will fail and log git-sync's initContainer logs. Added https://github.com/canonical/charmed-kubeflow-uats/issues/65#issuecomment-2026892768.

kimwnasptd commented 3 months ago

@orfeas-k nice! The changes LGTM, so if/when @NohaIhab is also OK we can merge