Skip to content
This repository has been archived by the owner on Sep 20, 2021. It is now read-only.

[pull] main from loic-sharma:main #60

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open

Conversation

pull[bot]
Copy link

@pull pull bot commented Aug 29, 2021

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull bot assigned viceice Aug 29, 2021
@pull pull bot added the ⤵️ pull label Aug 29, 2021
Improves the mirroring implementation:

1. Push all mirroring logic into the `MirrorService`. This will make it easier to reuse mirroring logic in the upcoming Razor Pages rewrite: #678
2. Add unit and integration tests on the mirroring functionality
3. Fixed bugs caught by tests
Reduces complexity and improves developer productivity. For more information, see: #678
@pull pull bot added the merge-conflict Resolve conflicts manually label Sep 18, 2021
loic-sharma and others added 17 commits September 18, 2021 16:47
Replace AzDO build with GitHub actions, replace Gitter with Discord
Fix link to mirroring docs page
Kudos to @dncnkrs for the original implementation. 

This allows BaGet to index packages with large release notes, like https://www.nuget.org/packages/chocolatey/0.10.6.1
Enables basic GitHub Codespace support by adding a dev container image.

Known problems:
* Broken links - The [Forwarded Headers Middleware](https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/proxy-load-balancer?view=aspnetcore-5.0#forwarded-headers) does not seem to be working as expected. For example:
* Upload failures - Upload fails with `error: Response status code does not indicate success: 413 (Request Entity Too Large).`. I was able to work around this by enabling upstreaming to nuget.org and download artifacts.
The IISServerOptions were populated from appsettings, but were then overridden by the default configuration. This caused the `MaxRequestBodySize` option to _always_ be `262144000`, regardless of what was configured in appsettings.

Fixes #653.
Refactors the search implementations to share their response building logic. This reduces the logic in search providers to prepare for supporting the NuGet V2 protocol.

Part of #43
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
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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
⤵️ pull merge-conflict Resolve conflicts manually
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants