Skip to content

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

Closed
avgerin0s wants to merge 2 commits into
masterfrom
download_url
Closed

avgerin0s wants to merge 2 commits into
masterfrom
download_url

Conversation

@avgerin0s

Copy link
Copy Markdown
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

Copilot AI left a comment

Copy link
Copy Markdown

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.

Comment thread lib/ferto/callback.rb Outdated
Comment thread lib/ferto/client.rb Outdated
@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)
@ftsamis

ftsamis commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Closing as not needed (see skroutz-internal/sre-task-management#885). The downloader already supports per-job storage via s3_bucket/s3_region, and every current client works with the single global download_url, so the client does not need to pass a custom download URL.

@ftsamis ftsamis closed this Oct 2, 2026
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