Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions .github/workflows/e2e-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,17 +136,19 @@ jobs:
BACKEND: regtest

steps:
- name: Show selected E2E branch
env:
E2E_BRANCH: ${{ needs.e2e-branch.outputs.branch }}
run: echo $E2E_BRANCH
- name: Resolve E2E tests ref
id: e2e-ref
uses: synonymdev/bitkit-e2e-tests/.github/actions/resolve-e2e-ref@main
with:
selected: ${{ needs.e2e-branch.outputs.branch }}
e2e_branch_input: ${{ github.event.inputs.e2e_branch || 'default-feature-branch' }}

- name: Clone E2E tests
uses: actions/checkout@v7
with:
repository: synonymdev/bitkit-e2e-tests
path: bitkit-e2e-tests
ref: ${{ needs.e2e-branch.outputs.branch }}
ref: ${{ steps.e2e-ref.outputs.ref }}

- name: Download iOS app (regtest)
uses: actions/download-artifact@v8
Expand Down Expand Up @@ -262,11 +264,18 @@ jobs:
needs: [build-staging, e2e-branch, e2e-tests-staging]

steps:
- name: Resolve E2E tests ref

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One failed lookup here drops the nightly Slack summary. This applies once synonymdev/bitkit-e2e-tests#254 lands.

slack-report runs under always(). After #254, the resolver exits 1 on any git ls-remote status other than 2. A single DNS, auth or 5xx blip in this reporting job therefore fails this step. Checkout E2E tests and Post Slack summary have no if: always(), so both are skipped and nothing is posted, including on nights when shards failed. Before this PR the job depended only on actions/checkout, which retries its fetch.

E2E_TESTS_REF also becomes this job's own re-resolution, not the ref the shards ran on. It diverges if the companion branch is deleted between the shards and the report.

Fix: set continue-on-error: true on this step and use ref: ${{ steps.e2e-ref.outputs.ref || 'main' }}, or keep needs.e2e-branch.outputs.branch in the reporting job. The shard-level fail-closed behaviour is unaffected either way.

id: e2e-ref
uses: synonymdev/bitkit-e2e-tests/.github/actions/resolve-e2e-ref@main
with:
selected: ${{ needs.e2e-branch.outputs.branch }}
e2e_branch_input: ${{ github.event.inputs.e2e_branch || 'default-feature-branch' }}

- name: Checkout E2E tests
uses: actions/checkout@v7
with:
repository: synonymdev/bitkit-e2e-tests
ref: ${{ needs.e2e-branch.outputs.branch }}
ref: ${{ steps.e2e-ref.outputs.ref }}

- name: Post Slack summary
env:
Expand All @@ -278,5 +287,5 @@ jobs:
E2E_TESTS_RESULT: ${{ needs.e2e-tests-staging.result }}
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
RUN_ATTEMPT: ${{ github.run_attempt }}
E2E_TESTS_REF: ${{ needs.e2e-branch.outputs.branch }}
E2E_TESTS_REF: ${{ steps.e2e-ref.outputs.ref }}
run: python3 scripts/slack_summary.py e2e-staging
12 changes: 7 additions & 5 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,17 +157,19 @@ jobs:
name: e2e-tests-local - ${{ matrix.shard.name }}

steps:
- name: Show selected E2E branch
env:
E2E_BRANCH: ${{ needs.e2e-branch.outputs.branch }}
run: echo $E2E_BRANCH
- name: Resolve E2E tests ref
id: e2e-ref
uses: synonymdev/bitkit-e2e-tests/.github/actions/resolve-e2e-ref@main
Comment thread
piotr-iohk marked this conversation as resolved.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Distinguish a missing ref from transport failures. The referenced action runs git ls-remote --exit-code in an elif and sends every nonzero result through the missing-branch path. Exit status 2 means no matching ref, while DNS, authentication, and other transport failures return different statuses. A transient lookup failure can therefore fall back to main and let this workflow pass against a different test harness. Please capture the status, fall back only when it is 2, and fail for other errors. The same issue applies to the other new resolver invocations.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in synonymdev/bitkit-e2e-tests#254. resolve-e2e-ref (and determine-e2e-branch) now only treat ls-remote exit 2 as missing-ref; other statuses fail without falling back to main. Once #254 is on main, this PR’s @main pin picks it up.

with:
selected: ${{ needs.e2e-branch.outputs.branch }}
e2e_branch_input: ${{ github.event.inputs.e2e_branch || 'default-feature-branch' }}

- name: Clone E2E tests
uses: actions/checkout@v7
with:
repository: synonymdev/bitkit-e2e-tests
path: bitkit-e2e-tests
ref: ${{ needs.e2e-branch.outputs.branch }}
ref: ${{ steps.e2e-ref.outputs.ref }}

- name: Download iOS app
uses: actions/download-artifact@v8
Expand Down
41 changes: 32 additions & 9 deletions .github/workflows/e2e_migration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,24 @@ jobs:
app_branch: ${{ github.head_ref || github.ref_name }}
e2e_branch_input: ${{ github.event.inputs.e2e_branch || 'default-feature-branch' }}

resolve-e2e-ref:
if: github.event_name != 'pull_request' || (github.event.pull_request.draft == false && (startsWith(github.head_ref, 'release-') || startsWith(github.base_ref, 'release-')))
needs: [e2e-branch]
runs-on: ubuntu-latest
outputs:
ref: ${{ steps.e2e-ref.outputs.ref }}
steps:
- name: Resolve E2E tests ref
id: e2e-ref
uses: synonymdev/bitkit-e2e-tests/.github/actions/resolve-e2e-ref@main
with:
selected: ${{ needs.e2e-branch.outputs.branch }}
e2e_branch_input: ${{ github.event.inputs.e2e_branch || 'default-feature-branch' }}

prepare-wallets:
if: github.event_name != 'pull_request' || (github.event.pull_request.draft == false && (startsWith(github.head_ref, 'release-') || startsWith(github.base_ref, 'release-')))
uses: synonymdev/bitkit-e2e-tests/.github/workflows/migration-wallet-setup.yml@main
needs: [e2e-branch]
needs: [e2e-branch, resolve-e2e-ref]
strategy:
fail-fast: false
matrix:
Expand All @@ -138,7 +152,7 @@ jobs:
- { name: migration_3-with-passphrase, setup_type: passphrase }
- { name: migration_4-with-sweep, setup_type: sweep }
with:
e2e_branch: ${{ needs.e2e-branch.outputs.branch }}
e2e_branch: ${{ needs.resolve-e2e-ref.outputs.ref }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Resolve the ref inside the migration wallet setup workflow. This value comes from a separate successful resolve-e2e-ref job, but a failed-jobs-only rerun does not rerun that successful prerequisite. If the companion branch disappears after resolution and the checkout inside migration-wallet-setup.yml fails, retrying failed jobs reuses this same stale value and fails again. The called workflow checks out inputs.e2e_branch directly, so the resolver needs to run there immediately before checkout (or otherwise be forced to rerun with the failed setup job).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in synonymdev/bitkit-e2e-tests#254: migration-wallet-setup.yml now runs resolve-e2e-ref immediately before checkout (explicit synonymdev/bitkit-e2e-tests/.github/actions/resolve-e2e-ref@main), so a failed-jobs-only re-run re-validates even when the caller’s resolve job is skipped. Optional e2e_branch_input preserved for custom vs companion mode.

rn_version: ${{ matrix.rn_version }}
setup_type: ${{ matrix.scenario.setup_type }}
scenario_name: ${{ matrix.scenario.name }}
Expand All @@ -165,17 +179,19 @@ jobs:
BACKEND: regtest

steps:
- name: Show selected E2E branch
env:
E2E_BRANCH: ${{ needs.e2e-branch.outputs.branch }}
run: echo $E2E_BRANCH
- name: Resolve E2E tests ref
id: e2e-ref
uses: synonymdev/bitkit-e2e-tests/.github/actions/resolve-e2e-ref@main
with:
selected: ${{ needs.e2e-branch.outputs.branch }}
e2e_branch_input: ${{ github.event.inputs.e2e_branch || 'default-feature-branch' }}

- name: Clone E2E tests
uses: actions/checkout@v7
with:
repository: synonymdev/bitkit-e2e-tests
path: bitkit-e2e-tests
ref: ${{ needs.e2e-branch.outputs.branch }}
ref: ${{ steps.e2e-ref.outputs.ref }}

- name: Download iOS app
uses: actions/download-artifact@v8
Expand Down Expand Up @@ -336,11 +352,18 @@ jobs:
runs-on: ubuntu-latest
needs: [build, e2e-branch, prepare-wallets, e2e-tests]
steps:
- name: Resolve E2E tests ref

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as the e2e-staging.yml comment: a failed lookup in this slack-report resolver skips the migration Slack summary.

id: e2e-ref
uses: synonymdev/bitkit-e2e-tests/.github/actions/resolve-e2e-ref@main
with:
selected: ${{ needs.e2e-branch.outputs.branch }}
e2e_branch_input: ${{ github.event.inputs.e2e_branch || 'default-feature-branch' }}

- name: Checkout E2E tests
uses: actions/checkout@v7
with:
repository: synonymdev/bitkit-e2e-tests
ref: ${{ needs.e2e-branch.outputs.branch }}
ref: ${{ steps.e2e-ref.outputs.ref }}

- name: Post Slack summary
env:
Expand All @@ -353,5 +376,5 @@ jobs:
E2E_TESTS_RESULT: ${{ needs.e2e-tests.result }}
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
RUN_ATTEMPT: ${{ github.run_attempt }}
E2E_TESTS_REF: ${{ needs.e2e-branch.outputs.branch }}
E2E_TESTS_REF: ${{ steps.e2e-ref.outputs.ref }}
run: python3 scripts/slack_summary.py e2e-migration
Loading