From 71f626ef2cde995927784d370451dd334a022069 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Tue, 30 May 2023 08:53:45 +0200 Subject: [PATCH 1/6] ci: Prune dangling images on RESTART_CI_DOCKER_BEFORE_RUN Github-Pull: #27777 Rebased-From: fa9c65a74cf18e9c75cd3472112d5197532ac2f2 --- ci/test/04_install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ci/test/04_install.sh b/ci/test/04_install.sh index 1024222e96a..fcf0bfd49e7 100755 --- a/ci/test/04_install.sh +++ b/ci/test/04_install.sh @@ -41,6 +41,8 @@ if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then if [ -n "${RESTART_CI_DOCKER_BEFORE_RUN}" ] ; then echo "Restart docker before run to stop and clear all containers started with --rm" systemctl restart docker + echo "Prune all dangling images" + docker image prune --force fi # shellcheck disable=SC2086 From de56daab4178460a0755d7e258862f3bba940c13 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Tue, 30 May 2023 10:29:01 +0200 Subject: [PATCH 2/6] ci: Use podman for persistent workers Github-Pull: #27777 Rebased-From: fa123077bc3f39aa0969d883e2d799a054cd4543 --- ci/test/04_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/test/04_install.sh b/ci/test/04_install.sh index fcf0bfd49e7..e1e4120b691 100755 --- a/ci/test/04_install.sh +++ b/ci/test/04_install.sh @@ -40,7 +40,7 @@ if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then if [ -n "${RESTART_CI_DOCKER_BEFORE_RUN}" ] ; then echo "Restart docker before run to stop and clear all containers started with --rm" - systemctl restart docker + podman container kill --all # Similar to "systemctl restart docker" echo "Prune all dangling images" docker image prune --force fi From 6f7a0ae58b843290ae2006dfd9aa1e8fd86053a5 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Fri, 9 Jun 2023 16:58:37 +0200 Subject: [PATCH 3/6] ci: Use podman stop over podman kill This should avoid a race where the kill is not done when spinning up the new container. podman stop waits 10 seconds by default. Github-Pull: #27844 Rebased-From: faaa62754e84417baa917f20db379db78146687d --- ci/test/04_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/test/04_install.sh b/ci/test/04_install.sh index e1e4120b691..9237ea443b2 100755 --- a/ci/test/04_install.sh +++ b/ci/test/04_install.sh @@ -40,7 +40,7 @@ if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then if [ -n "${RESTART_CI_DOCKER_BEFORE_RUN}" ] ; then echo "Restart docker before run to stop and clear all containers started with --rm" - podman container kill --all # Similar to "systemctl restart docker" + podman container stop --all # Similar to "systemctl restart docker" echo "Prune all dangling images" docker image prune --force fi From 72ead8699fadee4019d324763c05742b7d8880a9 Mon Sep 17 00:00:00 2001 From: brunoerg Date: Sat, 10 Jun 2023 23:26:24 -0300 Subject: [PATCH 4/6] rest: bugfix, fix crash error when calling `/deploymentinfo` Github-Pull: #27853 Rebased-From: ce887eaf4917c337b21aa2e7811804ce003d36be --- src/rest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rest.cpp b/src/rest.cpp index e46406f1ade..feb4ad70832 100644 --- a/src/rest.cpp +++ b/src/rest.cpp @@ -628,7 +628,7 @@ static bool rest_deploymentinfo(const std::any& context, HTTPRequest* req, const return RESTERR(req, HTTP_BAD_REQUEST, "Block not found"); } - jsonRequest.params.pushKV("blockhash", hash_str); + jsonRequest.params.push_back(hash_str); } req->WriteHeader("Content-Type", "application/json"); From d845a3ed2186528c382639e79fe8c61dff8f4723 Mon Sep 17 00:00:00 2001 From: brunoerg Date: Sat, 10 Jun 2023 23:26:58 -0300 Subject: [PATCH 5/6] test: add coverage for `/deploymentinfo` passing a blockhash Github-Pull: #27853 Rebased-From: 7d452d826a7056411077b870efc3872bb2fa45e4 --- test/functional/interface_rest.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/functional/interface_rest.py b/test/functional/interface_rest.py index 5017f77d18e..3ab7c0928ef 100755 --- a/test/functional/interface_rest.py +++ b/test/functional/interface_rest.py @@ -421,6 +421,10 @@ class RESTTest (BitcoinTestFramework): deployment_info = self.nodes[0].getdeploymentinfo() assert_equal(deployment_info, self.test_rest_request('/deploymentinfo')) + previous_bb_hash = self.nodes[0].getblockhash(self.nodes[0].getblockcount() - 1) + deployment_info = self.nodes[0].getdeploymentinfo(previous_bb_hash) + assert_equal(deployment_info, self.test_rest_request(f"/deploymentinfo/{previous_bb_hash}")) + non_existing_blockhash = '42759cde25462784395a337460bde75f58e73d3f08bd31fdc3507cbac856a2c4' resp = self.test_rest_request(f'/deploymentinfo/{non_existing_blockhash}', ret_type=RetType.OBJ, status=400) assert_equal(resp.read().decode('utf-8').rstrip(), "Block not found") From 6233049709f339ad4e01860872ecb6174006f5be Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Wed, 14 Jun 2023 13:32:22 +0100 Subject: [PATCH 6/6] ci: Switch to `amd64` container in "ARM" task Tee `arm_container` does not support 32-bit mode anymore. See: https://github.com/bitcoin/bitcoin/issues/27879 Github-Pull: #27886 Rebased-From: 016fe6d8280768917081894dfca233c2f06e78d9 --- .cirrus.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 680024d155c..21b5d0a0265 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -193,15 +193,13 @@ task: task: name: 'ARM [unit tests, no functional tests] [bullseye]' << : *GLOBAL_TASK_TEMPLATE - arm_container: - image: debian:bullseye - cpu: 2 - memory: 8G - # docker_arguments: # Can use dockerfile after https://github.com/cirruslabs/cirrus-ci-docs/issues/1154 + container: + docker_arguments: + CI_IMAGE_NAME_TAG: debian:bullseye + FILE_ENV: "./ci/test/00_setup_env_arm.sh" + << : *CREDITS_TEMPLATE env: << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV - FILE_ENV: "./ci/test/00_setup_env_arm.sh" - QEMU_USER_CMD: "" # Disable qemu and run the test natively task: name: 'Win64 [unit tests, no gui tests, no boost::process, no functional tests] [jammy]'