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

Provide getHttpsUrl() for Transfer Classes, option to use them in retrievePath messages. #1016

Open
petersilva opened this issue Apr 16, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@petersilva
Copy link
Contributor

When publishing a product to a cloud resource, we often want to make the product as easy to download as possible. Having a cloud-provider specific url scheme for the download requires the client to install specific drivers for the cloud provider. That can be fine, but it is an additional burden. Cloud providers generally do provide raw https() end points which can be used by cloud oblivious tools such as wget.

It would be nice to have an option... something like:

retrieveRawHTTPs True|False.

If set to false, then the retrieval URL's are "azure://... "
if set to true, then the retrieval URL's are "https://... "

so when the option is set, the consumer of the messages can download using wget, or any browser (anything that can consumer https) rather than needing an Azure (or S3) specific client.

One thing that I'm vague on... in all other contexts we split the URL into baseUrl and the rest. I'm wondering whether the a gethttpsUrl() entry should return a tuple of baseUrl and the rest also, or the more natural complete Url.
If it returns the complete one, then the calling logic will need to split it up to obtain the baseUrl ...

I have thought of two ways of implementing this so far:

  • have the ls() command of the transfer, set an "httpsUrl" for each SFTPFileAttributes entry a cloud Transfer implementation creates. The caller digesting the ls() output, then uses the retrieveRawHttps setting to choose which fields are used to build the message.

  • not modify ls() at all, instead add getHttpsUrl() which, can, given an azure: url return the equivalent https one ( as a tuple, or perhaps just a relative path... ) when in this mode, processing listings will involve calling that new entry point for every file returned by ls()...

either method will work. Other suggestions welcome...

@gcglinton has agreed to work on implemeting the transformation to https. @petersilva can then use that to modify the internal sr3 logic.

This would be great/useful for S3 and Azure.

@petersilva petersilva added the enhancement New feature or request label Apr 16, 2024
@gcglinton
Copy link
Contributor

Implemented this in the new Azure transfer class from #1015.

Specifically, the gethttpsUrl method is here, and the ls() properties are set here.

It's likely not pretty, but it might work?

Would need to implement the desired functionality/method in the S3 driver as well.

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

No branches or pull requests

2 participants