-
Notifications
You must be signed in to change notification settings - Fork 70
feat: Plugin performance improvements #606
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
Merged
Merged
Changes from all commits
Commits
Show all changes
56 commits
Select commit
Hold shift + click to select a range
a0e9e7c
feat: Plugin performance improvement
zeljkoX ef5dc59
chore: PArtial
zeljkoX 6ebcb00
chore: impartial
zeljkoX fe337d3
chore: improvements
zeljkoX 6e2f67c
chore: Improvement
zeljkoX 864921b
feat: Implement memory pressure monitoring and cache eviction in pool…
zeljkoX 907a2b6
chore: Refactor
zeljkoX 02e596f
chore: docs and logic improvements
zeljkoX 0fc35c0
chore: Improvements
zeljkoX a397b25
chore: Fixes
zeljkoX ad46e72
chore: Fixes
zeljkoX d9ac8fe
Merge branch 'main' into plugin-performance
zeljkoX bc2df3f
Merge branch 'main' into plugin-performance
zeljkoX c08bb41
chore: Plugin api improvements
zeljkoX 748275a
chore: Improvements
zeljkoX fabb7d8
chore: Clippy improvements
zeljkoX b11caaf
chore: Improvements
zeljkoX 780541d
Merge branch 'main' into plugin-performance
zeljkoX 7bb2c46
chore: Remove compiled file
zeljkoX dfab187
fix: Recover stuck Stellar Sent transactions
dylankilkenny e747a36
chore: Improvements
zeljkoX e5a5451
chore: Sandbox improvements
zeljkoX 5add2dd
refactor: Simplify Stellar stuck Sent recovery logic
dylankilkenny 2398215
refactor: Revert to is_final_state check
dylankilkenny 363169c
chore: Remove sandboxed executuon logic
zeljkoX 81f99d0
Merge branch 'main' into plugin-performance
zeljkoX 031e036
chore: PR suggestions
zeljkoX 38f6d77
chore: Improvements
zeljkoX c3e0fba
Merge branch 'main' into plugin-performance
zeljkoX d13975b
chore: Add tsnode to dev deps
zeljkoX fb9acaf
chore: Update deps
zeljkoX a5c9147
chore: Merge recover stellar txs
tirumerla d5667d9
chore: Add exp backoff logic
tirumerla f671e85
fix: Stellar status improvements
zeljkoX 15d0a17
Revert "chore: Add exp backoff logic"
zeljkoX d51ab66
Merge branch 'fix/stellar-stuck-recovery-improvements' into plugin-pe…
zeljkoX c9b6993
chore: Fix tests
zeljkoX 0c54bd0
chore: Add early exit, circuit breaker
tirumerla 13d8fd4
chore: Handle submitted state, mark old txs as failed
zeljkoX e8ab965
feat: Support more frequent transaction cleanup
zeljkoX 0a25b80
Merge branch 'fix/stellar-stuck-recovery-improvements' into plugin-pe…
zeljkoX 8ab31fa
Merge branch 'more-frequient-transaction-cleanup' into plugin-perform…
zeljkoX fb1fd9b
Merge branch 'main' into plugin-performance
zeljkoX de92ec8
Merge branch 'main' into plugin-performance
zeljkoX bb04402
Merge branch 'main' into plugin-performance
zeljkoX 646f3f7
Merge branch 'main' into plugin-performance
zeljkoX 451107f
feat: Remove connection pooling and reuse
zeljkoX e03ea14
chore: Pool executor socket retry improvements
zeljkoX 326c23f
chore: Revert transaction_status_handler changes
zeljkoX c867971
chore: Remove leftover test
zeljkoX 921fa8a
chore: Remove lock file
zeljkoX 3015c63
chore: Improve unit test coverage
zeljkoX 8ec6710
chore: Remove stack trace from response
zeljkoX 4c49b84
chore: Unit test improvements
zeljkoX abaa2c9
chore: Fix flaky test
zeljkoX 926f844
Merge branch 'main' into plugin-performance
zeljkoX File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| use std::path::Path; | ||
| use std::process::Command; | ||
|
|
||
| fn main() { | ||
| let plugins_dir = Path::new("plugins"); | ||
| if !plugins_dir.exists() { | ||
| println!("cargo:warning=plugins directory not found, skipping plugin setup"); | ||
| return; | ||
| } | ||
|
|
||
| let node_modules = plugins_dir.join("node_modules"); | ||
| let pool_executor_ts = plugins_dir.join("lib/pool-executor.ts"); | ||
| let pool_executor_js = plugins_dir.join("lib/pool-executor.js"); | ||
|
|
||
| // Tell Cargo when to rerun this script | ||
| println!("cargo:rerun-if-changed=plugins/lib/pool-executor.ts"); | ||
| println!("cargo:rerun-if-changed=plugins/package.json"); | ||
|
|
||
| // Check if pnpm is available | ||
| let pnpm_check = Command::new("pnpm").arg("--version").output(); | ||
| if pnpm_check.is_err() { | ||
| println!("cargo:warning=pnpm not found in PATH, skipping plugin setup"); | ||
| println!("cargo:warning=Run 'pnpm install && pnpm run build' in plugins/ manually"); | ||
| return; | ||
| } | ||
|
|
||
| // Only run pnpm install if node_modules is missing | ||
| if !node_modules.exists() { | ||
| println!("Installing plugin dependencies..."); | ||
| let output = Command::new("pnpm") | ||
| .arg("install") | ||
| .arg("--ignore-scripts") // Skip postinstall, we'll build explicitly below | ||
| .current_dir(plugins_dir) | ||
| .output(); | ||
|
|
||
| match output { | ||
| Ok(output) if output.status.success() => { | ||
| println!("✓ pnpm install completed"); | ||
| } | ||
| Ok(output) => { | ||
| let stderr = String::from_utf8_lossy(&output.stderr); | ||
| println!("cargo:warning=pnpm install failed: {stderr}"); | ||
| return; | ||
| } | ||
| Err(e) => { | ||
| println!("cargo:warning=Failed to execute pnpm install: {e}"); | ||
| return; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| // Build pool-executor if source is newer than output (or output missing) | ||
| let needs_build = if !pool_executor_js.exists() { | ||
| true | ||
| } else { | ||
| // Compare modification times | ||
| match ( | ||
| pool_executor_ts.metadata().and_then(|m| m.modified()), | ||
| pool_executor_js.metadata().and_then(|m| m.modified()), | ||
| ) { | ||
| (Ok(src_time), Ok(out_time)) => src_time > out_time, | ||
| _ => true, // Rebuild if we can't determine | ||
| } | ||
| }; | ||
|
|
||
| if needs_build { | ||
| println!("Building executor..."); | ||
| let output = Command::new("pnpm") | ||
| .arg("run") | ||
| .arg("build") | ||
| .current_dir(plugins_dir) | ||
| .output(); | ||
|
|
||
| match output { | ||
| Ok(output) if output.status.success() => { | ||
| println!("✓ executor built successfully"); | ||
| } | ||
| Ok(output) => { | ||
| let stderr = String::from_utf8_lossy(&output.stderr); | ||
| println!("cargo:warning=executor build failed: {stderr}"); | ||
| } | ||
| Err(e) => { | ||
| println!("cargo:warning=Failed to build executor: {e}"); | ||
| } | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.