Skip to content
This repository has been archived by the owner on Aug 4, 2023. It is now read-only.

Update to postgres 13 and apache-airflow 1.10.15 #54

Merged
merged 4 commits into from
Apr 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions src/cc_catalog_airflow/dags/util/popularity/test_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,9 @@ def test_constants_view_adds_values_and_constants(postgres_with_image_table):
("diff_provider", "comments", 0.8, 50.0, 50.0, 12.5),
("my_provider", "views", 0.5, 50.0, 50.0, 50.0),
]
assert (
sorted(list(postgres_with_image_table.cursor), key=lambda x: x[0])
== expect_rows
)
sorted_rows = sorted(list(postgres_with_image_table.cursor), key=lambda x: x[0])
for (expect_row, sorted_row) in zip(expect_rows, sorted_rows):
assert(expect_row == pytest.approx(sorted_row))


def test_constants_view_handles_zeros_and_missing(postgres_with_image_table):
Expand Down Expand Up @@ -350,10 +349,9 @@ def test_constants_view_handles_zeros_and_missing(postgres_with_image_table):
("diff_provider", "comments", 0.8, None, None, None),
("my_provider", "views", 0.8, 0.0, 1.0, 0.25),
]
assert (
sorted(list(postgres_with_image_table.cursor), key=lambda x: x[0])
== expect_rows
)
sorted_rows = sorted(list(postgres_with_image_table.cursor), key=lambda x: x[0])
for (expect_row, sorted_row) in zip(expect_rows, sorted_rows):
assert(expect_row == pytest.approx(sorted_row))


def test_standardized_popularity_function_calculates(
Expand Down
4 changes: 2 additions & 2 deletions src/cc_catalog_airflow/local_postgres/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM postgres:10.9
FROM postgres:13.2
ENV POSTGRES_USER=deploy
ENV POSTGRES_PASSWORD=deploy
ENV POSTGRES_DB=openledger
Expand All @@ -7,4 +7,4 @@ ADD ./openledger_old_image_schema.sql /docker-entrypoint-initdb.d
ADD ./openledger_image_view.sql /docker-entrypoint-initdb.d
ADD ./aws_s3_mock.sql /docker-entrypoint-initdb.d
ADD ./airflow_user_db.sql /docker-entrypoint-initdb.d
RUN apt-get -y update && apt-get -y install python3-boto3 postgresql-plpython3-10
RUN apt-get -y update && apt-get -y install python3-boto3 postgresql-plpython3-13
2 changes: 1 addition & 1 deletion src/cc_catalog_airflow/local_postgres/aws_s3_mock.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CREATE SCHEMA IF NOT EXISTS aws_s3;
CREATE LANGUAGE plpython3u;
CREATE EXTENSION plpython3u;

CREATE OR REPLACE FUNCTION aws_s3.table_import_from_s3 (
table_name text,
Expand Down
2 changes: 1 addition & 1 deletion src/cc_catalog_airflow/requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apache-airflow[aws,crypto,postgres]==1.10.9
apache-airflow[amazon,postgres]==1.10.15
dhruvkb marked this conversation as resolved.
Show resolved Hide resolved
lxml==4.4.2
python-dateutil==2.8.0
requests==2.22.0
Expand Down
10 changes: 5 additions & 5 deletions src/cc_catalog_airflow/requirements_prod.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
alembic==1.4.3
apache-airflow==1.10.9
apache-airflow==1.10.15
apispec==1.3.3
argcomplete==1.12.1
attrs==19.3.0
attrs==20.3.0
Babel==2.8.0
boto3==1.15.13
botocore==1.18.13
cached-property==1.5.2
cattrs==0.9.2
cattrs==1.5.0
certifi==2020.6.20
cffi==1.14.3
chardet==3.0.4
Expand Down Expand Up @@ -45,7 +45,7 @@ Jinja2==2.10.3
jmespath==0.10.0
json-merge-patch==0.2
jsonschema==3.2.0
lazy-object-proxy==1.5.1
lazy-object-proxy==1.4.3
lockfile==0.12.2
lxml==4.4.2
Mako==1.1.3
Expand All @@ -56,7 +56,7 @@ marshmallow-enum==1.5.1
marshmallow-sqlalchemy==0.23.1
natsort==7.0.1
numpy==1.19.2
pandas==0.25.3
pandas==1.2.4
pendulum==1.4.4
prison==0.1.3
psutil==5.7.2
Expand Down