From 092be72ac1bec78936f314f26ad75e88eb576655 Mon Sep 17 00:00:00 2001 From: Samir Talwar Date: Wed, 7 Jun 2023 17:15:31 +0200 Subject: [PATCH] CI: Upgrade ci-util to use the latest Ubuntu and Docker patches. It's been a while. PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9440 GitOrigin-RevId: 15d3dabd23ae640ea1d6afeea2be9d59176c19e7 --- .../v2/test/test-upgrade-from-latest-release.sh | 8 ++++---- packaging/cli-migrations/v2/test/test.sh | 6 +++--- packaging/cli-migrations/v3/test/test.sh | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packaging/cli-migrations/v2/test/test-upgrade-from-latest-release.sh b/packaging/cli-migrations/v2/test/test-upgrade-from-latest-release.sh index 3cc90e19617..8904f0b165a 100755 --- a/packaging/cli-migrations/v2/test/test-upgrade-from-latest-release.sh +++ b/packaging/cli-migrations/v2/test/test-upgrade-from-latest-release.sh @@ -20,13 +20,13 @@ wait_for_server() { curl -L https://raw.githubusercontent.com/hasura/graphql-engine/stable/install-manifests/docker-compose/docker-compose.yaml -o docker-compose-latest.yaml sed -i '/hasura\/graphql-engine:/ s/$/.cli-migrations-v2\n container_name: graphql-engine/' docker-compose-latest.yaml # start postgres -docker-compose -f docker-compose-latest.yaml up --no-start graphql-engine +docker compose -f docker-compose-latest.yaml up --no-start graphql-engine # copy migrations directory to /hasura-migrations docker cp migrations/. graphql-engine:/hasura-migrations # copy metadata directory to /hasura-metadata docker cp metadata/. graphql-engine:/hasura-metadata # start graphql-engine -docker-compose -f docker-compose-latest.yaml up -d --no-recreate graphql-engine +docker compose -f docker-compose-latest.yaml up -d --no-recreate graphql-engine wait_for_server # export metadata and run diff with validation/metadata.json docker run --rm --network container:graphql-engine curlimages/curl -s -f -d'{"type" : "export_metadata", "args" : {} }' localhost:8080/v1/query | jq -j '.' | diff validation/metadata.json - @@ -34,11 +34,11 @@ docker run --rm --network container:graphql-engine curlimages/curl -s -f -d'{" docker run --rm --network container:graphql-engine curlimages/curl -s -f -d'{"type" : "run_sql", "args" : {"sql": "select * from hdb_catalog.schema_migrations"} }' localhost:8080/v1/query | jq -j '.' | diff validation/schema_migrations.json - # use the current build to start container -docker-compose up -d +docker compose up -d wait_for_server # export metadata and run diff with validation/metadata.json docker run --rm --network container:graphql-engine curlimages/curl -s -f -d'{"type" : "export_metadata", "args" : {} }' localhost:8080/v1/query | jq -j '.' | diff validation/metadata.json - # get list of migrations applied from graphql-engine server docker run --rm --network container:graphql-engine curlimages/curl -s -f -d'{"type" : "run_sql", "args" : {"sql": "select * from hdb_catalog.schema_migrations"} }' localhost:8080/v1/query | jq -j '.' | diff validation/schema_migrations.json - # delete postgres and graphql-engine -docker-compose down -v +docker compose down -v diff --git a/packaging/cli-migrations/v2/test/test.sh b/packaging/cli-migrations/v2/test/test.sh index e894fcbe043..69a9011e7ca 100755 --- a/packaging/cli-migrations/v2/test/test.sh +++ b/packaging/cli-migrations/v2/test/test.sh @@ -29,17 +29,17 @@ wait_for_server() { } # start postgres -docker-compose up --no-start graphql-engine +docker compose up --no-start graphql-engine # copy migrations directory to /hasura-migrations docker cp migrations/. graphql-engine:/hasura-migrations # copy metadata directory to /hasura-metadata docker cp metadata/. graphql-engine:/hasura-metadata # start graphql-engine -docker-compose up -d --no-recreate graphql-engine +docker compose up -d --no-recreate graphql-engine wait_for_server # export metadata and run diff with validation/metadata.json docker run --rm --network container:graphql-engine curlimages/curl -s -f -d'{"type" : "export_metadata", "args" : {} }' localhost:8080/v1/query | jq -j '.' | diff validation/metadata.json - # get list of migrations applied from graphql-engine server docker run --rm --network container:graphql-engine curlimages/curl -s -f -d'{"type" : "run_sql", "args" : {"sql": "select * from hdb_catalog.schema_migrations"} }' localhost:8080/v1/query | jq -j '.' | diff validation/schema_migrations.json - # delete postgres and graphql-engine -docker-compose down -v +docker compose down -v diff --git a/packaging/cli-migrations/v3/test/test.sh b/packaging/cli-migrations/v3/test/test.sh index f11a8486193..38376511f50 100755 --- a/packaging/cli-migrations/v3/test/test.sh +++ b/packaging/cli-migrations/v3/test/test.sh @@ -26,17 +26,17 @@ wait_for_server() { } # start postgres -docker-compose up --no-start graphql-engine +docker compose up --no-start graphql-engine # copy migrations directory to /hasura-migrations docker cp migrations/. graphql-engine:/hasura-migrations # copy metadata directory to /hasura-metadata docker cp metadata/. graphql-engine:/hasura-metadata # start graphql-engine -docker-compose up -d --no-recreate graphql-engine +docker compose up -d --no-recreate graphql-engine wait_for_server # export metadata and run diff with validation/metadata.json docker run --rm --network container:graphql-engine curlimages/curl -s -f -d'{"type" : "export_metadata", "args" : {} }' localhost:8080/v1/metadata | jq -j '.' | diff validation/metadata.json - # get list of migrations applied from graphql-engine server docker run --rm --network container:graphql-engine curlimages/curl -s -f -d'{"type" : "get_catalog_state", "args" : {} }' localhost:8080/v1/metadata | jq .cli_state | diff validation/catalog_cli_state.json - # delete postgres and graphql-engine -docker-compose down -v +docker compose down -v