fix(ci): mount the lwd-cache dir to the `lightwalletd-full-sync` (#4486)
* fix(ci): allow for the lightwalletd-full-sync to mount the lwd-cache dir * fix(ci): compare with a string * imp(ci): run a lightwalletd tip if there's no lwd tip disk available * docs(ci): add TODO explaining this is a temporal condition
This commit is contained in:
parent
97b9911c7d
commit
abef3842ce
|
@ -372,9 +372,13 @@ jobs:
|
||||||
# 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.
|
||||||
lightwalletd-full-sync:
|
lightwalletd-full-sync:
|
||||||
name: lightwalletd tip
|
name: lightwalletd tip
|
||||||
needs: test-full-sync
|
needs: [ test-full-sync, get-available-disks ]
|
||||||
uses: ./.github/workflows/deploy-gcp-tests.yml
|
uses: ./.github/workflows/deploy-gcp-tests.yml
|
||||||
if: ${{ !cancelled() && !failure() && github.event.inputs.regenerate-disks != 'true' && github.event.inputs.run-full-sync != 'true' }}
|
# to also run on Mergify head branches,
|
||||||
|
# add `|| (github.event_name == 'push' && startsWith(github.head_ref, 'mergify/merge-queue/'))`:
|
||||||
|
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-your-workflow-based-on-the-head-or-base-branch-of-a-pull-request-1
|
||||||
|
# TODO: this test is unreliable, in the meanwhile we'll only generate a new lwd cached state when a full sync is also triggered
|
||||||
|
if: ${{ (!cancelled() && !failure() && github.event.inputs.regenerate-disks != 'true' && github.event.inputs.run-full-sync != 'true') || !fromJSON(needs.get-available-disks.outputs.lwd_tip_disk) }}
|
||||||
with:
|
with:
|
||||||
app_name: lightwalletd
|
app_name: lightwalletd
|
||||||
test_id: lwd-full-sync
|
test_id: lwd-full-sync
|
||||||
|
|
|
@ -297,7 +297,10 @@ jobs:
|
||||||
- name: Run ${{ inputs.test_id }} test
|
- name: Run ${{ inputs.test_id }} test
|
||||||
# This step mounts the volume only when a single cached state is needed, in this case
|
# This step mounts the volume only when a single cached state is needed, in this case
|
||||||
# the cached state from Zebra.
|
# the cached state from Zebra.
|
||||||
if: ${{ inputs.needs_zebra_state && !inputs.needs_lwd_state }}
|
# lightwalletd-full-sync test is an exception to this rule, as it does not need a lwd cached state,
|
||||||
|
# but it does saves a lwd cached state
|
||||||
|
# TODO: we should find a better logic for this use cases
|
||||||
|
if: ${{ (inputs.needs_zebra_state && !inputs.needs_lwd_state) && inputs.test_id != 'lwd-full-sync' }}
|
||||||
run: |
|
run: |
|
||||||
gcloud compute ssh \
|
gcloud compute ssh \
|
||||||
${{ inputs.test_id }}-${{ env.GITHUB_REF_SLUG_URL }}-${{ env.GITHUB_SHA_SHORT }} \
|
${{ inputs.test_id }}-${{ env.GITHUB_REF_SLUG_URL }}-${{ env.GITHUB_SHA_SHORT }} \
|
||||||
|
@ -340,7 +343,10 @@ jobs:
|
||||||
- name: Run ${{ inputs.test_id }} test
|
- name: Run ${{ inputs.test_id }} test
|
||||||
# This step mounts the volume only when both cached states are needed, in this case
|
# This step mounts the volume only when both cached states are needed, in this case
|
||||||
# the cached state from Zebra and Lightwalletd
|
# the cached state from Zebra and Lightwalletd
|
||||||
if: ${{ inputs.needs_zebra_state && inputs.needs_lwd_state }}
|
# lightwalletd-full-sync test is an exception to this rule, as it does not need a lwd cached state,
|
||||||
|
# but it does saves a lwd cached state
|
||||||
|
# TODO: we should find a better logic for this use cases
|
||||||
|
if: ${{ (inputs.needs_zebra_state && inputs.needs_lwd_state) || inputs.test_id == 'lwd-full-sync' }}
|
||||||
run: |
|
run: |
|
||||||
gcloud compute ssh \
|
gcloud compute ssh \
|
||||||
${{ inputs.test_id }}-${{ env.GITHUB_REF_SLUG_URL }}-${{ env.GITHUB_SHA_SHORT }} \
|
${{ inputs.test_id }}-${{ env.GITHUB_REF_SLUG_URL }}-${{ env.GITHUB_SHA_SHORT }} \
|
||||||
|
|
Loading…
Reference in New Issue