fix(forgejo): persist sessions to disk instead of memory #356
No reviewers
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ldraney/pal-e-platform!356
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-forgejo-session-provider"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Switch Forgejo session provider from
memorytofileso sessions survive pod restarts.Changes
PROVIDER = "file"to Forgejo Helm session configTest Plan
tofu apply— confirmedPROVIDER = filein running podReview Checklist
Related Notes
Closes #336
Root cause: every pal-e-platform merge triggers CI apply → Forgejo pod restart → all in-memory sessions wiped → user logged out.
Tofu Plan Output (targeted: forgejo)
PR #356 Review
DOMAIN REVIEW
Tech stack: Terraform (HCL) / Helm / Kubernetes
This is a single-line Terraform change adding
PROVIDER = "file"to the Forgejo Helm release session config block interraform/modules/forgejo/main.tf.Terraform/Helm assessment:
tofu fmtcompliant -- alignment matches the existing block style (consistent padding with surrounding keysSESSION_LIFE_TIMEandCOOKIE_SECURE).PROVIDER = "file"value is a valid Forgejo/Gitea session provider. File-based sessions store to/data/sessionsinside the container.Storage verification: The
persistenceblock (lines 182-186) confirms a 10Gi PVC withlocal-pathstorageClass is enabled. Forgejo mounts this at/data, so file-based sessions at/data/sessionswill persist across pod restarts. This is the correct fix for the stated problem.No secrets exposure: The only sensitive value in this module (
forgejo_admin_password) is properly handled viaset_sensitive(line 215-219). The new line introduces no credentials.BLOCKERS
None.
This is a configuration-only change (one Helm value). No new functionality requiring test coverage. No user input handling. No secrets. No auth logic duplication.
NITS
SESSION_LIFE_TIME value: 604800 seconds = 7 days. Not introduced by this PR, but worth noting this is a reasonable session lifetime for an internal Forgejo instance behind Tailscale. No action needed.
Test plan gap: The PR body shows one test plan item is still unchecked ("Confirm session survives next pal-e-platform merge"). This is expected -- it can only be validated post-merge. The checked item ("Applied via tofu apply -- confirmed PROVIDER = file in running pod") is sufficient for pre-merge confidence.
SOP COMPLIANCE
fix-forgejo-session-provider, not336-fix-forgejo-session-provider. Convention expects{issue-number}-{kebab-case-purpose}.fix(forgejo): persist sessions to disk instead of memory.PROCESS OBSERVATIONS
336-. This is a nit for a hotfix-style PR, not a blocker.VERDICT: APPROVED