Skip to content

Conversation

@b4u-mw
Copy link

@b4u-mw b4u-mw commented Dec 3, 2025

Fix for #399

Copy link
Member

@b-rowan b-rowan left a comment

Choose a reason for hiding this comment

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

Seems fine to me, simple enough fix.

@b-rowan
Copy link
Member

b-rowan commented Dec 3, 2025

Can you squash those commits into one, then I will merge.

@easybe
Copy link
Collaborator

easybe commented Dec 3, 2025

I don‘t quite understand why this is needed. We already support hosting files on an external server without having to go through gooseBit to download them.
If that is no longer the case, the CDN use case was broken, which is bad. We should not need to introduce a new configuration option.

@easybe easybe requested a review from jkuri December 3, 2025 20:03
Copy link
Collaborator

@easybe easybe left a comment

Choose a reason for hiding this comment

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

I see, this was broken when S3 support was introduced (b16bb2c). If S3 needs special behaviour, then it should be activated when S3 is chosen as a backend. Maybe @jkuri can help us here.

@b-rowan
Copy link
Member

b-rowan commented Dec 3, 2025

I see, this was broken when S3 support was introduced (b16bb2c). If S3 needs special behaviour, then it should be activated when S3 is chosen as a backend. Maybe @jkuri can help us here.

I would have to look, but any backend shouldn't change the behavior of the remote server, so I would assume this is a regression.

@easybe
Copy link
Collaborator

easybe commented Dec 22, 2025

I commented on the issue: #399 (comment). @jkuri are you around to help us out here?

@jkuri
Copy link
Collaborator

jkuri commented Dec 22, 2025

I commented on the issue: #399 (comment). @jkuri are you around to help us out here?

I'll check later today, but as far as I recall I did fix the CDN issue later after this was introduced.

@easybe
Copy link
Collaborator

easybe commented Dec 22, 2025

@jkuri I answered here. Let's move the conversation to the issue.

@jkuri
Copy link
Collaborator

jkuri commented Dec 22, 2025

I am not sure what is wrong with this fix @easybe? I would rather just simplify it without additional props in configuration;

parsed_uri = urlparse(software.uri)
if parsed_uri.scheme in ("http", "https"):
    href = software.uri
else:
    # this still handles files prefixed with s3:// or file:// like before
    href = str(request.url_for("download_artifact", dev_id=device.id))

@easybe
Copy link
Collaborator

easybe commented Dec 22, 2025

I am not sure what is wrong with this fix @easybe? I would rather just simplify it without additional props in configuration;

parsed_uri = urlparse(software.uri)
if parsed_uri.scheme in ("http", "https"):
    href = software.uri
else:
    # this still handles files prefixed with s3:// or file:// like before
    href = str(request.url_for("download_artifact", dev_id=device.id))

Yes, that looks fine to me. Definitely no additional setting for this.

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