refactor(makefile): parameterize target families and add deprecation framework#3353
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the repository’s Makefile target “families” into parameterized targets, adds a deprecation framework (warnings + help output section), and updates docs to match the new invocations—while migrating several Python tooling targets to uv run.
Changes:
- Introduces
is_true/deprecated_targethelpers and a# deprecated:tagging system thatmake helprenders as a dedicated deprecated section. - Consolidates/parameterizes formatting/lint/container-run/playwright target families, keeping old names as deprecated aliases.
- Updates contributor and ops documentation to reference the new parameterized
makeinvocations.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
Makefile |
Adds deprecation/help rendering, parameterized targets (black/isort/ruff/container-run/playwright), and deprecated alias stubs. |
docs/docs/manage/tuning.md |
Updates container-run examples to the new CONTAINER_* variable style. |
docs/docs/architecture/adr/025-granian-http-server.md |
Updates ADR container-run examples to the new parameterized invocations. |
DEVELOPING.md |
Updates contributor docs for new black/isort/ruff usage variables. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Thanks @jonpspri. Clean consolidation — the |
1246ad2 to
1a4dd2e
Compare
gandhipratik203
left a comment
There was a problem hiding this comment.
- It could be beneficial to split the echo-delay test server changes (mcp-servers/rust/fast-test-server/src/main.rs and tests/loadtest/locustfile_echo_delay.py) into a separate PR, as they appear unrelated to the Makefile and skills-related updates.
- That would allow the test infrastructure to merge quickly, while the Makefile and skills changes go through their own review cycle at their own pace.
e642b40 to
b296c38
Compare
Normally I'd agree, but our current throughput challenge is the quantity of PRs and review cycle overhead on individual PRs. I'm trying to group my changes on to-be-merged PRs in a fashion that makes sense. |
40d7c96 to
69def2e
Compare
…mework, and unify pytest ignores - Consolidate black/isort/ruff/container-run/playwright target families into parameterized versions with variables (CHECK=1, RUFF_MODE=, CONTAINER_SSL=1, etc.) - Add is_true and deprecated_target helper macros with per-target removal version (v1.2.0) - Introduce # deprecated: tag system rendered in make help as highlighted section - Fix help recipe to stream grep output directly into while-read loop (preserves newlines) - Add PYTEST_IGNORE variable to unify --ignore flags across all pytest targets - Convert black/isort/ruff/pylint targets from $(VENV_DIR)/bin/<tool> to uv run - Add docker-nuke target for full container environment cleanup - Add Claude Code skills for pr-review, pr-risk-scoring, and sprint-plan - Revise pr-review skill for conciseness (183 -> 80 lines) and add structured output format - Fix playwright debug/update-snapshots targets to use fail mode instead of continue Signed-off-by: Jonathan Springer <jps@s390x.com>
…, and evict broken sessions Add a Streamable HTTP echo-with-delay Locust test to measure gateway throughput with I/O-bound backends. Parameterize docker-compose for gateway replicas, resource limits, worker count, and locustfile selection. The fast_test_server echo tool now accepts an optional delay parameter. Fix broken session recycling in MCP session pool by evicting sessions that encountered transport errors instead of returning them. Signed-off-by: Jonathan Springer <jps@s390x.com>
Cover the release(discard=True) path and context manager error handling added in the session pool eviction fix. Tests verify: - Discarded sessions are closed and not returned to pool - Semaphore is released on discard (including missing semaphore edge case) - Eviction counter increments on discard - Context manager passes discard=True on exception, discard=False on success Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
69def2e to
b2ca0b2
Compare
Review SummaryRebased onto Makefile ParameterizationWell-designed consolidation. The Session Pool Eviction FixCorrect and important fix. The Added differential test coverage for the new discard behavior:
Docker-Compose & Load TestingClean parameterization of replicas, resource limits, locustfile selection, and gateway config via No Issues Found
|
crivetimihai
left a comment
There was a problem hiding this comment.
LGTM. Rebased, reviewed, and added differential test coverage for the session pool discard behavior. All 135 session pool coverage tests pass.
…framework (#3353) * refactor(makefile): parameterize target families, add deprecation framework, and unify pytest ignores - Consolidate black/isort/ruff/container-run/playwright target families into parameterized versions with variables (CHECK=1, RUFF_MODE=, CONTAINER_SSL=1, etc.) - Add is_true and deprecated_target helper macros with per-target removal version (v1.2.0) - Introduce # deprecated: tag system rendered in make help as highlighted section - Fix help recipe to stream grep output directly into while-read loop (preserves newlines) - Add PYTEST_IGNORE variable to unify --ignore flags across all pytest targets - Convert black/isort/ruff/pylint targets from $(VENV_DIR)/bin/<tool> to uv run - Add docker-nuke target for full container environment cleanup - Add Claude Code skills for pr-review, pr-risk-scoring, and sprint-plan - Revise pr-review skill for conciseness (183 -> 80 lines) and add structured output format - Fix playwright debug/update-snapshots targets to use fail mode instead of continue Signed-off-by: Jonathan Springer <jps@s390x.com> * feat(loadtest): add echo-delay load test, parameterize docker-compose, and evict broken sessions Add a Streamable HTTP echo-with-delay Locust test to measure gateway throughput with I/O-bound backends. Parameterize docker-compose for gateway replicas, resource limits, worker count, and locustfile selection. The fast_test_server echo tool now accepts an optional delay parameter. Fix broken session recycling in MCP session pool by evicting sessions that encountered transport errors instead of returning them. Signed-off-by: Jonathan Springer <jps@s390x.com> * test: add differential coverage for session pool discard behavior Cover the release(discard=True) path and context manager error handling added in the session pool eviction fix. Tests verify: - Discarded sessions are closed and not returned to pool - Semaphore is released on discard (including missing semaphore edge case) - Eviction counter increments on discard - Context manager passes discard=True on exception, discard=False on success Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> --------- Signed-off-by: Jonathan Springer <jps@s390x.com> Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> Co-authored-by: Mihai Criveti <crivetimihai@gmail.com> Signed-off-by: Yosief Eyob <yosiefogbazion@gmail.com>
…framework (IBM#3353) * refactor(makefile): parameterize target families, add deprecation framework, and unify pytest ignores - Consolidate black/isort/ruff/container-run/playwright target families into parameterized versions with variables (CHECK=1, RUFF_MODE=, CONTAINER_SSL=1, etc.) - Add is_true and deprecated_target helper macros with per-target removal version (v1.2.0) - Introduce # deprecated: tag system rendered in make help as highlighted section - Fix help recipe to stream grep output directly into while-read loop (preserves newlines) - Add PYTEST_IGNORE variable to unify --ignore flags across all pytest targets - Convert black/isort/ruff/pylint targets from $(VENV_DIR)/bin/<tool> to uv run - Add docker-nuke target for full container environment cleanup - Add Claude Code skills for pr-review, pr-risk-scoring, and sprint-plan - Revise pr-review skill for conciseness (183 -> 80 lines) and add structured output format - Fix playwright debug/update-snapshots targets to use fail mode instead of continue Signed-off-by: Jonathan Springer <jps@s390x.com> * feat(loadtest): add echo-delay load test, parameterize docker-compose, and evict broken sessions Add a Streamable HTTP echo-with-delay Locust test to measure gateway throughput with I/O-bound backends. Parameterize docker-compose for gateway replicas, resource limits, worker count, and locustfile selection. The fast_test_server echo tool now accepts an optional delay parameter. Fix broken session recycling in MCP session pool by evicting sessions that encountered transport errors instead of returning them. Signed-off-by: Jonathan Springer <jps@s390x.com> * test: add differential coverage for session pool discard behavior Cover the release(discard=True) path and context manager error handling added in the session pool eviction fix. Tests verify: - Discarded sessions are closed and not returned to pool - Semaphore is released on discard (including missing semaphore edge case) - Eviction counter increments on discard - Context manager passes discard=True on exception, discard=False on success Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> --------- Signed-off-by: Jonathan Springer <jps@s390x.com> Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> Co-authored-by: Mihai Criveti <crivetimihai@gmail.com> Signed-off-by: KRISHNAN, SANTHANA <sk8069@exo.att.com>
Summary
is_trueanddeprecated_targethelper macros with per-target removal version (v1.2.0)# deprecated:tag system thatmake helprenders as a highlighted section (dim yellow) at the end of help outputblack,isort,ruff,pylint,future-proof-ruff) from$(VENV_DIR)/bin/<tool>touv rundocker-nuketarget for full container environment cleanup (stops all containers, removes images, volumes, networks, and build cache).gitignoreto track.claude/skills/directoryTargets consolidated
CHECK=1variableRUFF_MODE=check|fix|formatlint_git_filesmacrodefine/endefrun_playwright_testmacrodefine/endefCONTAINER_SSL,CONTAINER_HOST_NET,CONTAINER_JWT,CONTAINER_HTTP_SERVERDeprecated aliases
All old target names still work but emit a warning with the removal version:
make helpnow shows a dedicated deprecated targets section at the bottom.New target:
docker-nukeDestructive cleanup target that removes ALL containers, images, volumes, networks, and build cache. Includes an interactive confirmation prompt before proceeding.
Claude Code skills
Added three reusable skills under
.claude/skills/:Test plan
make helpdisplays deprecated section with yellow highlightingmake black CHECK=1 TARGET=mcpgateway/runs dry-run checkmake ruff RUFF_MODE=fix TARGET=mcpgateway/runs ruff fixmake black-checkshows deprecation warning then runs correctlymake ruff-fixshows deprecation warning then runs correctlymake lint-quickworks end-to-end (calls parameterized targets internally)make lint-fixworks end-to-endmake container-run-sslshows deprecation warning then delegatesmake pylint TARGET=mcpgateway/runs viauv runwithout venv activationmake docker-nukeprompts for confirmation and cleans up when confirmed