Commit Graph

670 Commits

Author SHA1 Message Date
Arya c447b03223
fix(tests): add submitblock test to CI, and avoid copying the cached state directory in other tests (#5589)
* updates mod docs for tests that use future blocks

* updates submitblock test to use TestType methods

* prunes redundant code

* adds check_sync_logs_until

* adds assertion for needs cached state & rpc server

* updates get_raw_future_blocks fn with rpc calls

* updates to get_raw_future_blocks fn and submit_block test

* Rename LightwalletdTestType to TestType

* moves TestType and random_known_rpc_port_config to test_type.rs and config.rs

* moves get_raw_future_blocks to cached_state.rs

* updates ci workflows to include submit block test

* adds get_future_blocks fn and uses it in load_transactions_from_future_blocks

* updates CI docker

* Apply suggestions from code review

Co-authored-by: teor <teor@riseup.net>

* Applies suggestions from code review

* Updates misnamed closure param

* updates mod docs for test_type.rs

Co-authored-by: teor <teor@riseup.net>
2022-11-10 03:40:21 +00:00
dependabot[bot] be24a364da
build(deps): bump google-github-actions/auth from 0.8.3 to 1.0.0 (#5596)
Bumps [google-github-actions/auth](https://github.com/google-github-actions/auth) from 0.8.3 to 1.0.0.
- [Release notes](https://github.com/google-github-actions/auth/releases)
- [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/auth/compare/v0.8.3...v1.0.0)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-10 00:12:39 +00:00
dependabot[bot] ff81432582
build(deps): bump tj-actions/changed-files from 34.3.2 to 34.3.4 (#5597)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 34.3.2 to 34.3.4.
- [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.3.2...v34.3.4)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-09 16:57:24 +00:00
dependabot[bot] 9b533ab059
build(deps): bump regex from 1.6.0 to 1.7.0 (#5565)
* build(deps): bump regex from 1.6.0 to 1.7.0

Bumps [regex](https://github.com/rust-lang/regex) from 1.6.0 to 1.7.0.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.6.0...1.7.0)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Add a getblocktemplate-rpcs feature to zebra-chain, and fix missing feature deps

* Run OS tests using release builds

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: teor <teor@riseup.net>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-11-09 07:36:10 +00:00
teor c4fad29824
fix(sync): Pause new downloads when Zebra reaches the lookahead limit (#5561)
* Use correct release for getblocktemplate config

* Include at least 2 full checkpoints in the lookahead limit

* Increase full sync timeout to 36 hours

* Only log "synced block height too far ahead of the tip" once

* Replace AboveLookaheadHeightLimit error with pausing the syncer

* Use AboveLookaheadHeightLimit for blocks a very long way from the tip

* Also add the getblocktemplate config, and fix the test message

* Remove an outdated TODO comment

* Allow syncing again when a small number of blocks are in the queue

* Allow some dead code
2022-11-09 04:42:04 +00:00
teor 14fb175cec
Split out getblocktemplate-rpcs GitHub Actions cache (#5578) 2022-11-08 20:53:08 +00:00
dependabot[bot] f3d27f4fdb
build(deps): bump tj-actions/changed-files from 34.3.1 to 34.3.2 (#5582)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 34.3.1 to 34.3.2.
- [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.3.1...v34.3.2)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-08 18:41:56 +00:00
dependabot[bot] f77d7503d7
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] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-07 23:32:47 +00:00
teor f94231fe34
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>
2022-11-07 22:29:37 +00:00
teor 975d9578d8
Add a missing runs-on field (#5562) 2022-11-07 15:13:06 +10:00
teor 26698bf2c4
fix(ci): Run required jobs on dependent PRs (#5550)
* Run CI jobs on dependent PRs

* Change job names to be unique

* Fix outdated workflow name

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-11-07 11:59:32 +10:00
teor 2dc8c0a2bd
fix(ci): Make "test all" log output shorter (#5521)
* Make "test all" log output shorter

* Use different docker instance names

* Spell out command-line arguments

* Fix option names

* Use nocapture on basic tests but not ignored tests

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-11-04 06:57:36 +00:00
teor 34313b8857
fix(build): Disable new Rust 1.65 lints and fix some test errors (#5549)
* allow(clippy::result_large_err)

* Increase the async executor delay expected by tests

* Split getblocktemplate-rpcs OS tests into a separate matrix job

* Add new patch jobs

* allow(unknown_lints)
2022-11-04 02:00:56 +00:00
dependabot[bot] 1a79ebe592
build(deps): bump tj-actions/changed-files from 34.0.2 to 34.0.3 (#5535)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 34.0.2 to 34.0.3.
- [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.2...v34.0.3)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-02 18:05:24 +00:00
dependabot[bot] aac569d6a0
build(deps): bump reviewdog/action-actionlint from 1.33.1 to 1.34.0 (#5534)
Bumps [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) from 1.33.1 to 1.34.0.
- [Release notes](https://github.com/reviewdog/action-actionlint/releases)
- [Commits](https://github.com/reviewdog/action-actionlint/compare/v1.33.1...v1.34.0)

---
updated-dependencies:
- dependency-name: reviewdog/action-actionlint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-02 18:05:16 +00:00
Gustavo Valverde bbbd56d7ce
fix(build): restore Rust stable in builds and beta for CI (#5515)
* Revert "fix(ci): Build zebrad with Rust 1.63 to avoid Zcash parameter download hangs (#5251)"

This reverts commit 9cb6c559f4.

* Revert "Require Rust 1.63 in the README (#5359)"

This reverts commit ee0edef857.

* Revert "Revert "ci(build): re-enable Rust beta tests in ubuntu (#5024)" (#5090)"

This reverts commit 579d6be4e9.
2022-11-01 10:51:29 +10:00
dependabot[bot] 17ec1d2256
build(deps): bump tj-actions/changed-files from 34.0.0 to 34.0.2 (#5509)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 34.0.0 to 34.0.2.
- [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.0...v34.0.2)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-31 17:47:13 +00:00
teor 5a6c84024c
change(ci): Add patch jobs for lightwalletd build and getblocktemplate-rpcs tests (#5474)
* Add test-all-getblocktemplate-rpcs CI patch job

* Cancel concurrent in-progress zcash-lightwalletd jobs

* Add a patch job for zcash-lightwalletd / Build images
2022-10-26 22:19:53 +00:00
dependabot[bot] 3d0060658f
build(deps): bump reviewdog/action-actionlint from 1.33.0 to 1.33.1 (#5478)
Bumps [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) from 1.33.0 to 1.33.1.
- [Release notes](https://github.com/reviewdog/action-actionlint/releases)
- [Commits](https://github.com/reviewdog/action-actionlint/compare/v1.33.0...v1.33.1)

---
updated-dependencies:
- dependency-name: reviewdog/action-actionlint
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-26 22:19:46 +00:00
Arya 466adc71a6
change(ci): only run the send transaction test on the main branch (#5480)
* only run the send transaction test on the main branch

* adds patch job

* Add concurrency rule to the send transactions test

* Apply suggestions from code review

Co-authored-by: teor <teor@riseup.net>

* Allow send tx test to be triggered manually

Co-authored-by: teor <teor@riseup.net>
2022-10-26 21:26:07 +00:00
dependabot[bot] 733ac09c43
build(deps): bump tj-actions/changed-files from 33.0.0 to 34.0.0 (#5483)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 33.0.0 to 34.0.0.
- [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/v33.0.0...v34.0.0)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-26 21:25:55 +00:00
Alfredo Garcia b933f99285
ci(getblocktemplate): run getblocktemplate-rpcs feature tests in CI (#5435)
* test all features

* increase task timeout

* add a new task for feature tests

* add `getblocktemplate-rpcs` tests to docker integration

* run the getblocktemplate-rpcs feature as a separated step in docker

* move getblocktemplate-rpcs in docker as a separated task
2022-10-24 23:38:48 +00:00
dependabot[bot] a2a75059d3
build(deps): bump peaceiris/actions-mdbook from 1.1.14 to 1.2.0 (#5467)
Bumps [peaceiris/actions-mdbook](https://github.com/peaceiris/actions-mdbook) from 1.1.14 to 1.2.0.
- [Release notes](https://github.com/peaceiris/actions-mdbook/releases)
- [Changelog](https://github.com/peaceiris/actions-mdbook/blob/main/CHANGELOG.md)
- [Commits](https://github.com/peaceiris/actions-mdbook/compare/v1.1.14...v1.2.0)

---
updated-dependencies:
- dependency-name: peaceiris/actions-mdbook
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-24 19:48:58 +00:00
dependabot[bot] 4129250446
build(deps): bump tj-actions/changed-files from 32.1.2 to 33.0.0 (#5457)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 32.1.2 to 33.0.0.
- [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/v32.1.2...v33.0.0)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-21 22:45:40 +00:00
Arya 2cadb7304b
ci(sync): increase the height of blocks for some full sync jobs (#5391)
* adds extra step to CI docker before logs-checkpoint

* replaces logs-1790k with logs-1800k

* Update .github/workflows/deploy-gcp-tests.yml

Co-authored-by: teor <teor@riseup.net>

* Update .github/workflows/deploy-gcp-tests.yml

Co-authored-by: teor <teor@riseup.net>

Co-authored-by: Arya <arya2@users.noreply.github.com>
Co-authored-by: teor <teor@riseup.net>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-10-21 06:01:06 +00:00
teor b17e647f18
Fix lwd full sync patch job name (#5448) 2022-10-21 12:16:03 +10:00
Gustavo Valverde dae1d92b01
ci(sync): only run the `lightwalletd` full sync on the `main` branch (#5393)
* ci(sync): only run the `lightwalletd` full sync on the `main` branch

Previous behavior:
In PR #5164, we made lightwalletd sync all the way to the tip in its full
sync test.

This increases that test's time from 1 hour to 4 hours, which makes the CI
we run on each PR change increase from 3 hours to 6 hours.

Expected behavior:
Run the lightwalletd full sync just on `main` or if a state disk for the
actual version is not found.

Solution:
Add the `github.event_name == 'push' && github.ref_name == 'main'` condition
to the `lightwalletd-full-sync` test.

Fixes #5316

* Allow lwd full syncs to be triggered manually (#5400)

* Limit checkpoint and lwd full sync concurrency

* Add a patch job for lightwalletd-full-sync

Co-authored-by: teor <teor@riseup.net>
2022-10-19 12:01:26 +00:00
dependabot[bot] 267db7f956
build(deps): bump docker/metadata-action from 4.0.1 to 4.1.1 (#5417)
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 4.0.1 to 4.1.1.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](https://github.com/docker/metadata-action/compare/v4.0.1...v4.1.1)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-18 22:15:31 +00:00
dependabot[bot] 3cbf8dafaf
build(deps): bump google-github-actions/auth from 0.8.2 to 0.8.3 (#5413)
Bumps [google-github-actions/auth](https://github.com/google-github-actions/auth) from 0.8.2 to 0.8.3.
- [Release notes](https://github.com/google-github-actions/auth/releases)
- [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/auth/compare/v0.8.2...v0.8.3)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-17 21:54:05 +00:00
dependabot[bot] 4a70354d9e
build(deps): bump tj-actions/changed-files from 32.1.0 to 32.1.2 (#5414)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 32.1.0 to 32.1.2.
- [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/v32.1.0...v32.1.2)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-17 21:53:55 +00:00
dependabot[bot] b0685be139
build(deps): bump tj-actions/changed-files from 32.0.0 to 32.1.0 (#5403)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 32.0.0 to 32.1.0.
- [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/v32.0.0...v32.1.0)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-16 12:34:43 +00:00
dependabot[bot] 291b85d8ec
build(deps): bump google-github-actions/auth from 0.8.1 to 0.8.2 (#5404)
Bumps [google-github-actions/auth](https://github.com/google-github-actions/auth) from 0.8.1 to 0.8.2.
- [Release notes](https://github.com/google-github-actions/auth/releases)
- [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/auth/compare/v0.8.1...v0.8.2)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-16 12:34:36 +00:00
Gustavo Valverde 25b46ea0ec
ci(disk): use an official GCP image on CI VMs for disk auto-resizing, make CI & CD disks 300GB (#5371)
* Revert "ci(ssh): connect using `ssh-compute` action by Google (#5330)"

This reverts commit b366d6e7bb.

* ci(ssh): use sudo for docker commands if user is not root

* ci(ssh): specify the service account to connect with

* ci(ssh): increase the Google Cloud instance sshd connection limit

* chore: add a new line at the end of the script

* chore: update our VM image to bullseye

* chore: fix `tj-actions/changed-files` file comparison

* ci(disk): use an official image on CI VMs for disk auto-resizing

Previous behavior:
We've presented issues in the past with resizing as the device is busy,
for example:

```
e2fsck: Cannot continue, aborting.
/dev/sdb is in use.
```

Expected behavior:
We've been manually resizing the disk as this task was not being done
automatically, but having an official Public Image from GCP would make
this easier (automatic) and it also integrates better with other GCP
services

Configuration differences: https://cloud.google.com/compute/docs/images/os-details#notable-difference-debian

Solution:
- Use `debian-11` from the official public images https://cloud.google.com/compute/docs/images/os-details#debian
- Remove the manual disk resizing from the pipeline

* ci: increase VM disk size to fit future cached states sizes

Some GCP disk images are 160 GB, which means they could get to the current
200 GB size soon.
2022-10-16 08:01:59 -04:00
dependabot[bot] a524816e14
build(deps): bump actions/github-script from 6.3.2 to 6.3.3 (#5409)
Bumps [actions/github-script](https://github.com/actions/github-script) from 6.3.2 to 6.3.3.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v6.3.2...v6.3.3)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-14 20:22:59 +00:00
dependabot[bot] 8646a03e03
build(deps): bump actions/github-script from 6.3.1 to 6.3.2 (#5387)
Bumps [actions/github-script](https://github.com/actions/github-script) from 6.3.1 to 6.3.2.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v6.3.1...v6.3.2)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-12 19:32:55 +00:00
dependabot[bot] b991f9feb7
build(deps): bump docker/build-push-action from 3.1.1 to 3.2.0 (#5389)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3.1.1 to 3.2.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v3.1.1...v3.2.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-12 19:32:48 +00:00
dependabot[bot] dbf7aae5b9
build(deps): bump docker/login-action from 2.0.0 to 2.1.0 (#5388)
Bumps [docker/login-action](https://github.com/docker/login-action) from 2.0.0 to 2.1.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2.0.0...v2.1.0)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-12 18:12:06 +00:00
Gustavo Valverde 658fbd923a
ci(ssh): revert using `ssh-compute` action & increase sshd connection limit (#5367)
* Revert "ci(ssh): connect using `ssh-compute` action by Google (#5330)"

This reverts commit b366d6e7bb.

* ci(ssh): use sudo for docker commands if user is not root

* ci(ssh): specify the service account to connect with

* ci(ssh): increase the Google Cloud instance sshd connection limit

* chore: add a new line at the end of the script

* chore: update our VM image to bullseye

* chore: fix `tj-actions/changed-files` file comparison
2022-10-11 00:11:49 +00:00
dependabot[bot] 3bc8f0971f
build(deps): bump reviewdog/action-actionlint from 1.32.0 to 1.33.0 (#5368)
Bumps [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) from 1.32.0 to 1.33.0.
- [Release notes](https://github.com/reviewdog/action-actionlint/releases)
- [Commits](https://github.com/reviewdog/action-actionlint/compare/v1.32.0...v1.33.0)

---
updated-dependencies:
- dependency-name: reviewdog/action-actionlint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-10 19:12:50 +00:00
dependabot[bot] 1d43a8bb8d
build(deps): bump tj-actions/changed-files from 29.0.7 to 32.0.0 (#5354)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 29.0.7 to 32.0.0.
- [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/v29.0.7...v32.0.0)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-06 20:15:08 +00:00
teor 1ec632a493
fix(docker): Add edge tag to Docker images, document when latest tag will appear (#5312)
* Add latest and edge tags to Docker images

* Document how latest tag actually works

* Try a different syntax for is_default_branch

* Try again

* One last try

* Revert changes that don't work

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-10-06 10:36:31 +00:00
dependabot[bot] 58b0ed1d85
build(deps): bump actions/checkout from 3.0.2 to 3.1.0 (#5329)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.0.2 to 3.1.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.0.2...v3.1.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-10-05 21:45:06 +00:00
Gustavo Valverde b366d6e7bb
ci(ssh): connect using `ssh-compute` action by Google (#5330)
* refactor(ssh): connect using `ssh-compute` action by Google

Previous behavior:
From time to time SSH connections to deployed VMs fails with the following
error: `kex_exchange_identification: Connection closed by remote host`

This was still happening after implementing https://github.com/ZcashFoundation/zebra/pull/5292

Excpected behavior:
Ensure we're not creating SSH key pairs on the fly to improve our connections
guarantees

Solution:
- Enable the Cloud Identity-Aware Proxy API in GCP
- Create a firewall rule to enable connections from IAP
- Grant the required IAM permissions to enable IAP TCP forwarding
- Generate an SSH keys pair and set a private key as an input param
- Set the GitHub Action SA to have authorized ssh connection to the VMs
- Implement the `google-github-actions/ssh-compute` action to connect

* fix(ssh): id `compute-ssh` cannot be used more than once within the same scope

* fix(ci): try to enclose commands to override parsing issues

* tmp: remove ssh_args

* fix(action): secrets must be inherited to be used

* tmp: validate command enclosing fixes executin

* fix(ssh): ssh_args are not implemented correctly

* fix(ssh): login with the root user

* fix(privelege): uso sudo with docker commands

* tmp: add sudo

* fix(ssh): use sudo for all docker commands

* fix(ssh): add missing `sudo` commands

* fix(ssh): get sync height from ssh stdout

* fix(height): get the height correctly
2022-10-05 09:02:40 +00:00
Gustavo Valverde a4189857fd
ci(lint): do not fail linter on `push` events (#5331)
Previous behavior:
The following error was causing an exit 1 in GitHub Actions when a pushing
to the `main` branch

```
Error: Similar commit hashes detected: previous sha is equivalent to the
current sha
```

Expeceted behavior:
Allow the linter to run succesfully even if the previous SHA has no files
changed

Solution:
Add `fetch-depth: 2` to retrieve the preceding commit
2022-10-04 19:00:44 +00:00
dependabot[bot] 6767f31e48
build(deps): bump reviewdog/action-actionlint from 1.31.0 to 1.32.0 (#5318)
Bumps [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) from 1.31.0 to 1.32.0.
- [Release notes](https://github.com/reviewdog/action-actionlint/releases)
- [Commits](https://github.com/reviewdog/action-actionlint/compare/v1.31.0...v1.32.0)

---
updated-dependencies:
- dependency-name: reviewdog/action-actionlint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-03 17:50:17 +00:00
dependabot[bot] d8f803a826
build(deps): bump actions/github-script from 6.3.0 to 6.3.1 (#5317)
Bumps [actions/github-script](https://github.com/actions/github-script) from 6.3.0 to 6.3.1.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v6.3.0...v6.3.1)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-03 17:50:10 +00:00
Gustavo Valverde aaad60dec7
ci(deploy): retry ssh connections if it fails (#5292)
Previous behavior
From time to time SSH connections to deployed VMs fails with the following
error: `kex_exchange_identification: Connection closed by remote host`

Expected behavior
If the connection fails, attempt to reconnect once again (or multiple times)

Solution
Add the `ConnectionAttempts` and `ConnectTimeout` with 20 and 5 values
respectively, which attempst to reconnect 19 more times every 5 seconds
2022-09-28 21:45:31 +00:00
teor 30b47159e4
Use the best cache for docker images (#5282) 2022-09-28 13:14:29 +00:00
teor 01ca74d0fb
Create a new cached state image every 12 hours (#5191)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-09-28 00:33:15 +00:00
dependabot[bot] 84d79ecda6
build(deps): bump actions/github-script from 6.2.0 to 6.3.0 (#5271)
Bumps [actions/github-script](https://github.com/actions/github-script) from 6.2.0 to 6.3.0.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v6.2.0...v6.3.0)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-09-27 21:22:30 +00:00
teor b0e60d7c11
change(release): Automatically split CHANGELOG entries into categories (#5203)
* Update release-drafter.yml

* Explain where we got the workflow from

* Automatically add "trivial" label to dependabot updates

* Add categories and auto-labels to release drafter

* Update release PR template for automatic release drafter versions

* Also strip PR series numbers and leading spaces from changelog entries

* Update release note version check

* Update label names

* Add missing ! in conventional commits regex

Co-authored-by: Marek <mail@marek.onl>

* Make versioning steps more specific

Co-authored-by: Marek <mail@marek.onl>

* Remove conflicting detailed versioning explanations

Co-authored-by: Marek <mail@marek.onl>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-09-27 12:41:55 +00:00
teor a6ceba7314
Revert "build(deps): bump tj-actions/changed-files from 29.0.7 to 31.0.1 (#5254)" (#5264)
This reverts commit dc83bdbcc7.
2022-09-27 12:21:09 +00:00
teor 59a6ed2c21
doc(ci): Fix incorrect docs about Docker build cache order (#5190)
* Use branch then main build caches

* Revert cache order to try branch cache first

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-09-27 06:53:59 +00:00
dependabot[bot] dc83bdbcc7
build(deps): bump tj-actions/changed-files from 29.0.7 to 31.0.1 (#5254)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 29.0.7 to 31.0.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/v29.0.7...v31.0.1)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-27 01:16:57 +00:00
dependabot[bot] 237f35d8bf
build(deps): bump reviewdog/action-actionlint from 1.30.0 to 1.31.0 (#5238)
Bumps [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) from 1.30.0 to 1.31.0.
- [Release notes](https://github.com/reviewdog/action-actionlint/releases)
- [Commits](https://github.com/reviewdog/action-actionlint/compare/v1.30.0...v1.31.0)

---
updated-dependencies:
- dependency-name: reviewdog/action-actionlint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-26 23:48:57 +00:00
teor 9cb6c559f4
fix(ci): Build zebrad with Rust 1.63 to avoid Zcash parameter download hangs (#5251)
* Try running coverage with Rust 1.63

* Run GitHub Actions tests with Rust 1.63

* Change from stable to 1.63 in the patch file

* Use Rust 1.63 to download Zcash parameters

* Use Rust 1.63 to build Docker zebrad images

* Make Rust 1.63 a supported platform, and make stable temporarily unsupported
2022-09-26 12:37:23 +00:00
teor 12d084f6cc
fix(ci): Delete Google Cloud test instances after 3 days (#5192)
* Delete test instances after 3 days

* Use correct delete command, improve shell quoting

* Use sed to provide the correct zone or region

* Fix quoting

* Fix IFS

* Fix IFS for multiple disks

* Document why we can't quote some shell variables

* Document that instances can get deleted

* Fix exact names in deletion docs
2022-09-21 23:16:38 +00:00
dependabot[bot] 59835947a5
build(deps): bump codecov/codecov-action from 3.1.0 to 3.1.1 (#5205)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3.1.0...v3.1.1)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-21 19:51:20 +00:00
dependabot[bot] 11e505b313
build(deps): bump w9jds/firebase-action from 11.5.0 to 11.9.0 (#5196)
Bumps [w9jds/firebase-action](https://github.com/w9jds/firebase-action) from 11.5.0 to 11.9.0.
- [Release notes](https://github.com/w9jds/firebase-action/releases)
- [Commits](https://github.com/w9jds/firebase-action/compare/v11.5.0...v11.9.0)

---
updated-dependencies:
- dependency-name: w9jds/firebase-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-20 04:40:55 +00:00
dependabot[bot] 2135b33e28
build(deps): bump reviewdog/action-actionlint from 1.29.0 to 1.30.0 (#5195)
Bumps [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) from 1.29.0 to 1.30.0.
- [Release notes](https://github.com/reviewdog/action-actionlint/releases)
- [Commits](https://github.com/reviewdog/action-actionlint/compare/v1.29.0...v1.30.0)

---
updated-dependencies:
- dependency-name: reviewdog/action-actionlint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-20 04:40:42 +00:00
Gustavo Valverde 7b6da4b2d0
feat(release): create Docker hub binaries when tagging (#5138)
* feat(release): create Docker hub binaries when tagging

* fix(release): add a release workflow for binaries

* fix(release): trigger on tag creation, not pushing to it

* fix(release): use the same conditions for logging into DockerHub

* fix(release): add missing parameter to access GH secrets

* Apply suggestions from code review

Co-authored-by: teor <teor@riseup.net>

* ci(release): just publish to DockerHub when a release is published

* Apply suggestions from code review

Co-authored-by: teor <teor@riseup.net>

* ci(release): filter prerelease event correctly

* ci(release): fix tags

* ci(release): use `zebra` and not `zebrad` as the repository

* ci(release): do not try to login to Docker if not a release

* Update .github/workflows/build-docker-image.yml

Co-authored-by: teor <teor@riseup.net>

Co-authored-by: teor <teor@riseup.net>
2022-09-16 04:14:06 +00:00
teor c57f129df4
Add a full sync job for 1790k blocks (#5166) 2022-09-15 06:18:10 +00:00
teor 2d7ea7c043
Allow manual Release Drafter workflow runs (#5165) 2022-09-14 23:38:19 +00:00
teor 0d4a6a64d2
Enable all cargo features in Zebra's deployed docs (#5156) 2022-09-14 19:53:08 +00:00
dependabot[bot] fc4aff1991
build(deps): bump tj-actions/changed-files from 29.0.6 to 29.0.7 (#5159)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 29.0.6 to 29.0.7.
- [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/v29.0.6...v29.0.7)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-14 18:03:08 +00:00
dependabot[bot] 66f2bc6ccd
build(deps): bump tj-actions/changed-files from 29.0.4 to 29.0.6 (#5148)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 29.0.4 to 29.0.6.
- [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/v29.0.4...v29.0.6)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-13 20:18:58 +00:00
teor 113ff04dc2
fix(doc): Explain how image deletion actually works (#5124)
* Explain how image deletion actually works

* Be clearer about exactly what happens
2022-09-13 07:24:25 +00:00
teor 579d6be4e9
Revert "ci(build): re-enable Rust beta tests in ubuntu (#5024)" (#5090)
This reverts commit 422d20ea12.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-09-13 02:46:06 +00:00
teor 2c0f906692
Fix checkpoint disk image names so they are short enough for Google Cloud (#5128) 2022-09-12 21:28:21 +00:00
dependabot[bot] 3254b4ebf4
build(deps): bump tj-actions/changed-files from 29.0.3 to 29.0.4 (#5117)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 29.0.3 to 29.0.4.
- [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/v29.0.3...v29.0.4)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-09 01:44:06 +00:00
teor a58b72c92b
fix(ci): Wait 1 day before creating cached state image updates (#5088)
* Increase search range for sync height

* Update sync height regexes for zebrad and lwd cached states

* Add labels to cached state images

* Update deploy-gcp-tests.yml

* Don't create new cached states for lwd updates

* Add a missing line continuation

* Fix a comment

* Revert a mistaken comment change

* Clarify a TODO comment

* Partially revert to old docker height log handling

* Use an output for the cached disk name
2022-09-08 20:25:00 +00:00
teor c6fd7aa96d
Delete images older than 2 days, check every day (#5113) 2022-09-08 20:24:24 +00:00
teor 463907965a
fix(ci): Simplify GitHub actions caches (#5104)
* Disable fmt cache and create shared clippy cache

* Make Cargo.lock check use the shared clippy cache

* Add a TODO for Windows Rust cache path

* Fix quoting for Windows path

* Use correct sharedKey spelling
2022-09-07 14:32:41 +00:00
teor fb2a1e8595
1. fix(ci): Label lwd cached state images with their sync height (#5086)
* Increase search range for sync height

* Update sync height regexes for zebrad and lwd cached states

* Add labels to cached state images

* Add a missing line continuation
2022-09-07 05:06:34 +00:00
Gustavo Valverde a7f74feabd
ci(lint): fetch with depth for `tj-actions/changed-files` on push (#5097)
Previous behavior:
The `tj-actions/changed-files` crashed when making pushes to main, as no
fetch depth was defined on the previous checkout action. Which is now r
required after b216561b5b

Expected behavior:
Do not fail with this new requirement

Solution:
Change the chekout action `fetch-depth` to 2, allowing to compare with
the previous commit
2022-09-06 19:58:03 +00:00
Alfredo Garcia 6cb9c5250e
build(deps): bump prost, tonic, tonic-build and console-subscriber (#5009)
* bump prost, tonic and tonic-build

* add protoc as a dependency step in the CI

* bump console-subscriber

* add protoc to `build-crates-individually`

* add protoc to docs build

* install protoc in lint.yml

* change protoc installation location in lint.yml

* add protoc to `Check Cargo.lock is up to date`

* ci(build): keep protoc pinned to the same major version

* ci(build): avoid rate limiting with `arduino/setup-protoc@v1`

* cargo upgrade --workspace console-subscriber

Co-authored-by: Gustavo Valverde <gustavo@iterativo.do>
Co-authored-by: teor <teor@riseup.net>
2022-09-06 14:49:18 +00:00
teor fec012a006
fix(ci): delete GCP resources, but keep some recent cached state images (#5082)
* Fix delete GCP resources commands

* Don't create a GCP credentials file

* Keep the latest 2 images

* Explain time

* Show the names of disks that are being deleted

* Actually run the image delete steps

* Only delete commit-based instance templates

* Document automated deletion
2022-09-06 02:51:46 +00:00
teor c081fd9873
fix(cd): Use 200GB disks for managed instances (#5084)
* Use 200GB disks for managed instances

* Fix a typo
2022-09-06 00:23:25 +00:00
Gustavo Valverde fd0e6e65d3
ci(resources): delete old disk images created in GCP (#5079)
Previous behavior:
Disk images are being accumulated in GCP for a few years, but this
generates unneeded costs as we're not using images older than 1-2 weeks.

Expected behavior:
Delete previously unused images based on a timefrime.

Solution:
Delete images created on a pull request older than 30 days, from the
`main` branch if older than 60 days, and any other image older than 90
days.

A TODO is on place as we'd like to keep at least the 2 latest images of
each type (zebra checkpoint, zebra tip, lwd tip). Once we've excluded
those images, we can delete any older images after 1 week.
2022-09-05 22:13:39 +00:00
dependabot[bot] b216561b5b
build(deps): bump tj-actions/changed-files from 29.0.2 to 29.0.3 (#5073)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 29.0.2 to 29.0.3.
- [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/v29.0.2...v29.0.3)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-05 20:44:57 +00:00
Gustavo Valverde 422d20ea12
ci(build): re-enable Rust beta tests in ubuntu (#5024)
Previous behavior:
As we disabled beta Rust tests in PR #4930, because the parameter
downloads were unstable with beta Rust, we're no longer testing it.

Expected behavior:
Re-enable beta rust tests in CI OSes

Solution:
Remove the parameter exluding beta Rust
2022-09-02 08:56:04 +00:00
dependabot[bot] 594f4c41cf
build(deps): bump google-github-actions/auth from 0.8.0 to 0.8.1 (#5029)
Bumps [google-github-actions/auth](https://github.com/google-github-actions/auth) from 0.8.0 to 0.8.1.
- [Release notes](https://github.com/google-github-actions/auth/releases)
- [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/auth/compare/v0.8.0...v0.8.1)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-01 23:48:28 +00:00
teor e9597c0406
Split a long full sync job (#5001) 2022-08-30 13:42:17 +00:00
teor 6dfaa73969
Stop cancelling manual full syncs (#5000) 2022-08-30 12:09:26 +00:00
Gustavo Valverde c85e482fa0
ci(concurrency)!: run a single CI workflow as required (#4981)
* ci(concurrency)!: run a single CI workflow as required

Previous behavior:
Multiple Mainnet full syncs were able to run on the main branch at the
same time, and pushing multiple commits to the same branch would run
multiple CI workflows, when only the run from last commit was relevant

Expected behavior:
Ensure that only a single CI workflow runs at the same time in PRs.
The latest commit should cancel any previous running workflows from the
same PR.

Solution:
Use GitHub actions concurrency feature https://docs.github.com/en/actions/using-jobs/using-concurrency

Fixes https://github.com/ZcashFoundation/zebra/issues/4977
Fixes https://github.com/ZcashFoundation/zebra/issues/4857

* docs: typo

* ci(concurrency): do not cancel running full syncs

Co-authored-by: teor <teor@riseup.net>

* fix(concurrency): explain the behavior better & add new ones

Co-authored-by: teor <teor@riseup.net>
2022-08-30 00:11:05 +00:00
dependabot[bot] e5c0e10887
build(deps): bump actions/github-script from 6.1.0 to 6.2.0 (#4986)
Bumps [actions/github-script](https://github.com/actions/github-script) from 6.1.0 to 6.2.0.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v6.1.0...v6.2.0)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-29 22:52:29 +00:00
dependabot[bot] fc7d0db83f
build(deps): bump tj-actions/changed-files from 29.0.1 to 29.0.2 (#4985)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 29.0.1 to 29.0.2.
- [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/v29.0.1...v29.0.2)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-29 22:51:58 +00:00
dependabot[bot] e744035ebd
build(deps): bump reviewdog/action-actionlint from 1.28.0 to 1.29.0 (#4987)
Bumps [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) from 1.28.0 to 1.29.0.
- [Release notes](https://github.com/reviewdog/action-actionlint/releases)
- [Commits](https://github.com/reviewdog/action-actionlint/compare/v1.28.0...v1.29.0)

---
updated-dependencies:
- dependency-name: reviewdog/action-actionlint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-29 22:51:38 +00:00
dependabot[bot] d78026466e
build(deps): bump reviewdog/action-actionlint from 1.27.0 to 1.28.0 (#4923)
Bumps [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) from 1.27.0 to 1.28.0.
- [Release notes](https://github.com/reviewdog/action-actionlint/releases)
- [Commits](https://github.com/reviewdog/action-actionlint/compare/v1.27.0...v1.28.0)

---
updated-dependencies:
- dependency-name: reviewdog/action-actionlint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-29 06:57:51 +00:00
teor d692c604b7
Update sync workflow docs for edge cases (#4973) 2022-08-29 05:29:38 +00:00
Gustavo Valverde 58c4a62d2f
ci(deploy): do not run `versioning` job when pushing to `main` (#4970)
Previous behavior:
When a push was detected in the `main` branch, the workflow would run the
`versioning` job and crash trying to detect the version being deployed as
there was none.

Expected behavior:
Do not fail the `versioning` job when pushing to `main`

Solution:
Limit the `versioning` job to only run when a release event is triggered
and allow the `deploy-nodes` job to run even if `versioning` is skipped
2022-08-28 23:56:58 +00:00
teor 4cda4eef66
fix(ci): Improve Zebra acceptance test diagnostics (#4958)
* Show the arguments of acceptance test functions in the logs

* Show all the logs in the "Run tests" jobs

* Document expected "broken pipe" error from `tee`

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-08-28 17:08:43 +00:00
Gustavo Valverde 8227dabe56
ci(build): deploy long running node instances on release (#4939)
* feat(build): deploy long running instances on release

Previous behavior:
Each time we merged to main new nodes would be deployed, this is an
expected behavior as we need to ensure nodes get deployed and run
without issues, but this could also replace nodes very hastily.

Expected behavior:
We want instances which would run for a longer time, to allow us to
troubleshoot issues or inspect the behavior of this instances for longer
periods of time (2+ weeks)

Applied solution:
Deploy a versioned manage instance group (MiG) using the major version
of the release semver. We just use the first part of the version to
replace old instances, and change it when a major version is released
to keep a segregation between new and old versions.

* ci(build): allow v0 as a major version tag

* fix(build): use rust conventions for versioning

* fix(deploy): improve documentation and trigger on release

* Update .github/workflows/continous-delivery.yml

Co-authored-by: teor <teor@riseup.net>

* fix(versioning): typo

* fix(deploy): use `zebrad-v1` as the instance name, with no SHA

* fix(deploy): create and update MiG must use the same name

* docs(deployments): add Continuous Delivery process

Co-authored-by: teor <teor@riseup.net>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-08-28 12:46:21 +00:00
teor 6fd3cdb3da
fix(ci): Expand cached state disks before running tests (#4962)
* Expand cached state disks before running tests

* Install partition management tool

* There isn't actually a partition on the cached state image

* Make e2fsck non-interactive

* Limit the length of image names to 63 characters

* Ignore possibly long branch names when matching images, just match the commit
2022-08-28 09:47:42 +00:00
teor 1d861b0d20
fix(ci): Increase full sync timeouts for longer syncs (#4961)
* Increase full sync timeout to 24 hours

Expected sync time is ~21 hours as of August 2022.

* Split final checkpoint job into two smaller jobs to avoid timeouts

Also make regexes easier to read.

* Fix a job name typo
2022-08-28 05:42:20 +10:00
Gustavo Valverde 326ae04b0f
ci(test): run build and test jobs on cargo and clippy config changes (#4941)
Previous behavior:
If warnings or error are added in `.cargo/config.toml` or `clippy.toml`,
and those could generate CI failures, we wouldn't catch those new as the
pipelines are not run when this files are changed

Expected behavior:
If warnings or error are added in `.cargo/config.toml` or `clippy.toml`,
run all the builds and test jobs which also track a `Cargo.toml`.

Solution:
Add `.cargo/config.toml` and `clippy.toml` as paths to all the required
jobs which needs to be triggered when these files changes.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-08-26 18:06:32 +00:00
dependabot[bot] 9f2ab39968
build(deps): bump tj-actions/changed-files from 29.0.0 to 29.0.1 (#4959)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 29.0.0 to 29.0.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/v29.0.0...v29.0.1)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-26 15:48:44 +00:00
teor aa3b0af15c
Fix a regular expression typo in a full sync job (#4950) 2022-08-26 13:31:10 +10:00
teor 0a39011b88
fix(ci): Write cached state images after update syncs, and use the latest image from any commit (#4949)
* Save cached state on full syncs and updates

* Add an -update suffix to CI images created by updating cached state

* Make disk image names unique by adding a time suffix

* Use the latest image from any branch, but prefer the current commit if available

* Document Zebra's continuous integration tests

* Fix typos in environmental variable names

* Expand documentation

* Fix variable name typo

* Fix shell syntax
2022-08-25 13:09:20 +00:00
teor 7fc3cdd2b2
Increase CI disk size to 200GB (#4945) 2022-08-25 16:41:45 +10:00
dependabot[bot] c87073ed44
build(deps): bump tj-actions/changed-files from 24 to 29.0.0 (#4936)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 24 to 29.0.0.
- [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/v24...v29.0.0)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-24 10:45:36 +00:00
Gustavo Valverde bcc325d7f8
ci(auth): retry GCP authentication if fails (#4940)
Previous behavior:
Sometimes Google Cloud authentication fails, this might happen before
IAM permissions are fully propagated

Expected behavior:
If the authentication fails, retry at least 3 times before exiting with
a non zero exit code

Applied solution:
Google GitHub Actions for auth recently added this a `retries` feature
which is now implemented to workaround this issue.

Note: 95a6bc2a27

Fixes https://github.com/ZcashFoundation/zebra/issues/4846
2022-08-24 03:49:55 +00:00
Alfredo Garcia 9fb87425b7
fix(tests): Update timeout for Zebra sync tests (#4918)
* update timeout

* update the doc comment

* Increase test timeouts for Zebra update syncs

* Stop failing the 1740k job if the cached state is after block 1740k

Co-authored-by: teor <teor@riseup.net>
2022-08-24 10:06:18 +10:00
dependabot[bot] 4ecaefed72
build(deps): bump w9jds/firebase-action from 2.2.2 to 11.5.0 (#4905)
Bumps [w9jds/firebase-action](https://github.com/w9jds/firebase-action) from 2.2.2 to 11.5.0.
- [Release notes](https://github.com/w9jds/firebase-action/releases)
- [Commits](https://github.com/w9jds/firebase-action/compare/v2.2.2...v11.5.0)

---
updated-dependencies:
- dependency-name: w9jds/firebase-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-23 11:04:41 +00:00
teor 52fa867cb8
change(ci): Disable beta Rust tests and add parameter download logging (#4930)
* Apply the same Rust logging settings to all GitHub workflows

* Enable full optimisations in dev builds for downloading large parameter files

* Disable beta Rust tests in CI
2022-08-23 03:43:18 +00:00
dependabot[bot] 2d4196f13c
build(deps): bump docker/build-push-action from 3.1.0 to 3.1.1 (#4895)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v3.1.0...v3.1.1)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-05 17:21:51 +00:00
teor dd273fec70
Make sure Rust tests actually ran in deploy-gcp-tests.yml (#4710)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-08-03 17:22:35 +00:00
dependabot[bot] 3203de58da
build(deps): bump docker/build-push-action from 3.0.0 to 3.1.0 (#4797)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v3.0.0...v3.1.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-01 20:43:42 +00:00
teor 65b0a8b6fa
fix(ci): split NU5 sync into two GitHub actions jobs (#4840)
* Split the NU5 job at block 1,740,000

* Fix the split regex

* Fix the lightwalletd sync to tip regex
2022-07-29 00:43:47 +00:00
teor 1cad4c5218
fix(ci): split canopy sync into a separate GitHub actions job (#4838)
* Split Canopy and NU5 sync jobs

* Look for cached state disks for this commit and branch first
2022-07-29 07:07:29 +10:00
teor 89a0410e23
fix(ci): fix hangs in lightwalletd tests by checking concurrent process output in different threads (#4828)
* Make code execution time logs shorter

* Do ZK parameter preloads in the lightwalletd tests that need them

* Try to re-launch `lightwalletd` when it hangs during sync tests

* Increase full sync timeout

* Clear the `zebrad` logs during `lightwalletd` tests, to avoid logging deadlocks

* Actually clear more than one line of logs

* Check zebrad and lightwalletd output in parallel threads, while waiting for zebrad

* Check zebrad and lightwalletd output in parallel threads, while waiting for lightwalletd

* Improve test logging

* Fix a log typo

* Only wait for lightwalletd once, because its logs stop after the initial sync

* Look for cached state disks for this commit and branch first

* Only copy the state once in the send transactions test

* Wait longer for lightwalletd gRPC server startup

* Add some function docs

* cargo fmt --all
2022-07-29 07:06:18 +10:00
teor a9fcde3ebf
1. add(ci): Add a Zebra cached state update test, fix lightwalletd tests (#4813)
* Fix clippy::let_and_return

* Increase lightwalletd test timeouts for zebrad slowness

* Add a `zebrad_update_sync()` test, that update syncs Zebra without lightwalletd

* Run the zebrad-update-sync test in CI

* Add extra zebrad time to workaround lightwalletd bugs
2022-07-26 08:13:25 +10:00
dependabot[bot] dc9da24c8b
build(deps): bump tj-actions/changed-files from 23 to 24 (#4807)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 23 to 24.
- [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/v23...v24)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-22 18:23:58 +00:00
teor cf4b2f7a67
feat(verify): Concurrently verify proof and signature batches (#4776)
* Initialize the rayon threadpool with a new config for CPU-bound threads

* Verify proofs and signatures on the rayon thread pool

* Only spawn one concurrent batch per verifier, for now

* Allow tower-batch to queue multiple batches

* Fix up a potentially incorrect comment

* Rename some variables for concurrent batches

* Spawn multiple batches concurrently, without any limits

* Simplify batch worker loop using OptionFuture

* Clear pending batches once they finish

* Stop accepting new items when we're at the concurrent batch limit

* Fail queued requests on drop

* Move pending_items and the batch timer into the worker struct

* Add worker fields to batch trace logs

* Run docker tests on PR series

* During full verification, process 20 blocks concurrently

* Remove an outdated comment about yielding to other tasks
2022-07-18 08:43:29 +10:00
teor c27166013d
Split out Canopy logs into a separate job (#4730) 2022-07-06 22:46:26 +00:00
teor 67dc26fbb5
fix(ci): Split Docker logs into sprout, other checkpoints, and full validation (#4704)
* Checkout zebra in each job to avoid warnings

But put TODOs where we might be able to skip checkouts

* Split log following into sprout checkpoints, sapling/orchard checkpoints, and full validation

* Make job IDs shorter

* Use /dev/stderr because docker doesn't have a tty

* remove pipefail

* Revert "remove pipefail"

This reverts commit a7ee37bebdc107a4215e7dd307b189d925969234.

* Make tee ignore errors writing to a grep pipe

* Avoid launching multiple docker instances for duplicate jobs

* Ignore broken pipe error messages and statuses

* fix(ci): docker wait not finding container

We had this issue before, I can't recall if this was a parsing error between GitHub Actions and gcloud `--command` parsing, but we had to change this into two pieces.

This implementation keeps it how we did it before 9b9578c999/.github/workflows/test.yml (L235-L243)

* docs: remove pending TODO

We can't remove  `actions/checkout` nor set `create_credentials_file` to `false` as next steps won't be able to authenticate to GCP.

We can surely remove `actions/checkout` and leave `create_credentials_file` as `true`, but this will raise a warning on each step, and there's no benefit of doing so.

* Show `docker wait` and `gcloud ssh` output

* If `docker wait` fails, get the exit code using `docker inspect`

Co-authored-by: Conrado Gouvea <conrado@zfnd.org>
Co-authored-by: Gustavo Valverde <gustavo@iterativo.do>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-06-30 10:33:01 +00:00
dependabot[bot] b29b4dbf6c
build(deps): bump reviewdog/action-actionlint from 1.26.0 to 1.27.0 (#4722)
Bumps [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) from 1.26.0 to 1.27.0.
- [Release notes](https://github.com/reviewdog/action-actionlint/releases)
- [Commits](https://github.com/reviewdog/action-actionlint/compare/v1.26.0...v1.27.0)

---
updated-dependencies:
- dependency-name: reviewdog/action-actionlint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-29 23:56:01 +00:00
dependabot[bot] 37e83e44df
build(deps): bump reviewdog/action-actionlint from 1.25.1 to 1.26.0 (#4695)
Bumps [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) from 1.25.1 to 1.26.0.
- [Release notes](https://github.com/reviewdog/action-actionlint/releases)
- [Commits](https://github.com/reviewdog/action-actionlint/compare/v1.25.1...v1.26.0)

---
updated-dependencies:
- dependency-name: reviewdog/action-actionlint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-28 04:01:48 +00:00
teor cbd703b3fc
refactor(ci): Split `docker run` into launch, `logs`, and `wait` (#4690)
* Put arguments to "docker run" on different lines

And update some comments.

* Split docker run into launch, logs, and wait

* Remove mistaken "needs state" condition on log and results job

* Exit the ssh and the job with the container test's exit status
2022-06-28 00:36:18 +00:00
teor b35ab67ef0
fix(ci): Split instance and volume creation out of the test job (#4675)
* Split full sync into checkpoint and full validation

* Sort workflow variables into categories and add descriptions

* Split Create instance/volume and Run test into separate jobs

* Copy initial conditions to all jobs in the series
2022-06-23 23:22:52 +00:00
teor 20850b4cb4
fix(ci): actually create a cached state image after running a sync (#4669)
* Actually create a cached state image

* fix(state): use same disk naming convention for all test instances

Co-authored-by: Gustavo Valverde <gustavo@iterativo.do>
2022-06-22 21:54:37 +00:00
teor 257f017382
fix(ci): Remove redundant build-chain-no-features job (#4656)
* Remove redundant build-chain-no-features

* Remove redundant job from patch file

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Gustavo Valverde <gustavo@iterativo.do>
2022-06-22 11:41:45 +00:00
Gustavo Valverde d2d4f5a67e
fix(build): add `beta` rust to CI (#4637)
* fix(build): add `beta` rust to CI

* fix(ci): remove macos-latest with beta Rust combination
2022-06-22 04:35:18 +00:00
teor 4f4c9c42c9
fix(ci): update OS patch jobs for Rust & feature changes (#4668)
* Update OS patch jobs for Rust & feature changes

* Restore a patch job that is actually deleted in another PR
2022-06-22 01:18:49 +00:00
Gustavo Valverde b6a59a9f66
feat(ci): build each crate individually (#4640)
* feat(ci): build each crate individually

* fix(ci): use valid names for each job

* feat(ci): builds and checks with and without all features

* refactor(ci): build job matrix dinamically

* fix: use a JSON_CRATES variable with resulting values

* test: check-matrix

* fix(ci): use "crate" in singular for reference

* imp(ci): use a matrix for feature build arguments

* fix(ci): use correct naming and includes

* fix(ci): implement most recommendations given in review

* fix(ci): use simpler shell script

* fix: typo

* fix: add string to file, not cmd

* fix: some shellchecks

* fix(ci): remove warnings and errors from shellcheck

* imp(ci): add patch file for `Build crates individually` workflow

* Remove unused configs in patch job

Co-authored-by: teor <teor@riseup.net>
2022-06-21 02:30:45 +00:00
teor 961fcb621e
Add a "Rust doc" patch job (#4654) 2022-06-21 09:30:48 +10:00
Gustavo Valverde 3b3b59f71a
ci(docs): test `cargo doc` warnings and errors (#4635)
* ci(docs): test `cargo doc` warnings and errors

* ci(docs): remove minimal profile

* ci(docs): revert minimal and fix component name

* ci(docs): try cargo doc alone
2022-06-20 02:10:13 +00:00
Gustavo Valverde e1a7a305d2
imp(docs): manage`cargo-mdbook` as a GitHub action (#4636)
* imp(docs): manage`cargo-mdbook` as a GitHub action

* fix(docs): keep mdbook-mermaid
2022-06-17 05:29:50 +00:00
Gustavo Valverde 8160b4c35a
feat(actions): delete old GCP resources (#4598)
* feat(actions): delete old GCP resources

* fix(ci): delete old instances templates

* fix(actions): use correct date arguments and conversion

* fix(actions): missing command in gcloud

* fix(gcp): if an instance can't be deleted, continue

* refacor(action): cleanup and execute monthly
2022-06-15 21:59:55 +00:00
Gustavo Valverde 3ec6bd4c29
ci(lightwalletd): Zebra's Dockerfile needs `latest` lwd image (#4599)
We need to add this condtion to lightwalletd docker build, to always create a `latest` tag when merging to the default branch: `main`
2022-06-13 21:38:18 +00:00
Conrado Gouvea e016bbe8e3
increase lightwalletd timeout, remove testnet tests (#4584)
* increase lightwalletd timeout

* switch back to aditya's fork

* manually point to new aditya's lightwalletd image

* disable sync_one_checkpoint_testnet test

* disable restart_stop_at_height in testnet

* rever to 'latest' lightwalletd image
2022-06-13 20:13:30 +00:00
dependabot[bot] bbf77e53e4
build(deps): bump w9jds/firebase-action from 2.2.0 to 2.2.2 (#4592)
Bumps [w9jds/firebase-action](https://github.com/w9jds/firebase-action) from 2.2.0 to 2.2.2.
- [Release notes](https://github.com/w9jds/firebase-action/releases)
- [Commits](https://github.com/w9jds/firebase-action/compare/v2.2.0...v2.2.2)

---
updated-dependencies:
- dependency-name: w9jds/firebase-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-13 17:24:46 +00:00
dependabot[bot] 45c3d73277
build(deps): bump tj-actions/changed-files from 22 to 23 (#4593)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 22 to 23.
- [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/v22...v23)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-13 17:24:27 +00:00
dependabot[bot] 3985bd151e
build(deps): bump w9jds/firebase-action from 2.1.2 to 2.2.0 (#4588)
Bumps [w9jds/firebase-action](https://github.com/w9jds/firebase-action) from 2.1.2 to 2.2.0.
- [Release notes](https://github.com/w9jds/firebase-action/releases)
- [Commits](https://github.com/w9jds/firebase-action/compare/v2.1.2...v2.2.0)

---
updated-dependencies:
- dependency-name: w9jds/firebase-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-10 19:46:19 +00:00
teor 61afd02a98
fix(ci): test RPCs with zcash/lightwalletd, to fix post-NU5 failures in adityapk00/lightwalletd (#4553)
* Remove a duplicate lightwalletd error message

* Reactivate some error messages that have been fixed

* Fix confusing lightwalletd cached state path logs

* Add the gRPC tests to the lightwalletd test suite function

* Make test regexes compatible with zcash/lightwalletd

* Add logging to gRPC tests

* Switch to zcash/lightwalletd for testing
2022-06-01 07:36:59 -04:00
dependabot[bot] a92bce352e
build(deps): bump tj-actions/changed-files from 21 to 22 (#4541)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 21 to 22.
- [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/v21...v22)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-01 11:30:42 +00:00
teor ca0520b2e8
change(deps): Upgrade tracing-subscriber and related dependencies (#4517)
* Upgrade tracing and related dependencies

```sh
cargo upgrade --workspace
tracing-error
tracing-subscrber

color-eyre

tracing-flame
tracing-journald

sentry
sentry-tracing

metrics
metrics-exporter-prometheus
reqwest
```

* Update duplicate dependency checks

* Enable the tracing/env-filter feature

* Fix type inference for metrics

Manual changes, plus:
```sh
fastmod "as _" "as f64"
```

* Tidy up some unrelated test code

* Update metrics-exporter-prometheus API

And make unused dependencies optional.

* Adjust test regexes to new tracing format

Also fix some regex bugs, and refactor to simplify.

* Disable color-eyre span traces and track caller in release builds

* Add a feature that enables extra debugging in release builds

* Clean up some redundant features

* Increase a test timeout
2022-06-01 13:53:51 +10:00
dependabot[bot] bfa319de10
build(deps): bump tj-actions/changed-files from 20 to 21 (#4510)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 20 to 21.
- [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/v20...v21)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-05-30 21:59:49 +00:00
Dimitris Apostolou b4eb7b9509
Fix typo (#4527) 2022-05-30 11:59:34 +10:00
teor c50ee7e478
fix(ci): Add lightwalletd gRPC, clippy, rustfmt patch jobs (#4518)
* Add lightwalletd-grpc-test patch job

* Patch Clippy and Rustfmt CI jobs

* Only run docker always patches on PRs

* Only run docker patches on PRs
2022-05-27 14:49:22 +10:00
Alfredo Garcia 49997621ea
feat(ci): add grpc tests to CI (#4453)
* add CI for `lightwalletd_wallet_grpc_tests`

Co-authored-by: Gustavo Valverde <gustavo@iterativo.do>
2022-05-26 11:38:00 +00:00
Gustavo Valverde 374fb7b34f
refactor(ci): allow more time for tests to end gracefully (#4469)
* refactor(ci): keep tests jobs under the 6 hour timeout

When running a full sync or any other test which takes almost 5 hours, having those jobs running with other actions that might take several minutes, also reduces the overall time from the job_id.

We use a separate job for image creation and deletion to handle this cases.

* fix(ci): instance deletion can't run on non finished tests

* fix(ci): tests without a cached state might save to disk

* fix(ci): ignore failures when deleting an instance

* fix(ci): remove delete step `needs` redundancy

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-05-26 06:12:45 +00:00
Deirdre Connolly 9e590839ff
change(ci): run coverage on stable (#4465)
* Run coverage on stable

* Update .github/workflows/coverage.yml

Co-authored-by: teor <teor@riseup.net>

* fix(ci): sync patch file

* fix(ci): timeout and docs

Co-authored-by: teor <teor@riseup.net>
Co-authored-by: Gustavo Valverde <gustavo@iterativo.do>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-05-26 00:28:02 +00:00
Gustavo Valverde 0e2831dfb1
feat(ci): add a codespell linting action (#4482)
* feat(ci): add a codespell linting action

* fix(ci): run this job if the lint workflow is changed

* ci(codespell): add configuration file

* ci(codespell): exclude mermaid.min.js

* fix: wrong mermaid.min.js location

* ci(codespell): Sur from "Big Sur" is being considered as misspelled

* ci(codespell): make warning the max level

This won't restrict PRs from merging

* ci(codespell): lint on every push

* test: create a misspelling

* Revert "test: create a misspelling"

This reverts commit a2c91cda1e.
2022-05-26 00:27:44 +00:00
teor a6aa4398f4
Always run patch jobs that depend on cached cloud disks (#4496) 2022-05-25 22:19:40 +00:00
Gustavo Valverde abef3842ce
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
2022-05-25 11:39:03 -04:00
dependabot[bot] e4ca6c358e
build(deps): bump reviewdog/action-actionlint from 1.25.0 to 1.25.1 (#4479)
Bumps [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) from 1.25.0 to 1.25.1.
- [Release notes](https://github.com/reviewdog/action-actionlint/releases)
- [Commits](https://github.com/reviewdog/action-actionlint/compare/v1.25.0...v1.25.1)

---
updated-dependencies:
- dependency-name: reviewdog/action-actionlint
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-24 19:16:31 +00:00
dependabot[bot] 703e621734
build(deps): bump google-github-actions/auth from 0.7.3 to 0.8.0 (#4478)
Bumps [google-github-actions/auth](https://github.com/google-github-actions/auth) from 0.7.3 to 0.8.0.
- [Release notes](https://github.com/google-github-actions/auth/releases)
- [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/auth/compare/v0.7.3...v0.8.0)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-24 19:16:18 +00:00
Gustavo Valverde 9335f68409
fix(ci): set a network env variable to be used in `get-available-disks` (#4477)
* fix(ci): set a network env variable to be used in `get-available-disks`

* docs(ci): improve comment
2022-05-24 14:59:31 -04:00
teor 92736807a2
Increase clippy timeout (#4472) 2022-05-24 09:03:56 +00:00
teor 49406f3132
fix(ci): Temporarily finish full sync at 99% (#4457)
* Finish full sync at 99.5%

* Finish full sync test harness at 99.5%

* Try 99.2% instead

* Try 99%
2022-05-24 17:59:09 +10:00
teor c006772180
fix(ci): Make reusable workflow job names match patch job names (#4466)
* Add blank names to reusable workflow jobs

* Give each job a proper name

* Update patch job names

* Remove unnecessary quotes
2022-05-24 03:10:53 +00:00
teor 878875cca1
fix(ci): Update docker patch jobs for recent changes (#4460)
* Update continous-integration-docker.patch for recent changes

* Remove trailing whitespace
2022-05-23 10:04:07 +00:00
teor 712ef40438
3. Require network names in cached state disk names (#4392)
* Require a cached state rebuild if the state version changes

* Find cached state disks with the same state version

And prefer `main` to other branches.

* Tweak filters to make them more specific

* Try adding inner quotes

* Try brackets instead

* Try two filters, rather than three

* Use Mainnet as the default network, remove duplicate env var

* Match the exact disk name format in one regular expression

* Log the exact expected disk name, including the network

* Consistently use CACHED_DISK_NAME as the env var name

* Temporary allow missing $NETWORK in disk names

* Print the exact search string

* Debug log the search string

* Use a generic alphabetical pattern rather than a regex group

Google Cloud doesn't seem to support regex groups.

* Add network name to disk match docs

* Fix the logged network name

* Make jobs that use cached state wait for state rebuilds

* Run jobs that need cached state even if the rebuild was skipped

* Fix missing dependencies

And update a TODO

* Revert "Use a generic alphabetical pattern rather than a regex group"

This reverts commit 970afe7b17.

* Revert "Temporary allow missing $NETWORK in disk names"

This reverts commit f1f66500c3.

* Make jobs that use cached state wait for state rebuilds

* Run jobs that need cached state even if the rebuild was skipped

* Fix missing dependencies

And update a TODO

* refactor(ci): look for available disks instead of files changed

This ensure that if the constants.rs file was changed, we search for disks available in the whole repository with the same state.

If there's no disk available a rebuild is triggered depending the missing disk. And if there's a disk available, tests are run with this one.

* fix(ci): lwd syncs needs to wait for zebra disk rebuild

* docs(ci): use better comments on integration tests

* fix(ci): we must authenticate to GCP to find disks

* fix(ci): add needed permissions for google auth

* fix(ci): the output needs to be echoed

* imp(ci): reduce diff with main

* fix(ci): remove redundant dependency

Co-authored-by: teor <teor@riseup.net>

* fix(ci): also add `false` to the JSON object output

* fix(ci): hasty copy/paste

* fix(ci): standardize comments

* fix(ci): run disk rebuilds if no disk was found

* fix(ci): build on any event if a cached disk is not found

* fix(ci): reduce diff with main

* docs(ci): reduce main diff

* fix(ci): sync .patch file with changes on the workflow

* fix(ci): consider network changes in new get-available-disks

* force GHA trigger

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
Co-authored-by: Gustavo Valverde <gustavo@iterativo.do>
2022-05-20 00:44:11 +00:00
dependabot[bot] 1c10f40b29
build(deps): bump w9jds/firebase-action from 2.1.0 to 2.1.2 (#4431)
Bumps [w9jds/firebase-action](https://github.com/w9jds/firebase-action) from 2.1.0 to 2.1.2.
- [Release notes](https://github.com/w9jds/firebase-action/releases)
- [Commits](https://github.com/w9jds/firebase-action/compare/v2.1.0...v2.1.2)

---
updated-dependencies:
- dependency-name: w9jds/firebase-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-19 23:55:48 +00:00
dependabot[bot] 776e018ab4
build(deps): bump reviewdog/action-actionlint from 1.24.0 to 1.25.0 (#4432)
Bumps [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) from 1.24.0 to 1.25.0.
- [Release notes](https://github.com/reviewdog/action-actionlint/releases)
- [Commits](https://github.com/reviewdog/action-actionlint/compare/v1.24.0...v1.25.0)

---
updated-dependencies:
- dependency-name: reviewdog/action-actionlint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-19 23:55:37 +00:00
teor e2890636a9
1. fix(ci): rebuild cached state before running cached state tests (#4385)
* Make jobs that use cached state wait for state rebuilds

* Run jobs that need cached state even if the rebuild was skipped

* Fix missing dependencies

And update a TODO

* refactor(ci): look for available disks instead of files changed

This ensure that if the constants.rs file was changed, we search for disks available in the whole repository with the same state.

If there's no disk available a rebuild is triggered depending the missing disk. And if there's a disk available, tests are run with this one.

* fix(ci): lwd syncs needs to wait for zebra disk rebuild

* docs(ci): use better comments on integration tests

* fix(ci): we must authenticate to GCP to find disks

* fix(ci): add needed permissions for google auth

* fix(ci): the output needs to be echoed

* imp(ci): reduce diff with main

* fix(ci): remove redundant dependency

Co-authored-by: teor <teor@riseup.net>

* fix(ci): also add `false` to the JSON object output

* fix(ci): hasty copy/paste

* fix(ci): standardize comments

* fix(ci): run disk rebuilds if no disk was found

* fix(ci): build on any event if a cached disk is not found

* fix(ci): sync .patch file with changes on the workflow

Co-authored-by: Gustavo Valverde <gustavo@iterativo.do>
2022-05-19 23:07:28 +00:00
teor 5702b4cc99
Update Cargo.lock check in continous-integration-os.patch.yml (#4428) 2022-05-19 02:43:08 +00:00
dependabot[bot] 2d7b7c2c5b
build(deps): bump google-github-actions/auth from 0.7.2 to 0.7.3 (#4419)
Bumps [google-github-actions/auth](https://github.com/google-github-actions/auth) from 0.7.2 to 0.7.3.
- [Release notes](https://github.com/google-github-actions/auth/releases)
- [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/auth/compare/v0.7.2...v0.7.3)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-18 21:38:39 +00:00
dependabot[bot] acccb9896c
build(deps): bump google-github-actions/auth from 0.7.1 to 0.7.2 (#4404)
Bumps [google-github-actions/auth](https://github.com/google-github-actions/auth) from 0.7.1 to 0.7.2.
- [Release notes](https://github.com/google-github-actions/auth/releases)
- [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/auth/compare/v0.7.1...v0.7.2)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-17 20:28:38 +00:00
dependabot[bot] ce84cdaada
build(deps): bump tj-actions/changed-files from 19 to 20 (#4403)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 19 to 20.
- [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/v19...v20)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-17 20:28:20 +00:00
dependabot[bot] 2f636bf046
build(deps): bump w9jds/firebase-action from 2.0.0 to 2.1.0 (#4402)
Bumps [w9jds/firebase-action](https://github.com/w9jds/firebase-action) from 2.0.0 to 2.1.0.
- [Release notes](https://github.com/w9jds/firebase-action/releases)
- [Commits](https://github.com/w9jds/firebase-action/compare/v2.0.0...v2.1.0)

---
updated-dependencies:
- dependency-name: w9jds/firebase-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-16 22:14:21 +00:00
Dimitris Apostolou 59ae77d04b
Fix typos (#4397) 2022-05-16 05:33:08 +00:00
teor 434044206c
Revert "Temporarily use an earlier lightwalletd version" (#4398)
This reverts commit f71a1f5d19.
2022-05-15 23:16:10 -04:00
teor 94ba4b46a2
change(test): Require cached lightwalletd state for the send transaction tests (#4303)
* Revert "Temporarily stop requiring cached lightwalletd state for the send transaction tests"

This reverts commit f6b29b151e.

* fix(ci): add a lightwalletd cached state to the test

Co-authored-by: Gustavo Valverde <gustavo@iterativo.do>
2022-05-13 23:01:31 +00:00
Gustavo Valverde 77529a8cbd
feat(ci): add `lightwalletd_update_sync` test to CI (#4269)
* fix(ci): lwd state condition

* fix(ci): differentiate tests that need a lwd cached state

* fix(ci): use the right state and save name for each test

* docs(ci): minor comment fixes

* docs(ci): better input description

* fix(ci): end `if` condition correctly

* fix(images): pass the state version to following steps

* fix(ci): $needs_lwd_state condition was inverted

* fix(ci): reduce disk selection code

* docs(ci): better disk search conditional explanation

* fix(ci): end if condition correctly

* fix(ci): evaluate $needs_zebra_state correctly

* fix(ci): use nested condition for readability

* fix(ci): disk search was using the wrong variable
2022-05-13 18:02:05 -04:00
Gustavo Valverde e3a65d86e0
feat(ci): add `lightwalletd_full_sync` test to CI (#4268)
* Temporarily use an earlier lightwalletd version

This checks if commit
e146dbf5c2
contains a mempool refresh deadlock bug.

* Actually rebuild the lightwalletd image

* Delete an unfinished comment

* Remove duplicate test in entrypoint.sh

* Keep a recent change to make tests consistent

* fix(ci): remove not used variable `lwd_state_dir`

* fix(ci): state wast not being added to the image name

* fix(ci): mount a docker volume with lightwalletd dir

If the volume doesn't mount this lwd cached state dir, the content won't be saved to the mounted disk in the VM

* fix(ci): lwd state condition

* docs(ci): explain disk mounting logic

* docs(ci): explain disk mounting decision better

* docs(ci): add a description for confusing input names

Co-authored-by: teor <teor@riseup.net>
2022-05-13 15:20:17 +00:00
teor d0ef9b3dc0
0. fix(ci): only use cached state disks with the same state version (#4391)
* Require a cached state rebuild if the state version changes

* Find cached state disks with the same state version

And prefer `main` to other branches.

* Tweak filters to make them more specific

* Try adding inner quotes

* Try brackets instead

* Try two filters, rather than three

* Use Mainnet as the default network, remove duplicate env var

* Match the exact disk name format in one regular expression

* Log the exact expected disk name, including the network

* Consistently use CACHED_DISK_NAME as the env var name

* Temporary allow missing $NETWORK in disk names

* Print the exact search string

* Debug log the search string

* Use a generic alphabetical pattern rather than a regex group

Google Cloud doesn't seem to support regex groups.

* Add network name to disk match docs

* Fix the logged network name

* imp(ci): remove gcp verbose log

Co-authored-by: Gustavo Valverde <gustavo@iterativo.do>
2022-05-13 03:07:37 +00:00
teor f789f8aaa7
fix(ci): make test selection and logging consistent (#4375)
* fix(ci): sentry is not longer being activated in test builds

This removes sentry from all the test execution, as some tests might fail as sentry wasn't initially built, or it might take more time to build as it will have to build with sentry.

* fix(build): workaround the failed to fetch oauth token error

* Drop sentry dependencies when enable-sentry feature is disabled

* Make lightwalletd gRPC tests depend on a new lightwalletd-grpc-tests feature

* fix(ci): remove enable-sentry feature from tests

* Add lightwalletd-grpc-tests feature for functionality or efficiency

And document where it is just used to stop re-compilations.

* Remove redundant `cmake` and `protobuf-compiler` dependencies

* Document Zebra's optional production and test feature flags

* Minimise dependencies in zcash-params/Dockerfile

* Minimise dependencies in docker/Dockerfile

* Add a workflow TODO

* Catch more errors in entrypoint.sh

Also makes entrypoint.sh compatible with more distributions

* Remove unnecessary quoting in entrypoint.sh

* Use exactly the same arguments to call CI tests

* Remove a redundant CI build

* Rename Cargo.lock check job

Co-authored-by: Gustavo Valverde <gustavo@iterativo.do>
2022-05-11 23:41:33 +00:00
teor f7a3a0f6bc
fix(build): put gRPC tests behind an optional feature flag to fix production build issues (#4369)
* fix(ci): sentry is not longer being activated in test builds

This removes sentry from all the test execution, as some tests might fail as sentry wasn't initially built, or it might take more time to build as it will have to build with sentry.

* fix(build): workaround the failed to fetch oauth token error

* Drop sentry dependencies when enable-sentry feature is disabled

* Make lightwalletd gRPC tests depend on a new lightwalletd-grpc-tests feature

* fix(ci): remove enable-sentry feature from tests

* Add lightwalletd-grpc-tests feature for functionality or efficiency

And document where it is just used to stop re-compilations.

* Remove redundant `cmake` and `protobuf-compiler` dependencies

* Document Zebra's optional production and test feature flags

* Minimise dependencies in zcash-params/Dockerfile

* Minimise dependencies in docker/Dockerfile

* Add a workflow TODO

Co-authored-by: Gustavo Valverde <gustavo@iterativo.do>
2022-05-11 14:06:58 +00:00
Gustavo Valverde 06f58fba95
fix(ci): allow builds over 1 hour and tests without the sentry feature (#4370)
* fix(ci): sentry is not longer being activated in test builds

This removes sentry from all the test execution, as some tests might fail as sentry wasn't initially built, or it might take more time to build as it will have to build with sentry.

* fix(build): workaround the failed to fetch oauth token error
2022-05-11 02:26:39 +00:00
Gustavo Valverde 93e158936e
refactor(build): deprecate gcr.io as a registry and build faster (#4298)
* refactor(build): use better stage naming and document it

* refactort(build): use multiple cache sources

* docs(build): add a comment for cache

* fix(build): remove gcr.io as it does not supports OCI images
2022-05-10 17:00:09 -04:00
Gustavo Valverde 7262211bdf
fix(ci): wrong file being referenced by CI (#4364) 2022-05-10 03:28:07 +00:00
Conrado Gouvea a3eed2daad
fix(doc): add support for Mermaid to render graphs (#4359) 2022-05-09 20:29:49 +00:00
Gustavo Valverde 228f16be50
refactor(actions): rename workflow files (#3941)
* refactor(actions): rename workflow files

* refactor(worflows): change files according new approach
2022-05-09 15:54:16 -04:00
dependabot[bot] 7fccd6b9ee
build(deps): bump docker/setup-qemu-action from 1 to 2 (#4347)
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 1 to 2.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-06 11:37:46 -04:00
dependabot[bot] 34dfc30910
build(deps): bump docker/login-action from 1.14.1 to 2.0.0 (#4346)
Bumps [docker/login-action](https://github.com/docker/login-action) from 1.14.1 to 2.0.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v1.14.1...v2.0.0)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-06 11:37:37 -04:00
dependabot[bot] 4976886a49
build(deps): bump docker/build-push-action from 2.10.0 to 3.0.0 (#4345)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2.10.0 to 3.0.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v2.10.0...v3.0.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-06 11:37:22 -04:00
dependabot[bot] a31c23432d
build(deps): bump docker/setup-buildx-action from 1 to 2 (#4344)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1 to 2.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-06 11:37:06 -04:00
dependabot[bot] 91c0393727
build(deps): bump docker/metadata-action from 3.8.0 to 4.0.1 (#4319)
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 3.8.0 to 4.0.1.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Upgrade guide](https://github.com/docker/metadata-action/blob/master/UPGRADE.md)
- [Commits](https://github.com/docker/metadata-action/compare/v3.8.0...v4.0.1)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-06 10:06:13 -04:00
Gustavo Valverde 9226adea97
feat(ci): add `sending_transactions_using_lightwalletd` test to CI (#4267)
* feat(ci): add lightwalletd_*_sync tests to CI

* feat(ci): add lightwalletd RPC call test

* feat(ci): add send transactions test with lwd to CI

* fix(ci): create a variable to run transactions test

* refactor(ci): use docker in docker

This is a workaround for an issue related to disk partitioning, caused by a GCP service called Konlet, while mounting the cached disks to the VM and then to the container

* fix(build): persist docker login credentials

* fix(ci): get sync height from docker logs instead of gcp

* try: use gha cache for faster building

* fix(ci): mount disk in container to make it available in vm

* fix(build): do not invalidate cache between images

* try(docker): invalidate cache as less as possible

* fix(ci): GHA terminal is not a TTY

* fix(build): do not ignore entrypoint.sh

* fix

* fix(ci): mount using root priveleges

* fix(ci): use existing disk as cached state

* fix(ci): wait for disks to get mounted

* force rebuild

* fix failed force

* fix failed commit

* WIP

* fix(ci): some tests does not use a cached state

* wip

* refactor(ci): disk names and job segregation

* fix(ci): do not name boot and attached disk the same

* fix(ci): attach a disk to full sync, to snapshot the state

* fix(ci): use correct disk implementations

* fix(ci): use different disk name to allow test concurrency

* feat(ci): add lightwalledt send transaction test

* cleanup(ci): remove extra tests

* fix(ci): allow disk concurrency with tests

* fix(ci): add considerations for different tests

* fix(reusable): last fixes

* feat(ci): use reusable workflow for tests

* fix(rw): remove nested worflow

* fix(rw): minor fixes

* force rebuild

* fix(rw): do not use an input as job name

* fix(rw): remove variable id

* fix(ci): remove explicit conditions and id

* fix(ci): docker does not need the variable sign ($) to work

* fix(ci): mount typo

* fix(ci): if a sync fails, always delete the instance

This also reduces the amount of jobs needed.

* refactor(ci): make all test depend on the same build

* fix(ci): some tests require multiple variables

* fix(docker): variable substitution

* fix(ci): allow to run multiple commits from a PR at once

* fix(docker): lower the NETWORK env var for test names

* reduce uneeded diff

* imp(keys): use better naming for builds_disks

* imp(ci): use input defaults

* imp(ci): remove test_name in favor of test_id

* fix(ci): better key naming

* fix(ci): long disk names breaks GCP naming convention

* feat(ci): validate local state version with cached state

* fix(ci): add condition to run tests

* fix: typo

* fix: app_name should not be required

* fix: zebra_state_path shouldn't be required

* fix: reduce diff

* fix(ci): checkout to grep local state version

* Update .github/workflows/test.yml

Co-authored-by: teor <teor@riseup.net>

* revert: merge all tests into a single workflow

* Remove unused STATE_VERSION env var

* fix: minor fixes

* fix(ci): make test.patch the same as test

* fix(ci): negate the input value

* imp(ci): better cached state conditional handling

* imp(ci): exit code is captured by `docker run`

* fix(deploy): mount disks with better write performance

* fix(ci): change sync id to a broader id name

* fix(ci): use correct input validation

* fix(ci): do not make test with cached state dependant on other

* imp(ci): organiza keys better

* fix(ci): use appropiate naming

* fix(ci): create docker volume before mounting

* fix(lint): do not fail on all new changes

* imp(ci): do not report in pr review

* fix(ci): partition clean disks

* fix: typo

* fix: test called the wrong way

* fix(build): stop using gha cache

* ref(ci): validate run condition before calling reusable workflow

* fix(ci): use a better filesystem dir and fix other values

* fix: linting errors

* fix(ci): typo

* Revert "fix(build): stop using gha cache"

This reverts commit a8fbc5f416.

Cache expiration is a lesser evil than not using caching at all and then failing with a 401

* imp(ci): do not set a default for needs_zebra_state

* Update .github/workflows/test.yml

Co-authored-by: teor <teor@riseup.net>

* fix(deps): remove dependencies

* force build

* Update .github/workflows/test.yml

Co-authored-by: teor <teor@riseup.net>

* fix(docker): add RUST_LOG as an ARG and ENV

* fix(test): add `#[ignore]` to send transactions test

This test needs state then it should be marked as #[ignore]

* fix(ci): differentiate between root cache path and its dir

* Remove extra `state` directory

That was a workaround for an issue that has been fixed.

* imp(docs): use better test descriptions

Co-authored-by: teor <teor@riseup.net>

* fix: reduce unwanted diff with main

* fix(ci): make lwd conditions consistent

* Remove another extra `state` directory

Was also part of a workaround for an issue that has been fixed.

* fix(ci): use better conditionals to run test jobs

Co-authored-by: teor <teor@riseup.net>

* Tweak to support different lightwalletd versions

Some versions print `Waiting for block`, and some versions print
`Ingestor waiting for block`.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: teor <teor@riseup.net>
Co-authored-by: Janito Vaqueiro Ferreira Filho <janito.vff@gmail.com>
2022-05-06 05:30:38 +00:00
teor b008509a9e
Skip tests when doing a manual full sycn (#4333)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-05-06 02:08:41 +00:00
teor da232ec224
Update cached state conditions and docs (#4332) 2022-05-06 07:52:56 +10:00
Gustavo Valverde 322f68d81a
fix(ci): run tests according to the right conditions (#4313) 2022-05-05 18:04:51 +00:00
Gustavo Valverde 55a73c554c
fix(lint): stop actionlint from failing in main (#4317) 2022-05-05 07:18:27 -04:00
Gustavo Valverde e72260db52
fix(ci): add cached state version to disk images (#4314) 2022-05-05 07:10:50 -04:00
Gustavo Valverde 9856e2ad17
refactor(lint): check specific files for each job (#4311)
* refactor(lint): check specific files for each job

* refactor(lint): use an approach which requires less code

* fix(lint): validate against true string not boolean
2022-05-05 07:09:21 -04:00
Gustavo Valverde a23420be88
feat(ci): add `fully_synced_rpc_test` test to CI (#4223)
* feat(ci): add lightwalletd RPC call test

Co-authored-by: teor <teor@riseup.net>
2022-05-05 05:27:07 -04:00
Gustavo Valverde 9c94c0d6e4
feat(ci)!: add a reusable workflow for deployable integration tests (#4271)
Co-authored-by: teor <teor@riseup.net>
2022-05-04 18:55:02 -04:00
Deirdre Connolly 239230989d
feat(ci): clarify lint workflow names (#4279)
* Lint workflow names

* Rename lint.patch.yml display name to Lint, add stub for Actionlint
2022-05-03 17:17:58 +00:00
Gustavo Valverde 8b68651ba8
fix(build): avoid docker cache contamination and invalidation (#4254)
* imp(build): reduce docker cache invalidation

Use scoped caching and more file ignores to reduce cache invalidation

* fix(build): add entrypoint.sh as a required file

* fix(build): do not logout if the build takes too long

* Add 'doc comment' about .dockerignore

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
2022-05-03 10:13:28 -04:00
Gustavo Valverde 93f40fd0ba
fix(ci): typo causing docker run command to split (#4277) 2022-05-03 08:00:10 -04:00
Gustavo Valverde 6331722c12
fix(ci): use debian for faster mounting, and increase timeout (#4276) 2022-05-03 06:49:24 -04:00
Gustavo Valverde 9b9578c999
refactor(ci): use docker instead of Konlet for GCP deployments in CI (#4252)
* refactor(ci): use docker in docker

This is a workaround for an issue related to disk partitioning, caused by a GCP service called Konlet, while mounting the cached disks to the VM and then to the container

* fix(build): persist docker login credentials

* fix(ci): get sync height from docker logs instead of gcp

* try: use gha cache for faster building

* fix(ci): mount disk in container to make it available in vm

* fix(build): do not invalidate cache between images

* try(docker): invalidate cache as less as possible

* fix(ci): GHA terminal is not a TTY

* fix(build): do not ignore entrypoint.sh

* fix

* fix(ci): mount using root priveleges

* fix(ci): use existing disk as cached state

* fix(ci): wait for disks to get mounted

* force rebuild

* fix failed force

* fix(ci): some tests does not use a cached state

* fix(ci): do not name boot and attached disk the same

* fix(ci): attach a disk to full sync, to snapshot the state

* fix(ci): use appropiate grep text depending on the test

* reduce diff

* fix(ci): use correct GCP disk source attribute

* imp(ci): reduce diff

* fix(ci): revert wrong deletion

* fix: revert uneeded changes

* fix: reduce main diff

* fix

* fix(ci): reduce diff
2022-05-03 02:47:04 +00:00
Gustavo Valverde fe97e14fe8
fix(ci): create a full sync disk with cached state inside (#4266) 2022-05-02 21:28:33 -04:00
Gustavo Valverde b3bccd6655
fix(ci): garbage collect instances no matter previous steps status (#4255)
* fix(ci): garbage collect instances no matter the status

As we're not going to reuse test instances, the safest method to apply is to always delete this instances if they fail, get skipped or succeed running a workflow

* Apply suggestions from code review

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>

* docs(ci): imrpove comment

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
2022-05-01 16:52:57 +00:00
teor 23ff00b246
Increase deploy docs job timeout (#4246) 2022-04-28 22:01:23 +00:00
dependabot[bot] a922688947
build(deps): bump docker/metadata-action from 3.7.0 to 3.8.0 (#4241)
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 3.7.0 to 3.8.0.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](https://github.com/docker/metadata-action/compare/v3.7.0...v3.8.0)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-28 17:54:48 +00:00
dependabot[bot] 646bedbdb6
build(deps): bump tj-actions/changed-files from 18.7 to 19 (#4240)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 18.7 to 19.
- [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/v18.7...v19)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-28 17:54:28 +00:00
Gustavo Valverde 83d26890f5
feat(ci)!: implement reusable workflows for image building (#4173)
* refactor(ci): test building in a separate workflow

* force a change

* force a change

* fix(ci): send the correct variables to the reusable build

* fix(ci): variables are not allowed

* fix(ci): conditions are not allowed as input

* fix(ci): use expected value

* refactor(build): simplify the use of other dockerfiles

* fix(cd): depend on docker build yml

* fix(cd): use main branch as image name

* imp(actions): remove uneeded variable repetition

* imp(build): remove unused variables

* imp(actions): rename the image building workflow

Not all images are for zebra execution as we also have one for zcash-params

* fix(ci): add dependable workflow in paths filters

* docs(ci): remove TODO as this won't be needed at least an issue arises

* docs(ci): CARGO_INCREMENTAL can decrease build time when running from a cache

* fix: revert forced changes

* fix(build): remove unused build inputs in zcash-params

* imp(cd): as this is the production image, use the executable name

* imp(ci): reduce log level to improve speed

Co-authored-by: teor <teor@riseup.net>

* imp(ci): use the correct name for the workflow

Co-authored-by: teor <teor@riseup.net>

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: teor <teor@riseup.net>
2022-04-28 08:13:35 +00:00