client: Allow passing custom download URLs to the download API#17
Open
client: Allow passing custom download URLs to the download API#17
Conversation
There was a problem hiding this comment.
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_urlparameter to the client's download method - Introduces
download_url_schemeattribute 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.
MrGoumX
approved these changes
Sep 30, 2025
66089d6 to
2f48a3c
Compare
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)
2f48a3c to
7e9b66f
Compare
MrGoumX
approved these changes
Oct 1, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_schemeto be able to distinguish what kind is the backend storage (e.g. http, https, s3)