Skip to content

Commit

Permalink
imp(test): turn on full backtraces and disable frame filtering (#3763)
Browse files Browse the repository at this point in the history
* imp(test): turn on full backtraces and disable frame filtering

* imp(verbosity): add RUST_LIB_BACKTRACE

We also need `RUST_LIB_BACKTRACE` as stated in:
https://docs.rs/color-eyre/latest/color_eyre/#multiple-report-format-verbosity-levels
https://doc.rust-lang.org/std/backtrace/index.html#environment-variables

Co-authored-by: teor <[email protected]>

* fix(verbosity): add missing instances for RUST_BACKTRACE, RUST_LIB_BACKTRACE and COLORBT_SHOW_HIDDEN

Co-authored-by: teor <[email protected]>
  • Loading branch information
gustavovalverde and teor2345 authored Mar 8, 2022
1 parent 0e0aefa commit 3923c3d
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ on:
env:
CARGO_INCREMENTAL: 0
RUST_BACKTRACE: full
RUST_LIB_BACKTRACE: full
COLORBT_SHOW_HIDDEN: '1'

jobs:
test:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ on:
env:
CARGO_INCREMENTAL: 0
RUST_BACKTRACE: full
RUST_LIB_BACKTRACE: full
COLORBT_SHOW_HIDDEN: '1'

jobs:
coverage:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ on:
env:
CARGO_INCREMENTAL: 0
RUST_BACKTRACE: full
RUST_LIB_BACKTRACE: full
COLORBT_SHOW_HIDDEN: '1'

jobs:
clippy:
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/test-full-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ on:
env:
CARGO_INCREMENTAL: '1'
ZEBRA_SKIP_IPV6_TESTS: "1"
RUST_BACKTRACE: full
RUST_LIB_BACKTRACE: full
COLORBT_SHOW_HIDDEN: '1'
NETWORK: Mainnet
PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
GAR_BASE: us-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/zebra
Expand Down Expand Up @@ -101,7 +104,9 @@ jobs:
build-args: |
NETWORK=${{ github.event.inputs.network || env.NETWORK }}
SHORT_SHA=${{ env.GITHUB_SHA_SHORT }}
RUST_BACKTRACE=full
RUST_BACKTRACE=${{ env.RUST_BACKTRACE }}
RUST_LIB_BACKTRACE=${{ env.RUST_LIB_BACKTRACE }}
COLORBT_SHOW_HIDDEN=${{ env.COLORBT_SHOW_HIDDEN }}
ZEBRA_SKIP_NETWORK_TESTS="1"
CHECKPOINT_SYNC=${{ github.event.inputs.checkpoint_sync || true }}
RUST_LOG=debug
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ on:
env:
CARGO_INCREMENTAL: '1'
ZEBRA_SKIP_IPV6_TESTS: "1"
RUST_BACKTRACE: full
RUST_LIB_BACKTRACE: full
COLORBT_SHOW_HIDDEN: '1'
NETWORK: Mainnet
PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
GAR_BASE: us-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/zebra
Expand Down Expand Up @@ -102,7 +105,9 @@ jobs:
build-args: |
NETWORK=${{ github.event.inputs.network || env.NETWORK }}
SHORT_SHA=${{ env.GITHUB_SHA_SHORT }}
RUST_BACKTRACE=full
RUST_BACKTRACE=${{ env.RUST_BACKTRACE }}
RUST_LIB_BACKTRACE=${{ env.RUST_LIB_BACKTRACE }}
COLORBT_SHOW_HIDDEN=${{ env.COLORBT_SHOW_HIDDEN }}
ZEBRA_SKIP_NETWORK_TESTS="1"
CHECKPOINT_SYNC=${{ github.event.inputs.checkpoint_sync || true }}
RUST_LOG=debug
Expand Down
8 changes: 7 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,13 @@ ENV CARGO_HOME /app/.cargo/
RUN cargo chef cook --release --features enable-sentry --recipe-path recipe.json

ARG RUST_BACKTRACE
ENV RUST_BACKTRACE ${RUST_BACKTRACE:-1}
ENV RUST_BACKTRACE ${RUST_BACKTRACE:-0}

ARG RUST_LIB_BACKTRACE
ENV RUST_LIB_BACKTRACE ${RUST_LIB_BACKTRACE:-0}

ARG COLORBT_SHOW_HIDDEN
ENV COLORBT_SHOW_HIDDEN ${COLORBT_SHOW_HIDDEN:-0}

# Skip IPv6 tests by default, as some CI environment don't have IPv6 available
ARG ZEBRA_SKIP_IPV6_TESTS
Expand Down
8 changes: 7 additions & 1 deletion docker/zcash-params/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,15 @@ ENV CARGO_HOME /app/.cargo/
# Build dependencies - this is the caching Docker layer!
RUN cargo chef cook --release --features enable-sentry --recipe-path recipe.json

ARG RUST_BACKTRACE=1
ARG RUST_BACKTRACE=0
ENV RUST_BACKTRACE ${RUST_BACKTRACE}

ARG RUST_LIB_BACKTRACE=0
ENV RUST_LIB_BACKTRACE ${RUST_LIB_BACKTRACE}

ARG COLORBT_SHOW_HIDDEN=0
ENV COLORBT_SHOW_HIDDEN ${COLORBT_SHOW_HIDDEN}

COPY . .
# Pre-download Zcash Sprout and Sapling parameters
RUN cargo run --locked --release --features enable-sentry --bin zebrad download

0 comments on commit 3923c3d

Please sign in to comment.