Skip to content

fix: reattempt password validity reset on any expiration error#2927

Merged
CasLubbers merged 9 commits intomainfrom
APL-1506
Feb 11, 2026
Merged

fix: reattempt password validity reset on any expiration error#2927
CasLubbers merged 9 commits intomainfrom
APL-1506

Conversation

@merll
Copy link
Contributor

@merll merll commented Feb 9, 2026

📌 Summary

This PR aims to fix a sporadically reoccurring issue where the Gitea password is marked as expired while Gitea is either initialized or upgraded. This was implemented before, but only once during an upgrade.

🔍 Reviewer Notes

The function resetGiteaPasswordValidity has not been modified but moved because it is no longer only part of an upgrade. It was using utility functions of the k8s module; therefore waitTillGitRepoAvailable was moved out as well for avoiding mutual dependencies. This function was modified to invoke the password validity reset.

🧹 Checklist

  • Code is readable, maintainable, and robust.
  • Unit tests added/updated

Copy link
Contributor

@j-zimnowoda j-zimnowoda left a comment

Choose a reason for hiding this comment

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

Tested on running cluster bu logging to gitea pod and performing

gitea-6cbbbb5f46-vnqhc:/var/lib/gitea$ gitea admin user must-change-password otomi-admin
Updated 1 users setting MustChangePassword to true

Then restarted the apl-operator and saw the following logs:

Collected logs

2026-02-09T14:13:46.720Z otomi:cmd:traces:collectTraces:info Collecting traces from cluster resources...
remote: Update your password
fatal: Authentication failed for 'http://gitea-http.gitea.svc.cluster.local:3000/otomi/values.git/'
2026-02-09T14:13:46.885Z otomi:common:gitea:resetGiteaPasswordValidity:info Resetting status of Gitea admin credentials
2026-02-09T14:13:47.294Z otomi:cmd:traces:collectTraces:info Trace report stored in ConfigMap apl-operator/apl-traces-report (11 issues)
2026-02-09T14:13:47.298Z otomi:common:gitea:resetGiteaPasswordValidity:info  Updated 1 users setting MustChangePassword to false

2026-02-09T14:13:47.383Z otomi:operator:git-repository:info Cloning repository to /home/app/stack/env

@CasLubbers
Copy link
Contributor

Need to update this in the BYO Git branch

@CasLubbers CasLubbers merged commit 6087291 into main Feb 11, 2026
13 checks passed
@CasLubbers CasLubbers deleted the APL-1506 branch February 11, 2026 09:31
Ani1357 pushed a commit that referenced this pull request Feb 17, 2026
Co-authored-by: svcAPLBot <174728082+svcAPLBot@users.noreply.github.com>
(cherry picked from commit 6087291)
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