Closed orfeas-k closed 3 months ago
Thank you for reporting us your feedback!
The internal ticket has been created: https://warthogs.atlassian.net/browse/KF-5473.
This message was autogenerated
Using files in a volume mounted to a local path is not possible when a pod in a remote node needs to access those. Thus, we should enable UATs to be able run in two different modes
This is essentially what we are doing right now. The job created runs the tests from a volume mounted to the local copy of charmed-kubeflow-uats
repository, using hostPath.
For any environment, the user needs to append -local
at the end, which will function like we do for bundle tests.
tox -e <environment>-local
(see next comment for update)
In this case, the user pr for rovides the tox environment with the remote branch from which they 'd like to run tests from. Then, the job creates an emptyDir volume and spins an initContainer
that syncs a volume's directory to the content of a charmed-kubeflow-uats , using kubernetes git-sync image .
In this case, the user needs to append -remote
at the end and provide a branch
argument to pytest:
tox -e <environment>-remote -- --branch=<branch-name>
Instead of allowing the user to define the remote branch they wish to run tests from, tests will automatically grab the currently checked out commit of the local charmed-kubeflow-uats
repository and use this to fetch the tests in the created volume. This way:
branch
manually. That also means that tests will not silently run from main
in the case the user forgets to provide a branch argument.git-sync
initContainer logs.
Bug Description
UATs run by creating a job. This job creates a pod and a pvc which they mount to a local hostpath. That means that when the job and pod is scheduled to a remote node, where the
uats
repo is not available or it is in a different path than the one mounted, the UATs will fail, since the mounted path doesn't exist or it doesn't contain the expected files.test-kubeflow-<hash>
pod created, logs the followingTo Reproduce
This can be reproduced by connecting to a remote cluster where CKF is deployed (e.g. AKS or EKS) and then trying to run kubeflow UATs (with
tox -e kubeflow
)Environment
AKS/EKS Juju 3.4 tox 4.14.1
Relevant Log Output
Additional Context
No response