SI-5: Deprecate rest-api-core and remove from workspace - #1957
Merged
josecelano merged 8 commits intoJun 29, 2026
Conversation
There was a problem hiding this comment.
Pull request overview
This PR removes the now-redundant torrust-tracker-rest-api-core crate from the workspace after the contract-first REST API migration, relocating the remaining DI container wiring into rest-api-runtime-adapter and updating workspace references, publishing workflow, and documentation accordingly.
Changes:
- Moved
TrackerHttpApiCoreContainerintotorrust-tracker-rest-api-runtime-adapterand re-exported it from the crate. - Updated import paths and Cargo dependencies across the tracker binary and
axum-rest-api-server; removedrest-api-corefrom the workspace, deny wrapper rules, and deployment publishing. - Updated documentation/issue specs and added a new
use-rest-apiskill with skill-link markers.
Reviewed changes
Copilot reviewed 30 out of 31 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
src/container.rs |
Switches container import to torrust-tracker-rest-api-runtime-adapter. |
src/bootstrap/jobs/tracker_apis.rs |
Updates REST API container imports (including test module). |
share/default/config/tracker.development.sqlite3.toml |
Adds skill-link: use-rest-api marker for REST API usage workflow. |
packages/rest-api-runtime-adapter/src/lib.rs |
Exposes the new container module publicly. |
packages/rest-api-runtime-adapter/src/container.rs |
New home for TrackerHttpApiCoreContainer wiring. |
packages/rest-api-runtime-adapter/Cargo.toml |
Adds torrust-tracker-configuration and tokio (sync) for container wiring. |
packages/rest-api-core/src/statistics/services.rs |
Deleted as part of removing rest-api-core. |
packages/rest-api-core/src/statistics/mod.rs |
Deleted as part of removing rest-api-core. |
packages/rest-api-core/src/statistics/metrics.rs |
Deleted as part of removing rest-api-core. |
packages/rest-api-core/src/lib.rs |
Deleted as part of removing rest-api-core. |
packages/rest-api-core/README.md |
Deleted as part of removing rest-api-core. |
packages/rest-api-core/LICENSE |
Deleted as part of removing rest-api-core. |
packages/rest-api-core/Cargo.toml |
Deleted as part of removing rest-api-core. |
packages/axum-rest-api-server/src/v1/routes.rs |
Switches REST API container import to runtime-adapter. |
packages/axum-rest-api-server/src/v1/middlewares/auth.rs |
Adds skill-link: use-rest-api marker in rustdoc header. |
packages/axum-rest-api-server/src/testing/environment.rs |
Switches REST API container import to runtime-adapter. |
packages/axum-rest-api-server/src/server.rs |
Switches REST API container import to runtime-adapter (incl. tests). |
packages/axum-rest-api-server/src/routes.rs |
Switches REST API container import to runtime-adapter. |
packages/axum-rest-api-server/Cargo.toml |
Drops dependency on torrust-tracker-rest-api-core. |
packages/AGENTS.md |
Updates architecture docs to remove rest-api-core references. |
docs/packages.md |
Removes rest-api-core references and documents SI-5 removal. |
docs/issues/open/1943-1938-si-5-deprecate-rest-api-core/ISSUE.md |
New folder-based issue spec with manual verification evidence. |
docs/issues/open/1943-1938-si-5-deprecate-rest-api-core.md |
Removes the old single-file issue spec (replaced by folder format). |
docs/issues/open/1938-rest-api-contract-first-migration/EPIC.md |
Updates SI-5 link to point to the folder-based issue spec. |
deny.toml |
Removes rest-api-core from wrapper rules. |
Cargo.toml |
Removes workspace dependency on torrust-tracker-rest-api-core; adds runtime-adapter entry. |
Cargo.lock |
Removes torrust-tracker-rest-api-core package; updates dependencies accordingly. |
AGENTS.md |
Updates package catalog entry from rest-api-core to rest-api-runtime-adapter. |
.github/workflows/deployment.yaml |
Removes cargo publish -p torrust-tracker-rest-api-core step. |
.github/skills/usage/use-rest-api/SKILL.md |
Adds a new skill describing how to use/verify the REST API. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Fix AGENTS.md: change rest-api-runtime-adapter layer from 'client tools' to 'runtime adapter' - Fix packages/AGENTS.md: add Runtime Adapter layer to diagram, update description - Fix ISSUE.md: update status to 'completed', last-updated-utc, check prerequisites and verification - Fix use-rest-api SKILL.md: add Skill Links section
Member
Author
|
ACK 5dda558 |
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.
SI-5: Deprecate
rest-api-coreand remove from workspaceCloses #1943
Summary
After SI-4 migrated the stats context to the contract-first architecture, the
rest-api-corepackage became an empty shell with a single consumer (axum-rest-api-server). This PR:TrackerHttpApiCoreContainer(DI container) intorest-api-runtime-adapterpackages/rest-api-core/directorydeny.tomlwrapper rulesAGENTS.md,docs/packages.md)Changes
Code Changes
TrackerHttpApiCoreContainerfromrest-api-coretorest-api-runtime-adapter/src/container.rsaxum-rest-api-serverandsrc/to userest_api_runtime_adapter::containertokiodependency torest-api-runtime-adapter/Cargo.toml(needed for the container)rest-api-coredependency fromaxum-rest-api-server/Cargo.tomland rootCargo.tomlpackages/rest-api-core/directory (~1100 lines removed)deny.toml— removedrest-api-corefrom 3 wrapper rules.github/workflows/deployment.yaml— removedcargo publishstepDocumentation Changes
ISSUE.md)AGENTS.md,packages/AGENTS.md,docs/packages.mduse-rest-apiskill under.github/skills/usage/Verification
cargo check --workspace)