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

fix: unable to kill fuels dev with pnpm #3508

Merged
merged 12 commits into from
Jan 6, 2025

Conversation

petertonysmith94
Copy link
Contributor

@petertonysmith94 petertonysmith94 commented Dec 30, 2024

Summary

  • Fixed issue with fuels dev not exiting on a single Ctrl + C for pnpm.
  • Tested with npm, pnpm and bun. (0.0.0-pr-3508-20241230183927)

Checklist

  • All changes are covered by tests (or not applicable)
  • All changes are documented (or not applicable)
  • I reviewed the entire PR myself (preferably, on GH UI)
  • I described all Breaking Changes (or there's none)

Copy link

vercel bot commented Dec 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fuels-template ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 6, 2025 0:03am
ts-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 6, 2025 0:03am
ts-docs-api ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 6, 2025 0:03am

@petertonysmith94 petertonysmith94 self-assigned this Dec 30, 2024
@petertonysmith94 petertonysmith94 added the bug Issue is a bug label Dec 30, 2024
Copy link
Contributor

github-actions bot commented Dec 30, 2024

This PR is published in NPM with version 0.0.0-pr-3508-20241230183927

Copy link

codspeed-hq bot commented Dec 30, 2024

CodSpeed Performance Report

Merging #3508 will degrade performances by 47.96%

Comparing ps/fix/unable-to-kill-fuels-dev (c1ae745) with master (41c72fb)

Summary

❌ 1 regressions
✅ 17 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark master ps/fix/unable-to-kill-fuels-dev Change
should successfully conduct a custom transfer between wallets (x20 times) 50.3 ms 96.6 ms -47.96%

.changeset/thin-planes-cover.md Outdated Show resolved Hide resolved
.github/workflows/pr-release.yaml Outdated Show resolved Hide resolved
Copy link
Contributor

@nedsalk nedsalk left a comment

Choose a reason for hiding this comment

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

We need tests for both issues the PR is closing (#2889, #3479).
You can find a test for #2889 in #3038. The same infrastructure in that test can be used for this PR. An approach could be to use a modified version of runInit where one would add a "fuels:dev": "fuels dev" script into the package.json file and then run a detached spawn('pnpm fuels:dev') command. This should simulate the same behavior that we do manually when testing with releases of PRs.

@petertonysmith94
Copy link
Contributor Author

petertonysmith94 commented Jan 6, 2025

We need tests for both issues the PR is closing (#2889, #3479). You can find a test for #2889 in #3038. The same infrastructure in that test can be used for this PR. An approach could be to use a modified version of runInit where one would add a "fuels:dev": "fuels dev" script into the package.json file and then run a detached spawn('pnpm fuels:dev') command. This should simulate the same behavior that we do manually when testing with releases of PRs.

@nedsalk I found that the test within #3038 only working with Linux due to the ps command used.

I found that when I re-added the following "fix" line to the source code (e2998d8), the tests can still pass. I experienced a lot of timeouts with this test in CI, have you experienced similar?

For me, we could investigate this further but I don't think the time required outweighs the value that this test would provide. Processes and process events are inherently difficult to test and I believe manual testing is adequate for now. Happy to create an issue to revisit this and add automated tests for this scenario, but IMO it's not top priority.

@nedsalk
Copy link
Contributor

nedsalk commented Jan 6, 2025

@petertonysmith94 sounds good. I have created #3547 and we can continue the discussion there. With regards to the test I wrote in #3038, it was failing at that time's master and succeeding with the fix. I'm not sure what happened in the meantime. All in all, this PR fixes it all as well so let's go with it :)

@nedsalk nedsalk self-requested a review January 6, 2025 11:55
Copy link
Contributor

github-actions bot commented Jan 6, 2025

Coverage Report:

Lines Branches Functions Statements
77.8%(+0.01%) 70.45%(-0.01%) 75.42%(+0.04%) 77.76%(+0.01%)
Changed Files:
Ok File (✨=New File) Lines Branches Functions Statements
🔴 packages/account/src/test-utils/launchNode.ts 94.82%
(-0.55%)
81.81%
(-0.72%)
90.9%
(+1.43%)
93.38%
(-0.42%)

@petertonysmith94 petertonysmith94 merged commit a278e71 into master Jan 6, 2025
24 checks passed
@petertonysmith94 petertonysmith94 deleted the ps/fix/unable-to-kill-fuels-dev branch January 6, 2025 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is a bug
Projects
None yet
5 participants