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

Debian 12 support #68

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

borgwaldtk
Copy link

  • support using system packages in installation venv
  • changed version pinning of psycopg2 to reflect the comment
  • updated package dependencies for Debian 12

Tested with pypi installation method, postgresql backend using Debian's package python3-psycopg2 (version 2.9.5-1+b1).

* support using system packages in installation venv
* changed version pinning of psycopg2 to reflect the comment
* updated package dependencies for Debian 12

Tested with pypi installation method, postgresql backend using Debian's
package python3-psycopg2 (version 2.9.5-1+b1).
@softwarefactory-project-zuul
Copy link

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/79c7449a4f4f4c2499b87c18412ae3f6

✔️ ara-role-api-distributed-sqlite SUCCESS in 13m 09s
✔️ ara-role-api-mysql SUCCESS in 14m 19s
✔️ ara-role-api-postgresql SUCCESS in 14m 25s
✔️ ara-role-api-gunicorn-nginx SUCCESS in 12m 07s
✔️ ara-role-api-gunicorn-nginx-client-cert SUCCESS in 11m 04s
ara-role-api-fedora-packages FAILURE in 6m 16s (non-voting)

@Thulium-Drake
Copy link
Contributor

Looks good, the whole "Debian 12, Python 3.11, thou shalt not install pip packages outside of pipx" prompted me to make #69, but good to see there's options now ;-)

@dmsimard maybe drop testing for Ubuntu and switch to Debian instead? I have my environment running on it, but it seems more people do :-)

@borgwaldtk
Copy link
Author

Using a venv still seems to be a valid way for Debian 12. But I did not see a real advantage in using pipx instead of pip, so I tried not to make too many changes.

@dmsimard
Copy link
Contributor

Hello, sorry for the delay and thanks for the PR!

I've actually just recently used the collection to deploy on top of Debian 12, I had filed these issues but you beat me to sending a PR:

This looks good at first glance but I will review it sometime soon.

@dmsimard
Copy link
Contributor

@dmsimard maybe drop testing for Ubuntu and switch to Debian instead? I have my environment running on it, but it seems more people do :-)

At this time this is dependant on Debian being available in Zuul (which it isn't). That's not to say we couldn't do it via a github action or something like that but it's probably a bigger discussion to have.

@xorwow
Copy link

xorwow commented Jan 31, 2024

Any updates on this?

@dmsimard
Copy link
Contributor

Hi @xorwow, I would like to merge this into an upcoming release in the not-too-distant future.

There is some maintenance and bug fixes to make CI happy (for example here) and we will eventually get to this PR.

I would also like to address our lack of CI coverage on Debian to make sure it is tested.

@dmsimard
Copy link
Contributor

I will have an opportunity to test this soon, it will be included in an upcoming bugfix release.

@dmsimard
Copy link
Contributor

The opportunity is here and I am working my way through this. Sorry it's taken so long.

For context I will be migrating the existing live demo (https://demo.recordsansible.org/) to Debian 12 and it is already set up to use the collection with https://github.com/ansible-community/ara-infra/blob/master/playbooks/live-demo.yaml.

It's historically been deployed to CentOS but I'll use the collection to redeploy it.

@@ -42,7 +42,7 @@
pip:
# Pin psycopg2 until we upgrade to django 3.2 LTS
# https://github.com/ansible-community/ara/issues/320
name: psycopg2<2.9
name: psycopg2<3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This made me go down quite a rabbithole -- django is currently allowed to be up to 4.2 which is the latest LTS: https://github.com/ansible-community/ara/blob/8eda9c87086a289cf9bf41a2d4cc4060e2d50ad7/setup.cfg#L67-L69

I suppose we are past April 2024 so we could bump the version of django to 4.2 and figure out whether we can use psycopg3. I will not go down this hole just yet but I'll make sure <3 works.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be clear, we removed the pinning on psycopg2 in a separate patch here: 7dc61fe

I checked and the last version is currently 2.9.9:
image

Pinning it to <3 seems fair and it looks like a ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants