Skip to content

Fix CI issues found in upstream Zebra ZSA PR#132

Open
dmidem wants to merge 16 commits into
zsa1from
sync-zcash-v4.2.0-merge
Open

Fix CI issues found in upstream Zebra ZSA PR#132
dmidem wants to merge 16 commits into
zsa1from
sync-zcash-v4.2.0-merge

Conversation

@dmidem

@dmidem dmidem commented May 29, 2026

Copy link
Copy Markdown
Collaborator

This fixes CI issues observed on the upstream Zebra PR in our fork’s Basic checks workflow.

Changes:

  • harden checkout usage for zizmor by pinning actions/checkout and disabling persisted credentials;
  • restrict workflow token permissions to read-only repository contents;
  • separate network-sensitive tests from the main test run;
  • retry only the network-sensitive test group instead of rerunning the full workspace test suite.

@dmidem dmidem force-pushed the sync-zcash-v4.2.0-merge branch from bb1b718 to a90946a Compare June 1, 2026 21:38

@PaulLaux PaulLaux left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

minor comments


steps:
- uses: actions/checkout@v4
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

can we just say checkout@v6.0.2 ?

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.

I ultimately decided to literally stick to the upstream approach to ensure our CI works the same as theirs:

https://github.com/ZcashFoundation/zebra/blob/main/.github/workflows/lint.yml#L63

Not sure why they explicitly use this commit, it needs to be checked.

Comment thread .github/workflows/ci-basic.yml Outdated
Comment on lines +64 to +74
for attempt in 1 2 3; do
echo "network-sensitive tests attempt ${attempt}"

timeout --preserve-status 45m bash -c '
set -euo pipefail
cargo test -p zebra-network --lib --verbose --locked -- --test-threads=1
cargo test -p zebrad --test acceptance --verbose --locked -- --test-threads=1
' && exit 0

status=$?
echo "network-sensitive tests attempt ${attempt} failed with status ${status}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This code reruns all tests in zebra-network --lib and zebrad --test acceptance, not just network-gated ones.
If a change break one of these test, unrelated to bad network, we will rerun 3x45 min before job fails. In addition to 1H run of step 1.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Not blocking for this PR after solving https://github.com/QED-it/zebra/pull/132/changes#r3355680589

Comment thread .github/workflows/ci-basic.yml Outdated
Comment on lines +69 to +70
cargo test -p zebra-network --lib --verbose --locked -- --test-threads=1
cargo test -p zebrad --test acceptance --verbose --locked -- --test-threads=1

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Let's split each cargo test .. into each own retry loop. If the second fails we should not run the first one again.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

done in https://github.com/QED-it/zebra/pull/139/changes. (can just take the commit)

Comment thread .github/workflows/lint.yml Outdated
Comment on lines +7 to +9
branches:
- main
- v4.2.0-dev

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Let's add zsa1 here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants