Skip to content

client: Allow passing custom download URLs to the download API#17

Open
avgerin0s wants to merge 2 commits intomasterfrom
download_url
Open

client: Allow passing custom download URLs to the download API#17
avgerin0s wants to merge 2 commits intomasterfrom
download_url

Conversation

@avgerin0s
Copy link
Member

The download URL is the url returned in the downloader callback, depicting the location of the downloader's job result for the client to go and fetch it.

Up to now the downloader server added a default download URL to all of the callbacks assuming that all of its jobs result in the same storage.

Now that downloader supports passing custom downloadURL per job we need to support it on the client side also.

This commit also adds a new attribute in callbacks, named download_url_scheme to be able to distinguish what kind is the backend storage (e.g. http, https, s3)

@avgerin0s avgerin0s requested a review from Copilot September 24, 2025 09:04
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for custom download URLs in the Ferto client's download API, allowing the downloader to specify different storage locations for job results rather than using a default URL scheme.

  • Adds a download_url parameter to the client's download method
  • Introduces download_url_scheme attribute to the callback for identifying storage backend type (e.g., s3, http, https)
  • Updates test specifications to handle the new parameter throughout the codebase

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
lib/ferto/client.rb Adds download_url parameter to download method and includes it in request body
lib/ferto/callback.rb Adds download_url_scheme attribute that parses the scheme from download_url
spec/ferto/client_spec.rb Updates test arrays to include the new download_url parameter
spec/ferto/callback_spec.rb Adds test coverage for download_url_scheme parsing
CHANGELOG.md Documents the new feature in version 0.2.0

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@avgerin0s avgerin0s marked this pull request as ready for review September 30, 2025 11:53
The download URL is the url returned in the downloader callback,
depicting the location of the downloader's job result for the client to
go and fetch it.

Up to now the downloader server added a default download URL to all of
the callbacks assuming that all of its jobs result in the same storage.

Now that downloader supports passing custom downloadURL per job we need
to support it on the client side also.

This commit also adds a new attribute in callbacks, named
`download_url_scheme` to be able to distinguish what kind is the backend
storage (e.g. http, https, s3)
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.

3 participants