Repository navigation
refactor: simplification - #70
Merged
Merged
Conversation
BREAKING CHANGE: WorkerWatcher.Watch no longer returns an error. Signed-off-by: Valery Piashchynski <piashchynski.valery@gmail.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The functional simplifications preserve existing behavior, and removed fixtures and tests have retained equivalents or no remaining references.
Review effort: Balanced
Findings: None
What changed in this PR
Simplifies worker-pool maintenance by removing redundant fixtures/tests, eliminating unused abstractions, and consolidating CI testing and caching.
Changes:
- Simplifies worker initialization, jitter calculation, watcher cleanup, and IPC factories.
- Removes obsolete PHP fixtures, dependencies, and duplicate Go test suites.
- Consolidates Go test coverage and adopts setup-go caching.
| File | Description |
|---|---|
worker/worker.go |
Uses io.CopyBuffer directly. |
worker/options.go |
Simplifies restart jitter generation. |
worker_watcher/worker_watcher.go |
Simplifies watcher API and cleanup paths. |
tests/worker-slow-dyn.php |
Removes redundant slow worker. |
tests/stream_worker.php |
Removes unused stream fixture. |
tests/src/Workflow/SagaWorkflow.php |
Removes unused workflow fixture. |
tests/src/Client/StartNewWorkflow.php |
Removes unused client fixture. |
tests/src/Activity/SimpleActivity.php |
Removes unused activity fixture. |
tests/socket_test_script.sh |
Removes obsolete socket script. |
tests/slow-pid.php |
Removes unused PID fixture. |
tests/sample.txt |
Removes unused sample data. |
tests/raw-error.php |
Removes unused error fixture. |
tests/psr-worker.php |
Removes obsolete PSR worker. |
tests/psr-worker-slow.php |
Removes obsolete slow PSR worker. |
tests/psr-worker-post.php |
Removes obsolete POST worker. |
tests/psr-worker-bench.php |
Removes obsolete benchmark worker. |
tests/pipes_test_script.sh |
Removes obsolete pipe script. |
tests/metrics-issue-571.php |
Removes unused metrics fixture. |
tests/issue659.php |
Removes obsolete regression fixture. |
tests/http/user-agent.php |
Removes unused HTTP fixture. |
tests/http/upload.php |
Removes unused upload fixture. |
tests/http/stuck.php |
Removes unused stuck-worker fixture. |
tests/http/slow-client.php |
Removes obsolete HTTP client. |
tests/http/server.php |
Removes unused server fixture. |
tests/http/request-uri.php |
Removes unused URI fixture. |
tests/http/push.php |
Removes unused push fixture. |
tests/http/pid.php |
Removes unused PID fixture. |
tests/http/payload.php |
Removes unused payload fixture. |
tests/http/memleak.php |
Removes unused memory fixture. |
tests/http/ip.php |
Removes unused address fixture. |
tests/http/headers.php |
Removes unused headers fixture. |
tests/http/header.php |
Removes unused header fixture. |
tests/http/error2.php |
Removes unused exit fixture. |
tests/http/error.php |
Removes unused error fixture. |
tests/http/env.php |
Removes unused environment fixture. |
tests/http/echoerr.php |
Removes unused stderr fixture. |
tests/http/echoDelay.php |
Removes unused delayed echo fixture. |
tests/http/echo.php |
Removes unused echo fixture. |
tests/http/data.php |
Removes unused form-data fixture. |
tests/http/cookie.php |
Removes unused cookie fixture. |
tests/http/client.php |
Removes obsolete HTTP harness. |
tests/gzip-large-file.txt |
Removes unused test data. |
tests/composer.json |
Drops dependencies needed only by removed fixtures. |
pool/static_pool/supervisor_test.go |
Removes a redundant supervisor test. |
pool/static_pool/pool.go |
Removes unused fields and nil-only errors. |
pool/static_pool/pool_test.go |
Reuses the shared slow worker fixture. |
pool/static_pool/dyn_allocator_test.go |
Reuses the shared slow worker fixture. |
Makefile |
Consolidates test and coverage commands. |
ipc/socket/socket.go |
Stores relays directly. |
ipc/socket/socket_test.go |
Defines the shared discard logger. |
ipc/socket/socket_spawn_test.go |
Removes duplicate socket tests. |
ipc/pipe/pipe.go |
Removes the unused logger field. |
ipc/pipe/pipe_test.go |
Consolidates tests and strengthens timeout setup. |
ipc/pipe/pipe_spawn_test.go |
Removes duplicate pipe tests. |
.github/workflows/tests.yml |
Uses setup-go caching and earlier checkout. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #70 +/- ##
==========================================
- Coverage 77.54% 77.13% -0.41%
==========================================
Files 19 20 +1
Lines 1171 1159 -12
==========================================
- Hits 908 894 -14
- Misses 263 265 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Reason for This PR
Reduce the code and dependencies needed to maintain the worker pool.
Description of Changes
WorkerWatcher.Watch.License Acceptance
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.
PR Checklist
git commit -s -S).CHANGELOG.md.