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

build: install jinja2 from binary #443

Merged
merged 3 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions charms/kfp-api/charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

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)

Copy link
Contributor

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)

charm-binary-python-packages: [jinja2]
Copy link
Contributor

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

4 changes: 4 additions & 0 deletions charms/kfp-metadata-writer/charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
charm-binary-python-packages: [jinja2]
6 changes: 4 additions & 2 deletions charms/kfp-persistence/charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ bases:
channel: "20.04"
parts:
charm:
build-packages:
- git # To install packages directly from github. Remove when not needed
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
charm-binary-python-packages: [jinja2]
7 changes: 4 additions & 3 deletions charms/kfp-profile-controller/charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ parts:
charm:
prime:
- ./files/upstream/sync.py
build-packages:
- git # To install packages directly from github. Remove when not needed
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
charm-binary-python-packages: [jinja2]
4 changes: 4 additions & 0 deletions charms/kfp-schedwf/charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
charm-binary-python-packages: [jinja2]
6 changes: 4 additions & 2 deletions charms/kfp-ui/charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ bases:
channel: "20.04"
parts:
charm:
build-packages:
- git # To install packages directly from github. Remove when not needed
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
charm-binary-python-packages: [jinja2]
5 changes: 4 additions & 1 deletion charms/kfp-viewer/charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@ bases:
channel: "20.04"
parts:
charm:
build-packages: [git] # Remove after we use package from github in requirements.in
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
charm-binary-python-packages: [jinja2]
4 changes: 4 additions & 0 deletions charms/kfp-viz/charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
charm-binary-python-packages: [jinja2]
Loading