Skip to content

Commit 4d46d9e

Browse files
authored
CI - RUST_BACKTRACE=full (#5146)
# Description of Changes Set `RUST_BACKTRACE=full` for the CI jobs. # API and ABI breaking changes None # Expected complexity level and risk 1 # Testing None --------- Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
1 parent 14e691b commit 4d46d9e

2 files changed

Lines changed: 37 additions & 12 deletions

File tree

.github/workflows/ci.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
timeout-minutes: 120
3737
env:
3838
CARGO_TARGET_DIR: ${{ github.workspace }}/target
39+
RUST_BACKTRACE: full
3940
SPACETIMEDB_CPP_DIR: ${{ github.workspace }}/crates/bindings-cpp
4041
steps:
4142
- name: Find Git ref
@@ -182,6 +183,7 @@ jobs:
182183

183184
env:
184185
CARGO_TARGET_DIR: ${{ github.workspace }}/target
186+
RUST_BACKTRACE: full
185187
steps:
186188
- name: Find Git ref
187189
env:
@@ -272,6 +274,7 @@ jobs:
272274
timeout-minutes: 60
273275
env:
274276
CARGO_TARGET_DIR: ${{ github.workspace }}/target
277+
RUST_BACKTRACE: full
275278
steps:
276279
- name: Find Git ref
277280
env:
@@ -327,6 +330,7 @@ jobs:
327330
runs-on: spacetimedb-new-runner-2
328331
env:
329332
CARGO_TARGET_DIR: ${{ github.workspace }}/target
333+
RUST_BACKTRACE: full
330334
steps:
331335
- name: Checkout sources
332336
uses: actions/checkout@v3
@@ -366,6 +370,7 @@ jobs:
366370
runs-on: spacetimedb-new-runner-2
367371
env:
368372
CARGO_TARGET_DIR: ${{ github.workspace }}/target
373+
RUST_BACKTRACE: full
369374
steps:
370375
- uses: actions/checkout@v3
371376

@@ -390,6 +395,8 @@ jobs:
390395
name: Check that packages are publishable
391396
runs-on: spacetimedb-new-runner-2
392397
permissions: read-all
398+
env:
399+
RUST_BACKTRACE: full
393400
steps:
394401
- uses: actions/checkout@v3
395402
- uses: dsherret/rust-toolchain-file@v1
@@ -409,6 +416,8 @@ jobs:
409416
- { target: aarch64-apple-darwin, runner: macos-latest }
410417
- { target: x86_64-pc-windows-msvc, runner: windows-latest }
411418
runs-on: ${{ matrix.runner }}
419+
env:
420+
RUST_BACKTRACE: full
412421
steps:
413422
- name: Checkout
414423
uses: actions/checkout@v3
@@ -453,6 +462,8 @@ jobs:
453462
# Run as root because otherwise we get permission denied for various directories inside the container. I tried doing dances to allow it to run
454463
# without this (reassigning env vars and stuff), but was unable to get it to work and it felt like an uphill battle.
455464
options: --user 0:0
465+
env:
466+
RUST_BACKTRACE: full
456467
steps:
457468
# Uncomment this before merging so that it will run properly if run manually through the GH actions flow. It was playing weird with rolled back
458469
# commits though.
@@ -525,6 +536,8 @@ jobs:
525536
ci_command_docs:
526537
name: Check CI command docs
527538
runs-on: spacetimedb-new-runner-2
539+
env:
540+
RUST_BACKTRACE: full
528541
steps:
529542
- name: Find Git ref
530543
env:
@@ -557,6 +570,7 @@ jobs:
557570
runs-on: spacetimedb-new-runner-2
558571
env:
559572
CARGO_TARGET_DIR: ${{ github.workspace }}/target
573+
RUST_BACKTRACE: full
560574
steps:
561575
- name: Find Git ref
562576
env:
@@ -627,6 +641,7 @@ jobs:
627641
timeout-minutes: 30
628642
env:
629643
CARGO_TARGET_DIR: ${{ github.workspace }}/target
644+
RUST_BACKTRACE: full
630645
steps:
631646
- name: Checkout repository
632647
id: checkout-stdb
@@ -891,6 +906,7 @@ jobs:
891906
timeout-minutes: 30
892907
env:
893908
CARGO_TARGET_DIR: ${{ github.workspace }}/target
909+
RUST_BACKTRACE: full
894910
steps:
895911
- name: Checkout repository
896912
id: checkout-stdb
@@ -1006,6 +1022,8 @@ jobs:
10061022
runs-on: ubuntu-latest
10071023
permissions:
10081024
contents: read
1025+
env:
1026+
RUST_BACKTRACE: full
10091027
steps:
10101028
- name: Find Git ref
10111029
env:
@@ -1045,6 +1063,7 @@ jobs:
10451063
contents: read
10461064
env:
10471065
CARGO_TARGET_DIR: ${{ github.workspace }}/target
1066+
RUST_BACKTRACE: full
10481067
steps:
10491068
- name: Find Git ref
10501069
env:
@@ -1097,6 +1116,8 @@ jobs:
10971116
docs-build:
10981117
name: Docs build
10991118
runs-on: spacetimedb-new-runner-2
1119+
env:
1120+
RUST_BACKTRACE: full
11001121
steps:
11011122
- name: Checkout repository
11021123
uses: actions/checkout@v3
@@ -1134,6 +1155,8 @@ jobs:
11341155
typescript-test:
11351156
name: TypeScript - Tests
11361157
runs-on: spacetimedb-new-runner-2
1158+
env:
1159+
RUST_BACKTRACE: full
11371160
steps:
11381161
- name: Checkout repository
11391162
uses: actions/checkout@v4
@@ -1244,6 +1267,8 @@ jobs:
12441267

12451268
version_upgrade_check:
12461269
runs-on: spacetimedb-new-runner-2
1270+
env:
1271+
RUST_BACKTRACE: full
12471272
steps:
12481273
- name: Checkout
12491274
uses: actions/checkout@v3

crates/smoketests/tests/smoketests/call.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ Here are some existing procedures:
4141
- return_person"
4242
);
4343
assert!(
44-
expected.contains(stderr.trim()),
45-
"Expected stderr to be contained in expected message.\nExpected:\n{}\n\nActual stderr:\n{}",
44+
stderr.trim().starts_with(&expected),
45+
"Expected stderr to start with expected message.\nExpected:\n{}\n\nActual stderr:\n{}",
4646
expected,
4747
stderr.trim()
4848
);
@@ -63,8 +63,8 @@ Here are some existing procedures:
6363
- return_person"
6464
);
6565
assert!(
66-
expected.contains(stderr.trim()),
67-
"Expected stderr to be contained in expected message.\nExpected:\n{}\n\nActual stderr:\n{}",
66+
stderr.trim().starts_with(&expected),
67+
"Expected stderr to start with expected message.\nExpected:\n{}\n\nActual stderr:\n{}",
6868
expected,
6969
stderr.trim()
7070
);
@@ -81,8 +81,8 @@ Error: No such reducer OR procedure `say_hell` for database `{identity}` resolvi
8181
A reducer with a similar name exists: `say_hello`"
8282
);
8383
assert!(
84-
expected.contains(stderr.trim()),
85-
"Expected stderr to be contained in expected message.\nExpected:\n{}\n\nActual stderr:\n{}",
84+
stderr.trim().starts_with(&expected),
85+
"Expected stderr to start with expected message.\nExpected:\n{}\n\nActual stderr:\n{}",
8686
expected,
8787
stderr.trim()
8888
);
@@ -99,8 +99,8 @@ Error: No such reducer OR procedure `return_perso` for database `{identity}` res
9999
A procedure with a similar name exists: `return_person`"
100100
);
101101
assert!(
102-
expected.contains(stderr.trim()),
103-
"Expected stderr to be contained in expected message.\nExpected:\n{}\n\nActual stderr:\n{}",
102+
stderr.trim().starts_with(&expected),
103+
"Expected stderr to start with expected message.\nExpected:\n{}\n\nActual stderr:\n{}",
104104
expected,
105105
stderr.trim()
106106
);
@@ -126,8 +126,8 @@ The database has no reducers.
126126
The database has no procedures."
127127
);
128128
assert!(
129-
expected.contains(stderr.trim()),
130-
"Expected stderr to be contained in expected message.\nExpected:\n{}\n\nActual stderr:\n{}",
129+
stderr.trim().starts_with(&expected),
130+
"Expected stderr to start with expected message.\nExpected:\n{}\n\nActual stderr:\n{}",
131131
expected,
132132
stderr.trim()
133133
);
@@ -204,8 +204,8 @@ Here are some existing procedures:
204204
... (1 procedure not shown)"
205205
);
206206
assert!(
207-
expected.contains(stderr.trim()),
208-
"Expected stderr to be contained in expected message.\nExpected:\n{}\n\nActual stderr:\n{}",
207+
stderr.trim().starts_with(&expected),
208+
"Expected stderr to start with expected message.\nExpected:\n{}\n\nActual stderr:\n{}",
209209
expected,
210210
stderr.trim()
211211
);

0 commit comments

Comments
 (0)