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

Refactor package upstreaming #699

Closed
wants to merge 5 commits into from

Conversation

loic-sharma
Copy link
Owner

@loic-sharma loic-sharma commented Oct 16, 2021

This change refines BaGet's abstractions around package upstreaming. This will make it easier to support the V2 APIs.

Old name New name Notes
FooPackageService FooPackageDatabase Service for packages' state in databases
MirrorService PackageService Service for packages' overall state, including upstream packages
IMirrorClient IUpstreamClient Service to lookup upstream packages

loic-sharma added a commit that referenced this pull request Dec 12, 2021
This pushes logic from the `MirrorService` down into the `V2UpstreamClient` and `V3UpstreamClient` and adds tests on the `V3UpstreamClient`. This will make it easier to refactor the `MirrorService`, which will make it easier to implement the legacy V2 APIs in BaGet.

Split from #699
loic-sharma added a commit that referenced this pull request Dec 12, 2021
After this change there's two services to access packages' state:

* `IPackageDatabase` - This is a "low level" service for packages' state in BaGet's database
* `IPackageService` - This is a "high level" service for packages' state, including both the database and the upstream feed if any

This allows us to centralize the mirroring logic into the `IPackageService` (before mirroring logic was sprinkled throughout the codebase).

Replaces #699
@loic-sharma
Copy link
Owner Author

Replaced by #711

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant