Skip to content

Retry failed gitea tools updates - #852

Merged
gabriel-samfira merged 1 commit into
cloudbase:mainfrom
katexochen:fix-gitea-tools-retry
Aug 20, 2026
Merged

Retry failed gitea tools updates#852
gabriel-samfira merged 1 commit into
cloudbase:mainfrom
katexochen:fix-gitea-tools-retry

Conversation

@katexochen

Copy link
Copy Markdown
Contributor

The giteaUpdateLoop skipped the update whenever metadataURL or useInternal differed from the last successful update, even if giteaToolsUpdateDeadline passed. When the initial fetch failed, this resulted in the tools never being fetched, as oldMetadataURL/oldUseInternal are only assigned after the first successful fetch.

The condition missed a proper application of De Morgan's law. The condition is right further up in the function where it isn't negated. The intended logic is "fetch when stale OR the URL changed OR the internal flag flipped".

The giteaUpdateLoop skipped the update whenever metadataURL or useInternal
differed from the last successful update, even if giteaToolsUpdateDeadline
passed. When the initial fetch failed, this resulted in the tools never
being fetched, as oldMetadataURL/oldUseInternal are only assigned after
the first successful fetch.

The condition missed a proper application of De Morgan's law. The
condition is right further up in the function where it isn't negated.
The intended logic is "fetch when stale OR the URL changed OR the
internal flag flipped".

Signed-off-by: Paul Meyer <katexochen0@gmail.com>

@gabriel-samfira gabriel-samfira left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you!

@gabriel-samfira
gabriel-samfira merged commit a0f76be into cloudbase:main Aug 20, 2026
5 checks passed
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.

2 participants