Skip to content

Commit

Permalink
Ensure raft traces are always uploaded as workflow artifacts. (#6451)
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Alexander Kuppe <[email protected]>
  • Loading branch information
lemmy authored Aug 28, 2024
1 parent c0178a7 commit 7540df4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tlaplus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ jobs:

- name: Upload artifacts.
uses: actions/upload-artifact@v4
if: ${{ failure() }}
if: always()
with:
name: tlc
path: |
Expand Down
14 changes: 8 additions & 6 deletions tests/raft_scenarios_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,14 @@ def expand_files(files):
with block(ostream, "diagram", 3, "mermaid", ["sequenceDiagram"]):
ostream.write(mermaid)

with open(
os.path.join(output_dir, f"{os.path.basename(scenario)}.ndjson"),
"w",
encoding="utf-8",
) as f:
f.write(log)
## Do not create an empty ndjson file if log is emtpy.
if log:
with open(
os.path.join(output_dir, f"{os.path.basename(scenario)}.ndjson"),
"w",
encoding="utf-8",
) as f:
f.write(log)

write_error_report(err_list)

Expand Down

0 comments on commit 7540df4

Please sign in to comment.