Skip to content

[Fix] Gitea credentials expire after task wake-up - #1199

Merged
mrubens merged 1 commit into
developfrom
fix/gitea-credential-refresh-0f7492hwjjwur
Aug 10, 2026
Merged

[Fix] Gitea credentials expire after task wake-up#1199
mrubens merged 1 commit into
developfrom
fix/gitea-credential-refresh-0f7492hwjjwur

Conversation

@roomote-roomote

Copy link
Copy Markdown
Contributor

​Opened on behalf of @mrubens. Follow up by mentioning @roomote-roomote, in the web UI, or in Slack.

What changed

  • Carry Gitea OAuth expiration through task credential creation and mixed-provider credential metadata.
  • Schedule credential refresh before the earliest known provider expiration, including after a task resumes from sleep.
  • Bound Gitea refresh requests and keep transient provider failures retryable while still requiring reauthorization for revoked refresh grants.
  • Cover expiry propagation, mixed-provider scheduling, transient failures, revoked grants, and request timeouts with focused tests.

Why this change was made

Resumed tasks could reuse a Gitea token near the end of its lifetime and then wait for the fixed refresh interval, leaving Git operations unauthenticated after the token expired. Transient refresh failures could also incorrectly disable the deployment connection.

Impact

Gitea-backed tasks refresh credentials before expiration across fresh, resumed, and mixed-provider runs. Temporary Gitea outages remain retryable, and stalled refresh calls no longer block the credential loop indefinitely.

@roomote-community

roomote-community Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

No code issues found. See task

Reviewed f499773

@mrubens
mrubens marked this pull request as ready for review August 10, 2026 16:05
@mrubens
mrubens merged commit cd8f534 into develop Aug 10, 2026
18 checks passed
@mrubens
mrubens deleted the fix/gitea-credential-refresh-0f7492hwjjwur branch August 10, 2026 16:06
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.

1 participant