On Tue, 2023-11-14 at 18:50 +0100, Abderrahim Kitouni wrote: > I've read the proposal and while I think it is okay, it doesn't cover > everything needed by the "putting tarballs in gitlab using git-lfs" > usecase. For that usecase, we have an additional requirement which is > authentication. Right now, the plugins that download a single file > only support basic http authentication using .netrc, which isn't > enough for gitlab. Maybe that should be a different issue that needs > to be handled separately, but the fact that which authentication > method to use depends on the host, and the host can be changed by the > mirror plugin makes me think they might be related.
It may be acceptable to cover this in an additional API that provides authentication details for a host (after mirror translate_url), although a combination may also make sense. Even if it's handled by a separate method, it may make sense that that method is also part of the SourceMirror plugin API. As mentioned in my previous mail, a Remote Asset API-based approach could also handle authentication. However, it may be desirable to support other authentication methods also without a (custom) Remote Asset server. > Le mer. 20 sept. 2023 à 06:57, Tristan van Berkom > <[email protected]> a écrit : > [...] > > def translate_url( > > self, > > url: str, > > project_name: str, > > alias_name: str, > > alias_url: Optional[str], > > ) -> Optional[str] > > Maybe this is out of scope for this, but would it be possible to > differentiate between git and "raw file" urls in this new api? It > would require cooperation from the source plugins, but I think it's > reasonable to do it in a new API. If we extend the Source class to differentiate between different URL types, we should definitely consider alignment with the Remote Asset API instead of inventing our own structure for that. It would be good to not require a second Source class API addition for future Remote Asset support. Cheers, Jürg
