From e2d8f326193fa7981ad4a8651c088a6434c81f14 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Nov 2022 20:36:07 +0000 Subject: [PATCH 1/4] build(deps): bump num_cpus from 1.13.1 to 1.14.0 (#5566) Bumps [num_cpus](https://github.com/seanmonstar/num_cpus) from 1.13.1 to 1.14.0. - [Release notes](https://github.com/seanmonstar/num_cpus/releases) - [Changelog](https://github.com/seanmonstar/num_cpus/blob/master/CHANGELOG.md) - [Commits](https://github.com/seanmonstar/num_cpus/compare/v1.13.1...v1.14.0) --- updated-dependencies: - dependency-name: num_cpus dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 4 ++-- zebra-rpc/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7b590c34e5f..13af852a600 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2509,9 +2509,9 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.13.1" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" +checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" dependencies = [ "hermit-abi", "libc", diff --git a/zebra-rpc/Cargo.toml b/zebra-rpc/Cargo.toml index b85f41dfe1e..5f80acd4802 100644 --- a/zebra-rpc/Cargo.toml +++ b/zebra-rpc/Cargo.toml @@ -24,7 +24,7 @@ hyper = { version = "0.14.22", features = ["http1", "server"] } jsonrpc-core = "18.0.0" jsonrpc-derive = "18.0.0" jsonrpc-http-server = "18.0.0" -num_cpus = "1.13.1" +num_cpus = "1.14.0" # zebra-rpc needs the preserve_order feature in serde_json, which is a dependency of jsonrpc-core serde_json = { version = "1.0.87", features = ["preserve_order"] } From f94231fe34728424efe297e7b851e580e8462640 Mon Sep 17 00:00:00 2001 From: teor Date: Tue, 8 Nov 2022 08:29:37 +1000 Subject: [PATCH 2/4] fix(ci): Stop using multiple jobs for quick Google Cloud tests (#5560) * Only run multiple test jobs if they are needed for a long test * Remove unused job steps * Remove trailing whitespace * Follow logs in the Run step Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- .../continous-integration-docker.yml | 12 +- .github/workflows/deploy-gcp-tests.yml | 168 +++--------------- 2 files changed, 36 insertions(+), 144 deletions(-) diff --git a/.github/workflows/continous-integration-docker.yml b/.github/workflows/continous-integration-docker.yml index 370fbaaf939..cbf8fbfad2f 100644 --- a/.github/workflows/continous-integration-docker.yml +++ b/.github/workflows/continous-integration-docker.yml @@ -332,7 +332,7 @@ jobs: # because we might never get a finished sync. # # See the concurrency comment on the zebrad test-full-sync job for details. - concurrency: + concurrency: group: ${{ github.workflow }}−${{ github.ref }}-regenerate-stateful-disks cancel-in-progress: false @@ -378,6 +378,8 @@ jobs: test_id: full-sync-to-tip test_description: Test a full sync up to the tip test_variables: '-e TEST_FULL_SYNC=1 -e ZEBRA_FORCE_USE_COLOR=1 -e FULL_SYNC_MAINNET_TIMEOUT_MINUTES=600' + # This test runs for longer than 6 hours, so it needs multiple jobs + is_long_test: true needs_zebra_state: false saves_to_disk: true disk_suffix: tip @@ -385,7 +387,7 @@ jobs: # We want to prevent multiple full zebrad syncs running at the same time, # but we don't want to cancel running syncs on `main` if a new PR gets merged, # because we might never get a finished sync. - # + # # Instead, we let the first sync complete, then queue the latest pending sync, cancelling any syncs in between. # (As the general workflow concurrency group just gets matched in Pull Requests, # it has no impact on this job.) @@ -393,7 +395,7 @@ jobs: # TODO: # - allow multiple manual syncs on a branch, and isolate manual syncs from automatic syncs, by adding '-${{ github.run_id }}' when github.event.inputs.run-full-sync is true # - stop multiple automatic full syncs across different PRs by removing '−${{ github.ref }}' when needs.get-available-disks.outputs.zebra_tip_disk is true - concurrency: + concurrency: group: ${{ github.workflow }}−${{ github.ref }}-test-full-sync cancel-in-progress: false @@ -460,7 +462,7 @@ jobs: # because we might never get a finished sync. # # See the concurrency comment on the zebrad test-full-sync job for details. - concurrency: + concurrency: group: ${{ github.workflow }}−${{ github.ref }}-lightwalletd-full-sync cancel-in-progress: false @@ -546,7 +548,7 @@ jobs: # because we might never get a finished test. # # See the concurrency comment on the zebrad test-full-sync job for details. - concurrency: + concurrency: group: ${{ github.workflow }}−${{ github.ref }}-lightwalletd-transactions-test cancel-in-progress: false diff --git a/.github/workflows/deploy-gcp-tests.yml b/.github/workflows/deploy-gcp-tests.yml index 73aaa5022c2..02f5bf987a9 100644 --- a/.github/workflows/deploy-gcp-tests.yml +++ b/.github/workflows/deploy-gcp-tests.yml @@ -12,6 +12,11 @@ on: required: true type: string description: 'Explains what the test does' + height_grep_text: + required: false + type: string + description: 'Regular expression to find the tip height in test logs, and add it to newly created cached state image metadata' + # Test selection and parameters test_variables: required: true @@ -22,6 +27,12 @@ on: type: string default: Mainnet description: 'Zcash network to test against' + is_long_test: + required: false + type: boolean + default: false + description: 'Does this test need multiple run jobs? (Does it run longer than 6 hours?)' + # Cached state # # TODO: find a better name @@ -69,11 +80,6 @@ on: required: true type: boolean description: 'Does the test create a new cached state disk?' - # Metadata - height_grep_text: - required: false - type: string - description: 'Regular expression to find the tip height in test logs, and add it to newly created cached state image metadata' app_name: required: false type: string @@ -119,11 +125,6 @@ jobs: with: short-length: 7 - - name: Downcase network name for disks - run: | - NETWORK_CAPS=${{ inputs.network }} - echo "NETWORK=${NETWORK_CAPS,,}" >> $GITHUB_ENV - # Setup gcloud CLI - name: Authenticate to Google Cloud id: auth @@ -193,11 +194,6 @@ jobs: with: short-length: 7 - - name: Downcase network name for disks - run: | - NETWORK_CAPS=${{ inputs.network }} - echo "NETWORK=${NETWORK_CAPS,,}" >> $GITHUB_ENV - # Setup gcloud CLI - name: Authenticate to Google Cloud id: auth @@ -415,11 +411,6 @@ jobs: with: short-length: 7 - - name: Downcase network name for disks - run: | - NETWORK_CAPS=${{ inputs.network }} - echo "NETWORK=${NETWORK_CAPS,,}" >> $GITHUB_ENV - # Setup gcloud CLI - name: Authenticate to Google Cloud id: auth @@ -524,12 +515,14 @@ jobs: # follow the logs of the test we just launched, up to Sapling activation (or the test finishing) + # + # If `inputs.is_long_test` is `false`, this job is skipped. logs-sprout: name: Log ${{ inputs.test_id }} test (sprout) # We run exactly one of without-cached-state or with-cached-state, and we always skip the other one. needs: [ launch-with-cached-state, launch-without-cached-state ] # If the previous job fails, we still want to show the logs. - if: ${{ !cancelled() }} + if: ${{ !cancelled() && inputs.is_long_test }} runs-on: ubuntu-latest permissions: contents: 'read' @@ -545,11 +538,6 @@ jobs: with: short-length: 7 - - name: Downcase network name for disks - run: | - NETWORK_CAPS=${{ inputs.network }} - echo "NETWORK=${NETWORK_CAPS,,}" >> $GITHUB_ENV - # Setup gcloud CLI - name: Authenticate to Google Cloud id: auth @@ -598,7 +586,7 @@ jobs: name: Log ${{ inputs.test_id }} test (heartwood) needs: [ logs-sprout ] # If the previous job fails, we still want to show the logs. - if: ${{ !cancelled() }} + if: ${{ !cancelled() && inputs.is_long_test }} runs-on: ubuntu-latest permissions: contents: 'read' @@ -614,11 +602,6 @@ jobs: with: short-length: 7 - - name: Downcase network name for disks - run: | - NETWORK_CAPS=${{ inputs.network }} - echo "NETWORK=${NETWORK_CAPS,,}" >> $GITHUB_ENV - # Setup gcloud CLI - name: Authenticate to Google Cloud id: auth @@ -657,7 +640,7 @@ jobs: name: Log ${{ inputs.test_id }} test (canopy) needs: [ logs-heartwood ] # If the previous job fails, we still want to show the logs. - if: ${{ !cancelled() }} + if: ${{ !cancelled() && inputs.is_long_test }} runs-on: ubuntu-latest permissions: contents: 'read' @@ -673,11 +656,6 @@ jobs: with: short-length: 7 - - name: Downcase network name for disks - run: | - NETWORK_CAPS=${{ inputs.network }} - echo "NETWORK=${NETWORK_CAPS,,}" >> $GITHUB_ENV - # Setup gcloud CLI - name: Authenticate to Google Cloud id: auth @@ -718,7 +696,7 @@ jobs: name: Log ${{ inputs.test_id }} test (1740k) needs: [ logs-canopy ] # If the previous job fails, we still want to show the logs. - if: ${{ !cancelled() }} + if: ${{ !cancelled() && inputs.is_long_test }} runs-on: ubuntu-latest permissions: contents: 'read' @@ -734,11 +712,6 @@ jobs: with: short-length: 7 - - name: Downcase network name for disks - run: | - NETWORK_CAPS=${{ inputs.network }} - echo "NETWORK=${NETWORK_CAPS,,}" >> $GITHUB_ENV - # Setup gcloud CLI - name: Authenticate to Google Cloud id: auth @@ -781,7 +754,7 @@ jobs: name: Log ${{ inputs.test_id }} test (1760k) needs: [ logs-1740k ] # If the previous job fails, we still want to show the logs. - if: ${{ !cancelled() }} + if: ${{ !cancelled() && inputs.is_long_test }} runs-on: ubuntu-latest permissions: contents: 'read' @@ -797,11 +770,6 @@ jobs: with: short-length: 7 - - name: Downcase network name for disks - run: | - NETWORK_CAPS=${{ inputs.network }} - echo "NETWORK=${NETWORK_CAPS,,}" >> $GITHUB_ENV - # Setup gcloud CLI - name: Authenticate to Google Cloud id: auth @@ -844,7 +812,7 @@ jobs: name: Log ${{ inputs.test_id }} test (1780k) needs: [ logs-1760k ] # If the previous job fails, we still want to show the logs. - if: ${{ !cancelled() }} + if: ${{ !cancelled() && inputs.is_long_test }} runs-on: ubuntu-latest permissions: contents: 'read' @@ -860,11 +828,6 @@ jobs: with: short-length: 7 - - name: Downcase network name for disks - run: | - NETWORK_CAPS=${{ inputs.network }} - echo "NETWORK=${NETWORK_CAPS,,}" >> $GITHUB_ENV - # Setup gcloud CLI - name: Authenticate to Google Cloud id: auth @@ -908,7 +871,7 @@ jobs: name: Log ${{ inputs.test_id }} test (1800k) needs: [ logs-1780k ] # If the previous job fails, we still want to show the logs. - if: ${{ !cancelled() }} + if: ${{ !cancelled() && inputs.is_long_test }} runs-on: ubuntu-latest permissions: contents: 'read' @@ -924,11 +887,6 @@ jobs: with: short-length: 7 - - name: Downcase network name for disks - run: | - NETWORK_CAPS=${{ inputs.network }} - echo "NETWORK=${NETWORK_CAPS,,}" >> $GITHUB_ENV - # Setup gcloud CLI - name: Authenticate to Google Cloud id: auth @@ -971,7 +929,7 @@ jobs: name: Log ${{ inputs.test_id }} test (1820k) needs: [ logs-1800k ] # If the previous job fails, we still want to show the logs. - if: ${{ !cancelled() }} + if: ${{ !cancelled() && inputs.is_long_test }} runs-on: ubuntu-latest permissions: contents: 'read' @@ -987,11 +945,6 @@ jobs: with: short-length: 7 - - name: Downcase network name for disks - run: | - NETWORK_CAPS=${{ inputs.network }} - echo "NETWORK=${NETWORK_CAPS,,}" >> $GITHUB_ENV - # Setup gcloud CLI - name: Authenticate to Google Cloud id: auth @@ -1031,7 +984,7 @@ jobs: name: Log ${{ inputs.test_id }} test (checkpoint) needs: [ logs-1820k ] # If the previous job fails, we still want to show the logs. - if: ${{ !cancelled() }} + if: ${{ !cancelled() && inputs.is_long_test }} runs-on: ubuntu-latest permissions: contents: 'read' @@ -1047,11 +1000,6 @@ jobs: with: short-length: 7 - - name: Downcase network name for disks - run: | - NETWORK_CAPS=${{ inputs.network }} - echo "NETWORK=${NETWORK_CAPS,,}" >> $GITHUB_ENV - # Setup gcloud CLI - name: Authenticate to Google Cloud id: auth @@ -1086,69 +1034,15 @@ jobs: -e 'test result:.*finished in' \ " - # follow the logs of the test we just launched, until it finishes - logs-end: - name: Log ${{ inputs.test_id }} test (end) - needs: [ logs-checkpoint ] - # If the previous job fails, we still want to show the logs. - if: ${{ !cancelled() }} - runs-on: ubuntu-latest - permissions: - contents: 'read' - id-token: 'write' - steps: - - uses: actions/checkout@v3.1.0 - with: - persist-credentials: false - fetch-depth: '2' - - - name: Inject slug/short variables - uses: rlespinasse/github-slug-action@v4 - with: - short-length: 7 - - - name: Downcase network name for disks - run: | - NETWORK_CAPS=${{ inputs.network }} - echo "NETWORK=${NETWORK_CAPS,,}" >> $GITHUB_ENV - # Setup gcloud CLI - - name: Authenticate to Google Cloud - id: auth - uses: google-github-actions/auth@v0.8.3 - with: - retries: '3' - workload_identity_provider: 'projects/143793276228/locations/global/workloadIdentityPools/github-actions/providers/github-oidc' - service_account: 'github-service-account@zealous-zebra.iam.gserviceaccount.com' - token_format: 'access_token' - - # Show recent logs, following until the test finishes - - name: Show logs for ${{ inputs.test_id }} test (end) - run: | - gcloud compute ssh \ - github-service-account@${{ inputs.test_id }}-${{ env.GITHUB_REF_SLUG_URL }}-${{ env.GITHUB_SHA_SHORT }} \ - --zone ${{ env.ZONE }} \ - --quiet \ - --ssh-flag="-o ServerAliveInterval=5" \ - --ssh-flag="-o ConnectionAttempts=20" \ - --ssh-flag="-o ConnectTimeout=5" \ - --command \ - "\ - sudo docker logs \ - --tail ${{ env.EXTRA_LOG_LINES }} \ - --follow \ - ${{ inputs.test_id }} | \ - tee --output-error=exit /dev/stderr | \ - grep --max-count=1 --extended-regexp --color=always \ - 'test result:.*finished in' \ - " - - - # check the results of the test, and show all of the test logs + # Show all the test logs, then follow the logs of the test we just launched, until it finishes. + # Then check the result of the test. + # + # If `inputs.is_long_test` is `false`, the Rust test harness mostly runs in this job. + # Otherwise, it mostly runs in the "logs" jobs. test-result: - # TODO: update the job name here, and in the branch protection rules name: Run ${{ inputs.test_id }} test - needs: [ logs-end ] + needs: [ logs-checkpoint ] # If the previous job fails, we also want to run and fail this job, # so that the branch protection rule fails in Mergify and GitHub. if: ${{ !cancelled() }} @@ -1167,11 +1061,6 @@ jobs: with: short-length: 7 - - name: Downcase network name for disks - run: | - NETWORK_CAPS=${{ inputs.network }} - echo "NETWORK=${NETWORK_CAPS,,}" >> $GITHUB_ENV - # Setup gcloud CLI - name: Authenticate to Google Cloud id: auth @@ -1205,6 +1094,7 @@ jobs: set -e; sudo docker logs \ --tail all \ + --follow \ ${{ inputs.test_id }} | \ tee --output-error=exit /dev/stderr | \ grep --max-count=1 --extended-regexp --color=always \ From 3a412c065f4bee4fbeb38cfbf11e37187bef9d03 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Nov 2022 22:29:49 +0000 Subject: [PATCH 3/4] build(deps): bump prost from 0.11.0 to 0.11.2 (#5564) Bumps [prost](https://github.com/tokio-rs/prost) from 0.11.0 to 0.11.2. - [Release notes](https://github.com/tokio-rs/prost/releases) - [Commits](https://github.com/tokio-rs/prost/compare/v0.11.0...v0.11.2) --- updated-dependencies: - dependency-name: prost dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 4 ++-- zebrad/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 13af852a600..eda708eae17 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3065,9 +3065,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.11.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "399c3c31cdec40583bb68f0b18403400d01ec4289c383aa047560439952c4dd7" +checksum = "a0841812012b2d4a6145fae9a6af1534873c32aa67fff26bd09f8fa42c83f95a" dependencies = [ "bytes", "prost-derive", diff --git a/zebrad/Cargo.toml b/zebrad/Cargo.toml index 57a61da6c31..c3f78d5d3eb 100644 --- a/zebrad/Cargo.toml +++ b/zebrad/Cargo.toml @@ -173,7 +173,7 @@ tokio = { version = "1.21.2", features = ["full", "tracing", "test-util"] } tokio-stream = "0.1.11" # test feature lightwalletd-grpc-tests -prost = "0.11.0" +prost = "0.11.2" tonic = "0.8.0" proptest = "0.10.1" From f77d7503d72e54301d230bcd01cd5fd7955f000f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Nov 2022 23:32:47 +0000 Subject: [PATCH 4/4] build(deps): bump tj-actions/changed-files from 34.0.3 to 34.3.1 (#5563) Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 34.0.3 to 34.3.1. - [Release notes](https://github.com/tj-actions/changed-files/releases) - [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md) - [Commits](https://github.com/tj-actions/changed-files/compare/v34.0.3...v34.3.1) --- updated-dependencies: - dependency-name: tj-actions/changed-files dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/lint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9ce9ca87e55..89e521d6aa7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -37,7 +37,7 @@ jobs: - name: Rust files id: changed-files-rust - uses: tj-actions/changed-files@v34.0.3 + uses: tj-actions/changed-files@v34.3.1 with: files: | **/*.rs @@ -49,7 +49,7 @@ jobs: - name: Workflow files id: changed-files-workflows - uses: tj-actions/changed-files@v34.0.3 + uses: tj-actions/changed-files@v34.3.1 with: files: | .github/workflows/*.yml