HEPCloud / decisionengine

HEPCloud Decision Engine framework
Apache License 2.0
6 stars 25 forks source link

Update to pytest 7 with pytest-postgresql 5 #681

Closed jcpunk closed 12 months ago

jcpunk commented 1 year ago

I'm getting some local errors with :

FAILED src/decisionengine/framework/tests/test_start_with_bad_channels.py::test_client_can_get_products_no_channels[SQLALCHEMY_PG_WITH_SCHEMA] - StopIteration

and

caplog     = <_pytest.logging.LogCaptureFixture object at 0x7f627a07cfa0>
consumes_not_subset = "Channel test_missing_product could not be created: The following products are required but not produced:\n['B']"
deserver   = <DETestWorker(DETestWorker, started 140059755935296)>
error_msgs = ["Channel test_bad_publisher could not be created: \nThe following modules are missing '@consumes' declarations:\n\n -... in the configuration:\nCircular dependencies exist among these items: {a_uses_b:{'b_uses_a'}, b_uses_a:{'a_uses_b'}}"]
output     = 'No channels are currently active.'
when       = 'call'

But other sqlalchemy bits are passing locally

jcpunk commented 1 year ago

pytest-flake8 looks to be in process of being abandoned upstream...

jcpunk commented 1 year ago

Do the unit tests pass for you marco?

mambelli commented 12 months ago

Hi Pat, I will run the tests and let you know. Anyway your PR fixed the ability to write in the DB during the simple test. Do you know why the new sqlalchemy is giving errors? Should fix the code and update to sqlalchemy and pandas 2.x?

jcpunk commented 12 months ago

I believe we're compatible with sqlalchemy 2.x. And I'd love to get to sqlalchemy 2.x, but RHEL9 is shipping with a 1.4.x version and I'd prefer to reuse the system packages where we can.

Pandas 2.x has a lot going on, I'm not sure that is something we could easily migrate into.

I fear I don't understand the errors getting spit out. I think it has something to do with the consumer loop testing Kyle wrote, but I'm not sure.