From 9c75638113d7dcfaeb0d2be423f0be87b5760950 Mon Sep 17 00:00:00 2001 From: Paul Sanders Date: Fri, 2 Sep 2022 15:18:29 -0400 Subject: [PATCH 1/7] Add files to .dockerignore --- .dockerignore | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.dockerignore b/.dockerignore index eccdd0595..7e038d232 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,8 @@ +# Docker files +Dockerfile +.dockerignore +docker/ + # Ignore existing build artifacts build/ dist/ @@ -38,7 +43,17 @@ clients/ops/admin-ui/node_modules clients/ops/admin-ui/.next clients/privacy-center/.next .DS_Store +fidesops.toml +scripts/ +noxfile.py +noxfiles/ # Ignore cypress artifacts videos/ screenshots/ + +# Fidesops files not needed in docker +CHANGELOG.md +CODE_OF_CONDUCT.md +CONTRIBUTING.md +LICENSE From 6beb00023969b0bcd3244596ca53ca9b78dfd718 Mon Sep 17 00:00:00 2001 From: Paul Sanders Date: Fri, 2 Sep 2022 15:45:52 -0400 Subject: [PATCH 2/7] Add config path to docker-compose --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index 3ba72451f..b1915f2c1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -26,6 +26,7 @@ services: - FIDESOPS__HOT_RELOAD=${FIDESOPS__HOT_RELOAD} - FIDESOPS__ROOT_USER__ANALYTICS_ID=${FIDESOPS__ROOT_USER__ANALYTICS_ID} - FIDESOPS__EXECUTION__WORKER_ENABLED=True + - FIDES__CONFIG_PATH=/fides db: image: postgres:12 From 5d055ff5681bdc3eda1e167f448bd0e41983a6b0 Mon Sep 17 00:00:00 2001 From: Paul Sanders Date: Fri, 2 Sep 2022 20:01:59 -0400 Subject: [PATCH 3/7] Mount volume for build check --- docker-compose.yml | 1 - noxfiles/ci_nox.py | 12 +++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index b1915f2c1..3ba72451f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -26,7 +26,6 @@ services: - FIDESOPS__HOT_RELOAD=${FIDESOPS__HOT_RELOAD} - FIDESOPS__ROOT_USER__ANALYTICS_ID=${FIDESOPS__ROOT_USER__ANALYTICS_ID} - FIDESOPS__EXECUTION__WORKER_ENABLED=True - - FIDES__CONFIG_PATH=/fides db: image: postgres:12 diff --git a/noxfiles/ci_nox.py b/noxfiles/ci_nox.py index ba5e02198..4c9287640 100644 --- a/noxfiles/ci_nox.py +++ b/noxfiles/ci_nox.py @@ -1,3 +1,5 @@ +from pathlib import Path + """Contains the nox sessions used during CI checks.""" import nox from constants_nox import ( @@ -104,7 +106,15 @@ def xenon(session: nox.Session) -> None: @nox.session() def check_install(session: nox.Session) -> None: """Check that fidesops is installed in the container.""" - session.run("docker", "run", IMAGE_LOCAL, "fidesops", external=True) + session.run( + "docker", + "run", + "-v", + f"{Path().absolute()}:/fidesops", + IMAGE_LOCAL, + "fidesops", + external=True, + ) @nox.session() From e44c2d6936fdb9c617b9f95d7ee004de2346664c Mon Sep 17 00:00:00 2001 From: Paul Sanders Date: Fri, 2 Sep 2022 20:07:51 -0400 Subject: [PATCH 4/7] Fix pylint error --- noxfiles/ci_nox.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/noxfiles/ci_nox.py b/noxfiles/ci_nox.py index 4c9287640..efe969d05 100644 --- a/noxfiles/ci_nox.py +++ b/noxfiles/ci_nox.py @@ -1,6 +1,7 @@ +"""Contains the nox sessions used during CI checks.""" + from pathlib import Path -"""Contains the nox sessions used during CI checks.""" import nox from constants_nox import ( CI_ARGS, From 09259bc5647f127487d8975dcd72d24ac07d1934 Mon Sep 17 00:00:00 2001 From: Paul Sanders Date: Fri, 2 Sep 2022 20:48:09 -0400 Subject: [PATCH 5/7] Update CHANGELOG --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88ab8483e..3ac0d3792 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,8 +21,9 @@ The types of changes are: ### Developer Experience -* Created a docker image for the privacy center [1165](https://github.com/ethyca/fidesops/pull/1165) -* Adds email scopes to postman collection [1241](https://github.com/ethyca/fidesops/pull/1241) +* Created a docker image for the privacy center [#1165](https://github.com/ethyca/fidesops/pull/1165) +* Adds email scopes to postman collection [#1241](https://github.com/ethyca/fidesops/pull/1241) +* Clean up docker build [#1252](https://github.com/ethyca/fidesops/pull/1252) ### Added From 88461640332975923c94f4a77e88e5b02fe564bf Mon Sep 17 00:00:00 2001 From: Paul Sanders Date: Tue, 6 Sep 2022 12:11:27 -0400 Subject: [PATCH 6/7] Fix failing external test --- tests/ops/integration_tests/saas/test_shopify_task.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/ops/integration_tests/saas/test_shopify_task.py b/tests/ops/integration_tests/saas/test_shopify_task.py index 4d980498c..70a99034a 100644 --- a/tests/ops/integration_tests/saas/test_shopify_task.py +++ b/tests/ops/integration_tests/saas/test_shopify_task.py @@ -18,7 +18,8 @@ def test_shopify_connection_test(shopify_connection_config) -> None: @pytest.mark.integration_saas @pytest.mark.integration_shopify -def test_shopify_access_request_task( +@pytest.mark.asyncio +async def test_shopify_access_request_task( db, policy, shopify_connection_config, @@ -37,7 +38,7 @@ def test_shopify_access_request_task( merged_graph = shopify_dataset_config.get_graph() graph = DatasetGraph(merged_graph) - v = graph_task.run_access_request( + v = await graph_task.run_access_request( privacy_request, policy, graph, From 29c97667fbaef4526c3f02c33f492d307535b883 Mon Sep 17 00:00:00 2001 From: Paul Sanders Date: Tue, 6 Sep 2022 13:59:36 -0400 Subject: [PATCH 7/7] Remove worker env var from docker-compose --- docker-compose.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 3ba72451f..820c50d6b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -25,7 +25,6 @@ services: - FIDESOPS__LOG_PII=${FIDESOPS__LOG_PII} - FIDESOPS__HOT_RELOAD=${FIDESOPS__HOT_RELOAD} - FIDESOPS__ROOT_USER__ANALYTICS_ID=${FIDESOPS__ROOT_USER__ANALYTICS_ID} - - FIDESOPS__EXECUTION__WORKER_ENABLED=True db: image: postgres:12