Closed mthaddon closed 3 years ago
https://github.com/canonical/operator/issues/517 seems possibly relevant here
Without looking too much into the error, it also looks like you would need to build-on 16.04 and not 20.04 to ensure your dependencies work on the minimum python version you wish to support (or use multiple build-on/run-on statements)
Hello! Tom, you're right, that issue is relevant here. You're getting the same problem related there, an incompatibility of the code with old Python. But it looks it's fixed in last April, so which version of the Operator Framework are you using?
@facundobatista the requirements.txt file has ops>=1.0,<2.0
. It looks like that'll be using the latest release, which is 1.2.0 released in on April 21st. I'll confirm if I still see the same issue with the latest revision of the operator framework code.
I can confirm with git+https://github.com/canonical/operator/#egg=ops
in requirements.txt and git as a build-package in the "parts/charm" section of charmcraft.yaml I can build a version of the ubuntu charm that deploys on xenial. Sorry for the noise.
I noticed that the ubuntu charm doesn't have a charmcraft.yaml file yet. So I added one as follows and built locally:
This failed to deploy on xenial:
I tried changing the
build-on
value to 18.04 got the same error when deploying the charm on xenial. I tried changing thebuild-on
value to 16.04 but I get the errorSkipping 'bases[0].build-on[0]': channel '16.04' is not yet supported (must be '18.04' or '20.04').
It seems to me like it's not currently possible to build a charm using charmcraft that will work on xenial. Am I missing something?