openwallet-foundation / acapy-plugins

aries-acapy-plugins
https://hyperledger.github.io/aries-acapy-plugins/
Apache License 2.0
6 stars 27 forks source link

Upgrade kafka_events events to python 3.12 #746

Open jamshale opened 4 months ago

jamshale commented 4 months ago

Aca-py version 1.0.0 requires python 3.12. Most of the plugins were upgraded easily in https://github.com/hyperledger/aries-acapy-plugins/pull/567, which is waiting for the release. However, kafka_events was proving more difficult. The aiokafka library was getting a doesn't support PEP 517 rule which was preventing the build. There's ways around this by building the library in the build files before installing with poetry, but there was additional complications with the alpine python 3.12 image which is used for the deliverer and queue services.

If we want the plugin to be available for new aca-py applications then we need to be able to upgrade.

dbluhm commented 3 months ago

We can swap from alpine to a debian based image, if that's all that's required. Use of alpine for the deliverer and queue services was somewhat arbitrary. Debian slim images are plenty small enough these days.

jamshale commented 3 months ago

I think that may help. I tried that, but then I was getting ssl issues. It's the aiokafka library that was issue with PEP 517 builds, and none of the work a rounds I tried were working.

dbluhm commented 3 months ago

I'll dig into this!

dbluhm commented 3 months ago

@jamshale I'm looking at the kafka events plugin for the first time in a while and noticed that the plugin structure is different from what I remember. The kafka_queue, deliverer, and http_kafka_relay are all in a v1_0 package inside of a kafka_events package. Is this structure strictly necessary for the automated maintenance scripts?

It feels weird to have a definition.py for a plugin that isn't defining a protocol. The deliverer and http_kafka_relay are also more or less independent components and are not ACA-Py plugins. Would it be problematic for me to return the overall structure to what it was before, more or less?

jamshale commented 3 months ago

No. I think I did that before I really understood what I was doing. I created the services directory because I thought we're similar enough to share the same dockerfiles and pyproject.toml file.

The structure only needs a directory inside the plugins' root directory, but any other changes are fine.