fix(devops): Long branch names fail CI because GCP resource name is too long (#7643)

* shorten generate-checkpoints test ids

* shorten full-sync-to-tip test ids

* Applies suggestions from code review

* Fix missed search and replace

---------

Co-authored-by: teor <teor@riseup.net>
This commit is contained in:
Arya 2023-10-11 15:17:37 -04:00 committed by GitHub
parent fbd6b0f8b3
commit b70556e4b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 13 deletions

View File

@ -14,7 +14,7 @@ jobs:
- run: 'echo "No build required"' - run: 'echo "No build required"'
test-full-sync: test-full-sync:
name: Zebra tip / Run full-sync-to-tip test name: Zebra tip / Run full-sync test
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- run: 'echo "No build required"' - run: 'echo "No build required"'

View File

@ -93,8 +93,8 @@ jobs:
steps: steps:
- run: 'echo "No build required"' - run: 'echo "No build required"'
generate-checkpoints-mainnet: checkpoints-mainnet:
name: Generate checkpoints mainnet / Run generate-checkpoints-mainnet test name: Generate checkpoints mainnet / Run checkpoints-mainnet test
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- run: 'echo "No build required"' - run: 'echo "No build required"'

View File

@ -401,7 +401,7 @@ jobs:
if: ${{ github.event_name == 'schedule' || !fromJSON(needs.get-available-disks.outputs.zebra_tip_disk) || (github.event.inputs.run-full-sync == 'true' && (inputs.network || vars.ZCASH_NETWORK) == 'Mainnet') }} if: ${{ github.event_name == 'schedule' || !fromJSON(needs.get-available-disks.outputs.zebra_tip_disk) || (github.event.inputs.run-full-sync == 'true' && (inputs.network || vars.ZCASH_NETWORK) == 'Mainnet') }}
with: with:
app_name: zebrad app_name: zebrad
test_id: full-sync-to-tip test_id: full-sync
test_description: Test a full sync up to the tip test_description: Test a full sync up to the tip
# The value of FULL_SYNC_MAINNET_TIMEOUT_MINUTES is currently ignored. # The value of FULL_SYNC_MAINNET_TIMEOUT_MINUTES is currently ignored.
# TODO: update the test to use {{ input.network }} instead? # TODO: update the test to use {{ input.network }} instead?
@ -470,14 +470,14 @@ jobs:
# #
# If the state version has changed, waits for the new cached state to be created. # If the state version has changed, waits for the new cached state to be created.
# Otherwise, if the state rebuild was skipped, runs immediately after the build job. # Otherwise, if the state rebuild was skipped, runs immediately after the build job.
generate-checkpoints-mainnet: checkpoints-mainnet:
name: Generate checkpoints mainnet name: Generate checkpoints mainnet
needs: [ test-full-sync, get-available-disks ] needs: [ test-full-sync, get-available-disks ]
uses: ./.github/workflows/deploy-gcp-tests.yml uses: ./.github/workflows/deploy-gcp-tests.yml
if: ${{ !cancelled() && !failure() && (fromJSON(needs.get-available-disks.outputs.zebra_tip_disk) || needs.test-full-sync.result == 'success') && github.event.inputs.regenerate-disks != 'true' && github.event.inputs.run-full-sync != 'true' && github.event.inputs.run-lwd-sync != 'true' }} if: ${{ !cancelled() && !failure() && (fromJSON(needs.get-available-disks.outputs.zebra_tip_disk) || needs.test-full-sync.result == 'success') && github.event.inputs.regenerate-disks != 'true' && github.event.inputs.run-full-sync != 'true' && github.event.inputs.run-lwd-sync != 'true' }}
with: with:
app_name: zebrad app_name: zebrad
test_id: generate-checkpoints-mainnet test_id: checkpoints-mainnet
test_description: Generate Zebra checkpoints on mainnet test_description: Generate Zebra checkpoints on mainnet
# TODO: update the test to use {{ input.network }} instead? # TODO: update the test to use {{ input.network }} instead?
test_variables: '-e NETWORK=Mainnet -e GENERATE_CHECKPOINTS_MAINNET=1 -e ZEBRA_FORCE_USE_COLOR=1 -e ZEBRA_CACHED_STATE_DIR=/var/cache/zebrad-cache' test_variables: '-e NETWORK=Mainnet -e GENERATE_CHECKPOINTS_MAINNET=1 -e ZEBRA_FORCE_USE_COLOR=1 -e ZEBRA_CACHED_STATE_DIR=/var/cache/zebrad-cache'
@ -512,7 +512,7 @@ jobs:
if: ${{ (github.event_name == 'schedule' && vars.SCHEDULE_TESTNET_FULL_SYNC == 'true') || !fromJSON(needs.get-available-disks-testnet.outputs.zebra_tip_disk) || (github.event.inputs.run-full-sync == 'true' && (inputs.network || vars.ZCASH_NETWORK) == 'Testnet') }} if: ${{ (github.event_name == 'schedule' && vars.SCHEDULE_TESTNET_FULL_SYNC == 'true') || !fromJSON(needs.get-available-disks-testnet.outputs.zebra_tip_disk) || (github.event.inputs.run-full-sync == 'true' && (inputs.network || vars.ZCASH_NETWORK) == 'Testnet') }}
with: with:
app_name: zebrad app_name: zebrad
test_id: full-sync-to-tip-testnet test_id: full-sync-testnet
test_description: Test a full sync up to the tip on testnet test_description: Test a full sync up to the tip on testnet
# The value of FULL_SYNC_TESTNET_TIMEOUT_MINUTES is currently ignored. # The value of FULL_SYNC_TESTNET_TIMEOUT_MINUTES is currently ignored.
test_variables: '-e NETWORK=Testnet -e FULL_SYNC_TESTNET_TIMEOUT_MINUTES=0 -e ZEBRA_FORCE_USE_COLOR=1' test_variables: '-e NETWORK=Testnet -e FULL_SYNC_TESTNET_TIMEOUT_MINUTES=0 -e ZEBRA_FORCE_USE_COLOR=1'
@ -551,14 +551,14 @@ jobs:
# #
# If the state version has changed, waits for the new cached state to be created. # If the state version has changed, waits for the new cached state to be created.
# Otherwise, if the state rebuild was skipped, runs immediately after the build job. # Otherwise, if the state rebuild was skipped, runs immediately after the build job.
generate-checkpoints-testnet: checkpoints-testnet:
name: Generate checkpoints testnet name: Generate checkpoints testnet
needs: [ test-full-sync-testnet, get-available-disks-testnet ] needs: [ test-full-sync-testnet, get-available-disks-testnet ]
uses: ./.github/workflows/deploy-gcp-tests.yml uses: ./.github/workflows/deploy-gcp-tests.yml
if: ${{ !cancelled() && !failure() && (fromJSON(needs.get-available-disks-testnet.outputs.zebra_tip_disk) || needs.test-full-sync-testnet.result == 'success') && github.event.inputs.regenerate-disks != 'true' && github.event.inputs.run-full-sync != 'true' && github.event.inputs.run-lwd-sync != 'true' }} if: ${{ !cancelled() && !failure() && (fromJSON(needs.get-available-disks-testnet.outputs.zebra_tip_disk) || needs.test-full-sync-testnet.result == 'success') && github.event.inputs.regenerate-disks != 'true' && github.event.inputs.run-full-sync != 'true' && github.event.inputs.run-lwd-sync != 'true' }}
with: with:
app_name: zebrad app_name: zebrad
test_id: generate-checkpoints-testnet test_id: checkpoints-testnet
test_description: Generate Zebra checkpoints on testnet test_description: Generate Zebra checkpoints on testnet
test_variables: '-e NETWORK=Testnet -e GENERATE_CHECKPOINTS_TESTNET=1 -e ZEBRA_FORCE_USE_COLOR=1 -e ZEBRA_CACHED_STATE_DIR=/var/cache/zebrad-cache' test_variables: '-e NETWORK=Testnet -e GENERATE_CHECKPOINTS_TESTNET=1 -e ZEBRA_FORCE_USE_COLOR=1 -e ZEBRA_CACHED_STATE_DIR=/var/cache/zebrad-cache'
network: "Testnet" network: "Testnet"
@ -789,7 +789,7 @@ jobs:
# #
# This list is for reliable tests that are run on the `main` branch. # This list is for reliable tests that are run on the `main` branch.
# Testnet jobs are not in this list, because we expect testnet to fail occasionally. # Testnet jobs are not in this list, because we expect testnet to fail occasionally.
needs: [ regenerate-stateful-disks, test-full-sync, lightwalletd-full-sync, test-all, test-all-getblocktemplate-rpcs, test-fake-activation-heights, test-empty-sync, test-lightwalletd-integration, test-configuration-file, test-zebra-conf-path, test-stateful-sync, test-update-sync, generate-checkpoints-mainnet, lightwalletd-update-sync, lightwalletd-rpc-test, lightwalletd-transactions-test, lightwalletd-grpc-test, get-block-template-test, submit-block-test ] needs: [ regenerate-stateful-disks, test-full-sync, lightwalletd-full-sync, test-all, test-all-getblocktemplate-rpcs, test-fake-activation-heights, test-empty-sync, test-lightwalletd-integration, test-configuration-file, test-zebra-conf-path, test-stateful-sync, test-update-sync, checkpoints-mainnet, lightwalletd-update-sync, lightwalletd-rpc-test, lightwalletd-transactions-test, lightwalletd-grpc-test, get-block-template-test, submit-block-test ]
# Only open tickets for failed or cancelled jobs that are not coming from PRs. # Only open tickets for failed or cancelled jobs that are not coming from PRs.
# (PR statuses are already reported in the PR jobs list, and checked by Mergify.) # (PR statuses are already reported in the PR jobs list, and checked by Mergify.)
if: (failure() && github.event.pull_request == null) || (cancelled() && github.event.pull_request == null) if: (failure() && github.event.pull_request == null) || (cancelled() && github.event.pull_request == null)

View File

@ -24,11 +24,11 @@ To find the latest checkpoints on the `main` branch:
1. Find the [latest completed `CI Docker` workflow run on `main`](https://github.com/ZcashFoundation/zebra/actions/workflows/continous-integration-docker.yml?query=branch%3Amain). 1. Find the [latest completed `CI Docker` workflow run on `main`](https://github.com/ZcashFoundation/zebra/actions/workflows/continous-integration-docker.yml?query=branch%3Amain).
Due to GitHub UI issues, some runs will show as waiting, cancelled, or failed, Due to GitHub UI issues, some runs will show as waiting, cancelled, or failed,
but the checkpoints have still been generated. but the checkpoints have still been generated.
2. Go to the `Result of generate-checkpoints-mainnet` step in the 2. Go to the `Result of checkpoints-mainnet` step in the
`Run generate-checkpoints-mainnet` job, in the `Generate checkpoints mainnet` job `Run checkpoints-mainnet` job, in the `Generate checkpoints mainnet` job
3. Scroll down until you see the list of checkpoints, it should start around line 200 3. Scroll down until you see the list of checkpoints, it should start around line 200
4. Add those checkpoints to the end of `zebra-consensus/src/checkpoint/main-checkpoints.txt` 4. Add those checkpoints to the end of `zebra-consensus/src/checkpoint/main-checkpoints.txt`
5. Repeat steps 2 to 4 for `testnet` 5. Repeat steps 2 to 4 for `Generate checkpoints testnet`
6. Open a pull request at https://github.com/ZcashFoundation/zebra/pulls 6. Open a pull request at https://github.com/ZcashFoundation/zebra/pulls
#### Manual Checkpoint Generation #### Manual Checkpoint Generation