-
Notifications
You must be signed in to change notification settings - Fork 12
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
build: install jinja2
from binary
#443
Conversation
This commit removes charmed-kubeflow-chisme from the requirements file to prevent it to be built at charm build time, as some of its build deps are causing the issue described in canonical/bundle-kubeflow#883. Also in this commit the requirements-unit.in has been changed to include charmed-kubeflow-chisme to install it during unit tests as it was removed from the requirements.txt; therefore from the requirements-unit.txt file. Finally, this commit removes the "usage" legend from requirements-unit.in as it is not a team standard anymore. Part of canonical/bundle-kubeflow#883
The expected issue in the CI should only be |
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 have concerns about this. I'm not sure it will break anything, but I'm not sure it wont either and I'm not sure how to confirm it really is ok
Does chisme need to be removed from requirements.txt? My understanding was that charm-binary-python-packages
was for listing packages you want to download binaries for, but then the requirements.txt file was still the file the defined all charm dependencies. Any overlap between these files would have no effect.
I'm not clear how charm-binary-python-packages
- do you know whether it installs only the binary for the packages listed (equivalent to pip install just-chisme's-binary
, or if it does a full pip install whatever-is-listed
which installs the dependencies)? I'm worried that if chisme is in charm-binary-python-packages
and removed from requirements.txt then dependencies of chisme wont be installed.
Chisme feels like an odd thing to add to charm-binary-python-packages
since chisme doesn't have any compiled code. Would it make sense to put whatever binary chisme depends on and we're rebuilding into charm-binary-python-packages
instead?
I have added very detailed testing instructions. Please let me know if that helps.
I don't think I follow this concern, sorry - In this PR I am removing chisme from EDIT: I was removing it, but I still don't fully understand the concern. If your concern is that anything listed in both
This is an example of the command that runs at charm build time:
and this is the last log we get from that command:
As you can see, even if I removed
When I was testing this yesterday it did not work for me, but I re-tried and it seems to be working just fine, if it's better I will just put |
jinja2
from binary
@@ -11,3 +11,7 @@ bases: | |||
parts: | |||
charm: | |||
charm-python-packages: [setuptools, pip] # Fixes install of some packages | |||
# Install jinja2 (a dependency of charmed-kubeflow-chisme) from binary to avoid build-time issues | |||
# See https://github.com/canonical/bundle-kubeflow/issues/883 | |||
# Remove when https://github.com/canonical/charmcraft/issues/1664 is fixed |
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.
Does this comment still apply? I think we only wait on 883 to remove this (1664 was a reason why this might be flaky or broken - when 1664 resolves we can't just remove jija2
from the binary list)
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.
(this comment applies to all charms, but no need to make it that many times)
# Install jinja2 (a dependency of charmed-kubeflow-chisme) from binary to avoid build-time issues | ||
# See https://github.com/canonical/bundle-kubeflow/issues/883 | ||
# Remove when https://github.com/canonical/charmcraft/issues/1664 is fixed | ||
charm-binary-python-packages: [jinja2] |
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 wonder if this should be left unpinned, or if it should be pinned to the same thing as in requirements.txt.
Did some local testing and I saw we currently build the charm by downloading the binary for jinja=3.1.2, which is not the latest but is the version specified in requirements.txt. So I think somehow charmcraft is resolving this unpinned version by using the requirements.txt?
I'm asking more about it here, but probably leaving it unpinned here for now is ok
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.
code lgtm. imo the comment about issue 1664 should be removed (see comment above) but its not a blocker. If I'm wrong, leave it in
switch to jlumbroso/free-disk-space for freeing runner space (#428) The previous space freeing method (easimon/maximize-build-space) at some point circa 2024-01 stopped freeing as much space, likely due to changes in the runner (~29GB free after it freed space). Not sure why this happened, but jlumbroso/free-disk-space at time of this commit would get us up to ~45GB free on the runner without negative effects so we've switched to that. Support functionality to override default images for kfp-profile-controller (#416) * Support functionality to override default images for kfp-profile-controller ci: remove destructive mode from integration tests (#441) The charmcraft issues that forced us to use destructive mode are now fixed. build: install `jinja2` from binary (#443) This commit installs jinja2 (an install dependency of charmed-kubeflow-chisme) as a binary to avoid running into the build time issues described in canonical/bundle-kubeflow#883. Part of canonical/bundle-kubeflow#883 refactor: use k8s_service_info lib instead of SDI (#436) * refactor: use k8s_service_info lib instead of SDI Use the k8s_service_info for receiving the MLMD GRPC Service info instead of using the SDI, as it will stop being supported soon. This commit also ensures that mlmd runs with trust=True in the integration tests. Fixes #413 fix: Pin integration test dependencies in main (#434) * pin integration test dependencies Co-authored-by: Daniela Plascencia <[email protected]> feat: Integrate ROCK in metadata-writer charm (#439) chore: Bump o11y libs and remove obsolete juju topology (#446) Ref canonical/bundle-kubeflow#880 Ref canonical/bundle-kubeflow#849 ci: bump juju to 3.5
This commit installs
jinja2
(an install dependency ofcharmed-kubeflow-chisme
) as a binary to avoid running into the build time issues described in canonical/bundle-kubeflow#883.Part of canonical/bundle-kubeflow#883
Test instructions
cd charms/kfp-api
charmcraft clean
to make sure the pack will be done from scratchcharmcraft pack -v
(frommain
) and ensure your get the following error during the pip install process, it should happen when collecting jinja2:Please NOTE the charm will build, the issue with the CI is that it will stop the execution on error because charms are built from a test case.
charmcraft clean
tox -e bundle-integration-v1 -- --model kubeflow --bundle=./tests/integration/bundles/kfp_latest_edge.yaml.j2
kfp-metadata-writer/0
should go to active. It has to show this msg in the status:[relation:grpc] Expected data from exactly 1 related applications - got 0.
. This will be fixed in refactor: use k8s_service_info lib instead of SDI #436.juju relate istio-pilot istio-ingressgateway; juju relate envoy mlmd; juju relate kfp-profile-controller minio
, but please add any other that could be missing if the charm complains.mlmd
has to be trusted from now on, that has to be done manually for this testjuju trust mlmd --scope=cluster
. This is also fixed in refactor: use k8s_service_info lib instead of SDI #436.Expected state: