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

Odd rotating-url behavior? #438

Open
guihkx opened this issue Sep 17, 2024 · 4 comments
Open

Odd rotating-url behavior? #438

guihkx opened this issue Sep 17, 2024 · 4 comments

Comments

@guihkx
Copy link

guihkx commented Sep 17, 2024

On the Discord repository, there have been many pull requests made by this bot that simply change the URL of a .tar.gz source back and forth, even though its sha256 sum never changes:

Additionally, the metainfo file is getting many duplicated <release> tags.

Maybe the bot shouldn't open a pull request if the hash of a source didn't change and it's not an extra-data type?

@games647
Copy link

The War Thunder flatpak has the same issue, that forced them to disable auto-merge

Reference #373

@wjt
Copy link
Contributor

wjt commented Sep 18, 2024

On the Discord repository, there have been many pull requests made by this bot that simply change the URL of a .tar.gz source back and forth, even though its sha256 sum never changes:

The way the rotating-url checker works is that it fetches the given URL and keeps following redirects until it finds an actual file. Evidently sometimes this redirects to a URL that does not match the given pattern.

Maybe the bot shouldn't open a pull request if the hash of a source didn't change and it's not an extra-data type?

I would prefer "if the hash of a source didn't change and the old URL still resolves". Alternatively you might consider "ignore redirects that don't match the given pattern".

@Fuseteam
Copy link

another pr on discord's side xd flathub/com.discordapp.Discord#444

guihkx added a commit to guihkx/com.discordapp.Discord that referenced this issue Sep 18, 2024
At least until upstream addresses the following issue:

flathub-infra/flatpak-external-data-checker#438

This is to prevent the bot from opening (and merging) multiple pull
requests that point to the same version.

Closes flathub#437
guihkx added a commit to guihkx/com.discordapp.Discord that referenced this issue Sep 18, 2024
At least until upstream addresses the following issue:

flathub-infra/flatpak-external-data-checker#438

This is to prevent the bot from opening (and merging) multiple pull
requests that point to the same version.

Closes flathub#437
@games647
Copy link

games647 commented Sep 18, 2024

@wjt

"if the hash of a source didn't change and the old URL still resolves"

This would mean that the file always have to be downloaded even if a version pattern is given. Although looking at the current code, this is the current behavior, this is not really a great solution for bigger applications to be re-downloaded for each check. Nevertheless, I created a PR that uses this solution: #439

Alternatively you might consider "ignore redirects that don't match the given pattern".

If we ignore those redirects, we might miss new releases. Especially in use cases where the provider will only use those URLs (01.download.example.com, 02.download.example.com) instead.

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

No branches or pull requests

4 participants