-
Notifications
You must be signed in to change notification settings - Fork 47
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
use deployed MR for python e2e tests #447
Conversation
On brief look I like a lot the re-use of the kind startup part, the workflow-dispatch to trigger manually if desired and the industrialization of #380 thank you so far @isinyaaa @Al-Pragliola this is looking great already :) |
bd1136d
to
9e8d0d4
Compare
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.
as mentioned in #447 (comment) I really like this, thank you so much
Overall
/lgtm
with some comments below:
REGISTRY_URL = f"{REGISTRY_HOST}:{REGISTRY_PORT}" | ||
COMPOSE_FILE = "docker-compose.yaml" | ||
MAX_POLL_TIME = 1200 # the first build is extremely slow if using docker-compose-*local*.yaml for bootstrap of builder image | ||
REGISTRY_URL = os.environ.get("MR_URL", "http://localhost:8080") |
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.
on a totally unrelated note, I would use analogous "injection approach" also for the other capability about #421
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 would prefer to use the serialization capabilities already available on Pydantic with the addition of Python-dotenv, would you prefer to have this change applied to this PR or later?
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.
definitely for later.
I'm not opinionated on a library for bringing in the config values a-la Vyper or SmallRye Config, but we will need to support env variables, .env, and ConfigMaps, etc a-la 12Factor apps imho
@Al-Pragliola thoughts?
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.
Yes, we definitely need to support them as this approach makes everything more flexible 👍🏼
b37a644
to
5eeab26
Compare
Signed-off-by: Alessio Pragliola <seth.pro@gmail.com> Co-authored-by: Alessio Pragliola <seth.pro@gmail.com> Signed-off-by: Isabella do Amaral <idoamara@redhat.com>
Signed-off-by: Matteo Mortari <matteo.mortari@gmail.com> Co-authored-by: Matteo Mortari <matteo.mortari@gmail.com> Signed-off-by: Isabella do Amaral <idoamara@redhat.com>
Signed-off-by: Alessio Pragliola <seth.pro@gmail.com> Co-authored-by: Alessio Pragliola <seth.pro@gmail.com> Signed-off-by: Isabella do Amaral <idoamara@redhat.com>
5eeab26
to
72cda40
Compare
fi | ||
|
||
kubectl apply -k manifests/kustomize/overlays/db | ||
kubectl set image -n kubeflow deployment/model-registry-deployment rest-container="$IMG" |
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.
to double-check.
during release, a PR with the updated manifest kustomization image setting is applied.
So first, the manifests are deployed to kind with an image tag which will not be found (the tag does not exists yet in the container registry).
This line (36) actually set the deployment model registry image to the one locally built, hence existing and loaded in the kind cluster.
Can this be confirmed, please?
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 image is being loaded on local mode inside the script. and on the CI it's loaded with a different command, but by the same method. So two cases here:
- LOCAL envvar set:
create the cluster and load the pre-built image inside, then run line 36 eventually. - No envvar set:
assume the cluster already exists and has the image loaded. then we only set it after deploying MR (this avoids using kustomize directly which would change the manifests)
does this answer? otherwise @Al-Pragliola might be able to answer better as he suggested this change :)
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.
thanks @isinyaaa I see, in case of GHA we do not set the LOCAL and we invoke directly the pytest via nox (instead of make):
that should do it.
I will wait for confirmation from @Al-Pragliola and likely will add some comments into it.
(no need to reply over weekend 😅 but I wanted to mark it down before forgetting 🙃 thanks a lot)
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 confirm what @isinyaaa just said, the job of the deploy_on_kind script is to first fill all the requirements for deploying mr and then deploy it on the current's context cluster.
In case of CI all requirements:
- existing Kubernetes cluster
- mr docker image built
- mr docker image present on the cluster's registry
are already done in the previous steps of the action, so we can just create the namespace and deploy by not setting the LOCAL env.
We decided to replace kustomize edit with kubectl edit for two reasons:
- remove a dependency
- avoid creating drifts, since kustomize actually modifies the manifests, which is a bit of a pain when running the script locally because the user has to undo local changes.
Hope this works well for everyone.
Co-authored-by: Alessio Pragliola <83355398+Al-Pragliola@users.noreply.github.com> Signed-off-by: Isabella Basso <isabellabdoamaral@gmail.com>
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
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Al-Pragliola, tarilabs The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Fixes: #380
Description
Python e2e tests will use an environment variable to MR, delegating clean-up to a separate script.
The script is made environment-aware using envvars.
The CI has been updated to account for the changes, separating the Python workflows into 3 types to make it clearer.
How Has This Been Tested?
Merge criteria:
DCO
check)If you have UI changes