charmcraft build no longer works on xenial (py35) after 0.10.2

Bug #1931436 reported by Alex Kavanagh
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Ceph iSCSI Charm
Fix Committed
High
Unassigned
OpenStack Manila NetApp Charm
Fix Released
High
Unassigned

Bug Description

Error:

 . Building /var/lib/jenkins/workspace/charm_pusher_ceph-iscsi_master/ceph-iscsi (ceph-iscsi) via tox
build create: /var/lib/jenkins/workspace/charm_pusher_ceph-iscsi_master/ceph-iscsi/.tox/build
build installdeps: -r/var/lib/jenkins/workspace/charm_pusher_ceph-iscsi_master/ceph-iscsi/build-requirements.txt
build installed: appdirs==1.4.4,attrs==21.2.0,certifi==2021.5.30,cffi==1.14.5,chardet==4.0.0,charmcraft==0.10.0.dev0+unknown,humanize==2.6.0,idna==2.10,importlib-metadata==2.1.1,Jinja2==2.11.3,jsonschema==3.2.0,macaroonbakery==1.3.1,MarkupSafe==1.1.1,protobuf==3.17.3,pycparser==2.20,pydantic==0.1,pymacaroons==0.13.0,PyNaCl==1.4.0,pyRFC3339==1.1,pyrsistent==0.17.3,python-dateutil==2.8.1,pytz==2021.1,PyYAML==5.3.1,requests==2.25.1,requests-toolbelt==0.9.1,six==1.16.0,tabulate==0.8.9,urllib3==1.26.5,zipp==1.2.0
build run-test-pre: PYTHONHASHSEED='0'
build run-test: commands[0] | charmcraft build
Traceback (most recent call last):
  File "/var/lib/jenkins/workspace/charm_pusher_ceph-iscsi_master/ceph-iscsi/.tox/build/bin/charmcraft", line 5, in <module>
    from charmcraft.main import main
  File "/var/lib/jenkins/workspace/charm_pusher_ceph-iscsi_master/ceph-iscsi/.tox/build/lib/python3.5/site-packages/charmcraft/main.py", line 24, in <module>
    from charmcraft import helptexts, config
  File "/var/lib/jenkins/workspace/charm_pusher_ceph-iscsi_master/ceph-iscsi/.tox/build/lib/python3.5/site-packages/charmcraft/config.py", line 93
    f"{value!r} must be a valid relative path (cannot be empty)"
                                                               ^
SyntaxError: invalid syntax

Currently the build use the charmcraft python package, and this isn't compatible with py35 which ships with xenial. The jenkins builder is xenial (to build charms that are compatible with xenial).

So either we need to pin charmcraft in the jenkins builder, or snap install the charmcraft package.

Changed in charm-ceph-iscsi:
status: New → Triaged
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-ceph-iscsi (master)
summary: - ceph-iscsi can no longer be built on xenial (py35)
+ charmcraft build no longer works on xenial (py35) after 0.10.2
Changed in charm-ceph-iscsi:
assignee: nobody → Alex Kavanagh (ajkavanagh)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-manila-netapp (master)
Changed in charm-manila-netapp:
assignee: nobody → Alex Kavanagh (ajkavanagh)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-ceph-iscsi (master)

Reviewed: https://review.opendev.org/c/openstack/charm-ceph-iscsi/+/795569
Committed: https://opendev.org/openstack/charm-ceph-iscsi/commit/1a234aab38830167efff470dd48d6d5be5e6085f
Submitter: "Zuul (22348)"
Branch: master

commit 1a234aab38830167efff470dd48d6d5be5e6085f
Author: Alex Kavanagh <email address hidden>
Date: Wed Jun 9 16:09:13 2021 +0100

    Pin charmcraft to 0.10.2

    Charmcraft 1.0+ breaks py35 compatibility by introducing f-strings. As
    the charms are still being built on a xenial builder, we currently need
    to pin this for the builds.

    Close-bug: #1931436
    Change-Id: I88f1a2ef629db4bd3add8c346b946b66cf3b08ed

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-manila-netapp (master)

Reviewed: https://review.opendev.org/c/openstack/charm-manila-netapp/+/795574
Committed: https://opendev.org/openstack/charm-manila-netapp/commit/b389284722134f34ca56c10ed895c63a310d2043
Submitter: "Zuul (22348)"
Branch: master

commit b389284722134f34ca56c10ed895c63a310d2043
Author: Alex Kavanagh <email address hidden>
Date: Wed Jun 9 16:23:46 2021 +0100

    Pin charmcraft to 0.10.2

    Charmcraft 1.0+ breaks py35 compatibility by introducing f-strings. As
    the charms are still being built on a xenial builder, we currently need
    to pin this for the builds.

    Close-bug: #1931436
    Change-Id: I405d6a36a3299943baeaf7c216bda57eb1ec5f21

Changed in charm-ceph-iscsi:
status: Triaged → Fix Committed
Changed in charm-manila-netapp:
status: New → Fix Committed
Changed in charm-manila-netapp:
importance: Undecided → High
Changed in charm-ceph-iscsi:
assignee: Alex Kavanagh (ajkavanagh) → nobody
Changed in charm-manila-netapp:
assignee: Alex Kavanagh (ajkavanagh) → nobody
Changed in charm-manila-netapp:
milestone: none → 21.10
Changed in charm-manila-netapp:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.