Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: smoke-run simulator on CI #1277

Merged
merged 1 commit into from
Nov 8, 2023
Merged

ci: smoke-run simulator on CI #1277

merged 1 commit into from
Nov 8, 2023

Conversation

matklad
Copy link
Member

@matklad matklad commented Nov 7, 2023

Normally, a seed is specified as a base-10 integer. However, as a special case, we allow using a Git hash (a hex string 40 character long). This is used by our CI, which passes current commit hash as a seed --- that way, we run simulator on CI, we run it with different, "random" seeds, but the the failures remain reproducible just from the commit hash!

Comment on lines +223 to +225
- run: zig/zig build simulator_run -Dsimulator-state-machine=accounting -Doptimize=ReleaseSafe -- ${{ github.sha }}
- run: zig/zig build simulator_run -Dsimulator-state-machine=testing -Doptimize=ReleaseSafe -- ${{ github.sha }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 Should we use the PR number instead? That way you can't "fix" a failing seed by just force-pushing with a different commit message.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I like commit hash more, as it is more hermetic. It is a bit more fragile, but hopefully everyone is diligent enough to create a follow-up issue anyway!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hermetic in a sense that you only need commit hash for a repro: with PR number, you still need commit hash, but you also need PR, which also is a tie to GitHub

sentientwaffle
sentientwaffle previously approved these changes Nov 7, 2023
# It would be a good idea to also _run_ a single iteration,
# but that currently has some false failures :-)
# TODO: Make so we have a single zig build simulator that does both
# Run simulator once, using commit hash as a random, but also deterministic seed.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: once (per state machine)

Normally, a seed is specified as a base-10 integer. However, as a
special case, we allow using a Git hash (a hex string 40 character
long). This is used by our CI, which passes current commit hash as a
seed --- that way, we run simulator on CI, we run it with different,
"random" seeds, but the the failures remain reproducible just from the
commit hash!
@matklad matklad added this pull request to the merge queue Nov 8, 2023
Merged via the queue into main with commit 5208b15 Nov 8, 2023
27 checks passed
@matklad matklad deleted the matklad/not-a-rocket branch November 8, 2023 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants