Update to postgres 13 and apache-airflow 1.10.15 #54
Conversation
Fix 2 failing tests, remove pandas version to ensure that newer version is installed
Signed-off-by: Olga Bulat <obulat@gmail.com>
Btw @obulat you can un-draft PRs as a maintainer by clicking the "Ready for review" button just above the comment box. |
@obulat The test fixes are very appreciated. To you and @dhruvkb, since you have a bit more python experience than me: is ccsearch-catalog on postgres-13 [$] via 🐍 v2.7.16 on ☁️ (us-east-2)
❯ rg 'pandas' -l
src/cc_catalog_airflow/requirements_prod.txt
ccsearch-catalog on postgres-13 [$] via 🐍 v2.7.16 on ☁️ (us-east-2)
❯ rg 'pd\.' -l The only result is the requirements file. Any ideas? |
I had the same question :) So, on @dhruvkb 's recommendation, I ran |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have much knowledge of this repo but I checked it out and ran the tests. All 636 tests passed (albeit with 6 deprecation warnings) so it LGTM!
Signed-off-by: Olga Bulat <obulat@gmail.com>
Previously, I've seen a deprecation notice from airflow, something like I had several problems running the catalog:
Some of the errors in the postgres container
|
I also updated the Dockerfiles to use |
@obulat sure, updating the python images sounds fine then. For your other problem, I would suggest the following. Delete and manually recreate the This should create the db with the tables and views you would expect to see. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work all around. What a milestone!
This PR is based on top of #52 and #53 to fix build problems.
It updates Postgres version from 10 to 13. It also does the second step on the way of updating
apache-airflow
to version >2.0.0: updates the package to the bridge version 1.10.15.This updates makes the pandas workaround from #52 unnecessary: the new version of airflow doesn't require the old version of pandas that required Cython and numpy before installation.
The tests were failing due to an
==
comparison returning false for a difference of around 0.00000000001, so I addedpytest.approx
function to fix them.The log of the cc_catalog_airflow_postgres_1 container has this first line:
PostgreSQL Database directory appears to contain a database; Skipping initialization
I'm not sure if this is expected or not.
P.S. I couldn't checkout #53, probably because it's a draft PR (I get an error:
couldn't find remote ref pull/53/head
), so I created a new one.