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: 🚭 fix summonerd smoke tests #4358

Merged
merged 6 commits into from
May 10, 2024

Conversation

cratelyn
Copy link
Contributor

@cratelyn cratelyn commented May 8, 2024

describe your changes

this provides some small changes needed for running the summoner smoke test locally.

issue ticket number and link

fixes #4321.

fixes #4370.

related to #4319.

checklist before requesting a review

  • if this code contains consensus-breaking changes, i have added the "consensus-breaking" label. otherwise, i declare my belief that there are not consensus-breaking changes, for the following reason:

    this branch only changes testing infrastructure and development tooling.

@cratelyn cratelyn added the A-testing Area: Relates to testing of Penumbra label May 8, 2024
@cratelyn cratelyn added this to the Sprint 6 milestone May 8, 2024
@cratelyn cratelyn self-assigned this May 8, 2024
@cratelyn cratelyn added A-tooling Area: developer tooling for building Penumbra itself A-CI/CD Relates to continuous integration & deployment of Penumbra labels May 8, 2024
@cratelyn cratelyn changed the title ci: 🚭 use env in summoner smoke test shebang ci: 🚭 fix summonerd smoke tests May 9, 2024
@cratelyn cratelyn force-pushed the kate/local-summoner-test-running-tweaks branch from 36ba425 to a022083 Compare May 9, 2024 20:13
@cratelyn cratelyn force-pushed the kate/local-summoner-test-running-tweaks branch from 7b745c9 to a4edeca Compare May 9, 2024 21:31
@cratelyn cratelyn force-pushed the kate/local-summoner-test-running-tweaks branch from a4edeca to 7b86267 Compare May 9, 2024 21:44
@cratelyn cratelyn force-pushed the kate/local-summoner-test-running-tweaks branch from 7b86267 to 269ecc7 Compare May 9, 2024 21:52
flake.nix Show resolved Hide resolved
@cratelyn cratelyn requested a review from conorsch May 9, 2024 22:18
@@ -58,6 +58,7 @@ async fn handle_bid(app: &mut App, to: Address, from: AddressIndex, bid: &str) -
planner.output(value, to);
let plan = planner
.memo("E PLURIBUS UNUM".into())
.memo_return_address(app.config.full_viewing_key.payment_address(from).0)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is the fix 🩹

everything else in this branch is tweaks to facilitate debugging, and confirming this does in fact fix the issue.

@cratelyn cratelyn requested a review from hdevalence May 9, 2024 22:22
Copy link
Contributor

@conorsch conorsch left a comment

Choose a reason for hiding this comment

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

Lovely, thanks for taking the time to show the work. Leaving unmerged, so you can drop/squash at your leisure.

@@ -41,7 +67,7 @@ cargo run --quiet --release --bin pd -- start --home "${HOME}/.penumbra/testnet_
pd_pid="$!"

# Ensure processes are cleaned up after script exits, regardless of status.
trap 'kill -9 "$cometbft_pid" "$pd_pid"' EXIT
trap 'kill -9 "$cometbft_pid" "$pd_pid"' EXIT INT
Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you for the super detailed commit messages. 🙏

deployments/scripts/smoke-summoner.sh Show resolved Hide resolved
cratelyn added 6 commits May 10, 2024 11:03
this is a small noöp refactor.

we don't need to acquire a handle to the current async runtime, if we
are attempting to spawn onto the *current* runtime. by default,
`tokio::spawn()` does that for us.
this adds `cometbft` (defined above) to the `devShell`. this argument is
threaded down into `pkgs.mkShell`, see:
- https://nixos.org/manual/nixpkgs/stable/#sec-pkgs-mkShell

otherwise, `which cometbft` won't find cometbft. this was needed for me
to run the summoner smoke test script locally.
- 🚭 use `env` in summoner smoke test shebang
- 🚀 add `/tmp/summonerd` and `/tmp/account1` checks
- 🔁 add `SUMMONER_SMOKE_RESET` toggle for local development
this squashes two related commits from development:

---

ci: ⭐ `SIGINT` will also kill cometbft, pd, summonerd

when running this locally in a development shell, i found that `ctrl+c`
would not terminate the other running processes. this would stop the
shell script, but logs from pd and cometbft would continue being printed
to the screen.

moreover, after stopping that shell, `ps` showed me that these processes
were left running, causing subsequent runs of the summonerd smoke test
to fail due to ports already being bound.

this adds `SIGINT` to the list of signals that will bring down the
cometbft, pd, and summonerd processes. this way, `ctrl+c` will properly
clean things up.

---

ci: ➕ don't clobber smoke test's child pids

fixes #4370.

this makes the list of process id's provided to `kill -9` when a SIGEXIT
or SIGINT signal is received an _additive_ list. prior, we were
clobbering this list when the phase1 and phase2 steps were run.

now, we append a new id to the list at each point we set a signal
trap.
@cratelyn cratelyn force-pushed the kate/local-summoner-test-running-tweaks branch from 269ecc7 to 3998da3 Compare May 10, 2024 15:05
@cratelyn cratelyn merged commit 0ac6754 into main May 10, 2024
13 checks passed
@cratelyn cratelyn deleted the kate/local-summoner-test-running-tweaks branch May 10, 2024 15:37
@cratelyn cratelyn added the C-bug Category: a bug label May 10, 2024
cratelyn added a commit that referenced this pull request May 12, 2024
conorsch pushed a commit that referenced this pull request May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CI/CD Relates to continuous integration & deployment of Penumbra A-testing Area: Relates to testing of Penumbra A-tooling Area: developer tooling for building Penumbra itself C-bug Category: a bug
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

ci: 🧟 summonerd smoke test leaves dangling processes when run locally Planner changes broke summoner
4 participants