Commit Graph

16 Commits

Author SHA1 Message Date
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 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
Dimitris Apostolou b4eb7b9509
Fix typo (#4527) 2022-05-30 11:59:34 +10: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
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] 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
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] 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
Dimitris Apostolou 59ae77d04b
Fix typos (#4397) 2022-05-16 05:33:08 +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
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