From 36f61617975a37715749c4608e3fb74c47ffc63f Mon Sep 17 00:00:00 2001 From: Nizar Malangadan Date: Thu, 26 Sep 2019 15:41:08 +0530 Subject: [PATCH 1/5] Fix hpc combine error --- .circleci/config.yml | 4 ++-- .circleci/test-server.sh | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index dacb1ad8daec9..68ef55bfe28c0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -118,8 +118,8 @@ refs: - run: name: Run Python tests environment: - # hpc report seems to fail with the default -N - GHCRTS: -N1 + # circleci allocates 2 cpus per test container + GHCRTS: -N2 HASURA_GRAPHQL_DATABASE_URL: 'postgres://gql_test:@localhost:5432/gql_test' HASURA_GRAPHQL_DATABASE_URL_2: 'postgres://gql_test:@localhost:5432/gql_test2' GRAPHQL_ENGINE: '/build/_server_output/graphql-engine' diff --git a/.circleci/test-server.sh b/.circleci/test-server.sh index 870460d5e1d2b..a6723bac5b1ed 100755 --- a/.circleci/test-server.sh +++ b/.circleci/test-server.sh @@ -86,7 +86,11 @@ combine_all_hpc_reports() { continue fi if [ -f "$combined_file" ] ; then + # unsetting GHCRTS as hpc combine fails if GCHRTS=-N2 is present + GHCRTS_PREV="$GHCRTS" + unset GHCRTS (set -x && stack --allow-different-user exec -- hpc combine "$combined_file" "$tix_file" --union --output="$combined_file_intermediate" && set +x && mv "$combined_file_intermediate" "$combined_file" && rm "$tix_file" ) || true + export GHCRTS="$GHCRTS_PREV" else mv "$tix_file" "$combined_file" || true fi From db46cb000b74ed4b4a0822ff1cd0f7575940f803 Mon Sep 17 00:00:00 2001 From: Nizar Malangadan Date: Thu, 26 Sep 2019 15:56:28 +0530 Subject: [PATCH 2/5] Do not perform ciignore --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 68ef55bfe28c0..f84ca78bb2ba5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -150,7 +150,7 @@ jobs: - checkout - run: name: check build worthiness - command: .circleci/ciignore.sh + command: mkdir -p /build/ciignore - persist_to_workspace: root: /build paths: From 02affd0c6c88316aaf27ca99680955b653c0b45e Mon Sep 17 00:00:00 2001 From: Nizar Malangadan Date: Thu, 26 Sep 2019 16:47:18 +0530 Subject: [PATCH 3/5] xfail test jsonb_has_all --- server/tests-py/test_graphql_queries.py | 1 + 1 file changed, 1 insertion(+) diff --git a/server/tests-py/test_graphql_queries.py b/server/tests-py/test_graphql_queries.py index e9ebee2f97787..f38b063787c5c 100644 --- a/server/tests-py/test_graphql_queries.py +++ b/server/tests-py/test_graphql_queries.py @@ -263,6 +263,7 @@ def test_staff_passed_students(self, hge_ctx, transport): def test_user_query_auction(self, hge_ctx, transport): check_query_f(hge_ctx, self.dir() + '/user_query_auction.yaml', transport) + @pytest.mark.xfail(reason="Query caching") def test_jsonb_has_all(self, hge_ctx, transport): check_query_f(hge_ctx, self.dir() + '/jsonb_has_all.yaml', transport) From 9914719a8cacfd1c7c012a714e573fa3aa9f7732 Mon Sep 17 00:00:00 2001 From: Nizar Malangadan Date: Fri, 27 Sep 2019 16:10:48 +0530 Subject: [PATCH 4/5] Bring back ciignore --- .circleci/config.yml | 5 +++-- .circleci/test-server.sh | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f84ca78bb2ba5..43e3e5b451f5a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -118,7 +118,8 @@ refs: - run: name: Run Python tests environment: - # circleci allocates 2 cpus per test container + # Setting default number of threads to 2 + # since circleci allocates 2 cpus per test container GHCRTS: -N2 HASURA_GRAPHQL_DATABASE_URL: 'postgres://gql_test:@localhost:5432/gql_test' HASURA_GRAPHQL_DATABASE_URL_2: 'postgres://gql_test:@localhost:5432/gql_test2' @@ -150,7 +151,7 @@ jobs: - checkout - run: name: check build worthiness - command: mkdir -p /build/ciignore + command: .circleci/ciignore.sh - persist_to_workspace: root: /build paths: diff --git a/.circleci/test-server.sh b/.circleci/test-server.sh index a6723bac5b1ed..8679a7a2f9546 100755 --- a/.circleci/test-server.sh +++ b/.circleci/test-server.sh @@ -86,10 +86,11 @@ combine_all_hpc_reports() { continue fi if [ -f "$combined_file" ] ; then - # unsetting GHCRTS as hpc combine fails if GCHRTS=-N2 is present GHCRTS_PREV="$GHCRTS" + # Unsetting GHCRTS as hpc combine fails if GCHRTS=-N2 is present unset GHCRTS (set -x && stack --allow-different-user exec -- hpc combine "$combined_file" "$tix_file" --union --output="$combined_file_intermediate" && set +x && mv "$combined_file_intermediate" "$combined_file" && rm "$tix_file" ) || true + # Restoring GHCRTS export GHCRTS="$GHCRTS_PREV" else mv "$tix_file" "$combined_file" || true From ae74e9037c2dfc543890aeab362b4984daeb0e31 Mon Sep 17 00:00:00 2001 From: Nizar Malangadan Date: Mon, 30 Sep 2019 20:23:51 +0530 Subject: [PATCH 5/5] Refer jsonb_has_all xfaul to the corresponding issue in graphql-engine-internal --- server/tests-py/test_graphql_queries.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/tests-py/test_graphql_queries.py b/server/tests-py/test_graphql_queries.py index f38b063787c5c..b4defe4888b46 100644 --- a/server/tests-py/test_graphql_queries.py +++ b/server/tests-py/test_graphql_queries.py @@ -263,7 +263,7 @@ def test_staff_passed_students(self, hge_ctx, transport): def test_user_query_auction(self, hge_ctx, transport): check_query_f(hge_ctx, self.dir() + '/user_query_auction.yaml', transport) - @pytest.mark.xfail(reason="Query caching") + @pytest.mark.xfail(reason="Refer https://github.com/hasura/graphql-engine-internal/issues/252") def test_jsonb_has_all(self, hge_ctx, transport): check_query_f(hge_ctx, self.dir() + '/jsonb_has_all.yaml', transport)