Skip to content

Mirrored package identification#219

Open
jacksga wants to merge 10 commits intobagetter:mainfrom
jacksga:feat/mirrored-package-identification
Open

Mirrored package identification#219
jacksga wants to merge 10 commits intobagetter:mainfrom
jacksga:feat/mirrored-package-identification

Conversation

@jacksga
Copy link

@jacksga jacksga commented Mar 4, 2025

Summary of the changes

  • Lets BaGetter store wether a package was mirrored and if so, from where
  • Can be used as base for different cleanup routines

Addresses #187

@jacksga jacksga force-pushed the feat/mirrored-package-identification branch from 3371048 to 5630c41 Compare March 26, 2025 16:13
@jacksga jacksga marked this pull request as draft March 26, 2025 16:15
@jacksga jacksga marked this pull request as ready for review March 26, 2025 16:15
@jacksga jacksga marked this pull request as draft March 26, 2025 16:15
@jacksga jacksga marked this pull request as ready for review March 26, 2025 16:15
@jacksga
Copy link
Author

jacksga commented Mar 26, 2025

Hey @Regenhardt and @FroggieFrog,
is there a chance of getting your thoughts on this and if this is something you'd support in this way as a foundation for easier cleanup routines etc in the future?
Thanks in advance

@jacksga
Copy link
Author

jacksga commented Jun 18, 2025

Hey, could you please provide me with some form of reaction or feedback regarding this?
@Regenhardt

@Regenhardt
Copy link

Hi yes sorry, I definitely like this, just want to combine it with something else that also needs to modify the DB schema.

@seriouz
Copy link

seriouz commented Oct 6, 2025

@Regenhardt Do you still have further plans on this?

@hoerup
Copy link

hoerup commented Oct 28, 2025

@Regenhardt could you please take another look at this one ?

@jacksga
Copy link
Author

jacksga commented Dec 4, 2025

Hey @Regenhardt is there any chance we could get this wrapped up and done this year as a christmas present for everyone trying to identify mirrored packages for cleanup?

Copy link

@Regenhardt Regenhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would actually prefer sometihng like UpstreamSource instead of MirroredFrom, not sure why though so I'm open for arguments here.

@Regenhardt
Copy link

Maybe we can indeed get this wrappped up for christmas :)

Also rebase (or merge main) please.

@jacksga
Copy link
Author

jacksga commented Dec 10, 2025

Would actually prefer sometihng like UpstreamSource instead of MirroredFrom, not sure why though so I'm open for arguments here.

For me upstream in a general software development perspective is more missleading than mirror, therefore I opted for MirroredFrom. Would also be up for a mix (MirrorSource) but in perspective of getting it done before christmas I'd choose whatever your last word is :D

When you decided on the name for the property I will rebase, change the name, fix the domain and usings and create new migrations.

@Regenhardt
Copy link

Happy new year!
You won't guess what I got for christmas: A fried boot drive, yay!

Anyway, how about SourceUri? I want to avoid spreading the "mirror" description any further as BaGetter technically does not mirror a source, which has already lead to confusion before, as packages are cached on pull but not actively mirrored. I do understand upstream possibly being confused for an original code repository though.

@jacksga
Copy link
Author

jacksga commented Jan 15, 2026

Happy new year to you too, I'm sorry to hear that, hope you haven't lost anything important except from time and nerves.

When reading your comment I figured well yeah, they are cached, so why not CachedFrom, CacheUri or CacheSource, those seem the most fitting. Would opt to CachedFrom as well as I'd rename the parameters etc from mirror to cache.

If you don't like the idea I will just use SourceUri.

Being back from vacation I do now have the time to finish everything after we sorted the naming thing.

@Regenhardt
Copy link

Welcome back, hope you had a nice vacation. Thanks, yes it was mostly the time, I fortunately had mostly just windows itself on there.

I think CachedFrom is great, it conveys intent and has less other meanings it could be confused with, let's go with that. Don't rename the existing object from the appsettings though, to avoid the breaking change.

@jacksga jacksga force-pushed the feat/mirrored-package-identification branch from d354537 to 5e2b96b Compare January 20, 2026 13:10
@jacksga jacksga requested a review from Regenhardt January 20, 2026 14:46
Copy link

@Regenhardt Regenhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok this should be the last time I send this back, thanks a lot for staying with me on this.

/// <param name="cancellationToken"></param>
/// <returns>The result of the attempted indexing operation.</returns>
Task<PackageIndexingResult> IndexAsync(Stream stream, CancellationToken cancellationToken);
Task<PackageIndexingResult> IndexAsync(Stream stream, string cacheFeedUrl = null, CancellationToken cancellationToken = default);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please create an overload without the new parameter so we can release this without a breaking change to the API.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


public string GetServiceIndexUrl()
{
return "https://disabled-upstream-client.example.org";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually return null here, as there is no upstream.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@hoerup
Copy link

hoerup commented Feb 20, 2026

@jacksga great work and I appreciate your patience on this

Could you implement @Regenhardt's suggestions so this finally can be merged ?

@jacksga jacksga force-pushed the feat/mirrored-package-identification branch from 5e2b96b to b85a525 Compare February 24, 2026 16:54
@jacksga jacksga requested a review from Regenhardt February 24, 2026 16:55
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.

4 participants