fix backups #62
Open
danijel.simeunovic
wants to merge 3 commits from
hotfix/gitea-backup into main
pull from: hotfix/gitea-backup
merge into: :main
:main
:fix/forte-drop-pg-backup-rclone
:hotfix/gitea-backup
:renovate/all-minor-patch
:feature/ai-bot
:renovate/traefik-41.x
:renovate/aws-6.x
:renovate/google-8.x
:fm/launchpad-forte-cli
:renovate/kubernetes-monorepo
:feature/forte-prod
:fix/drop-duplicate-keycloak-secret
:feature/dns01
:feat/forte-drop-infra
:feature/ppusher
:feature/chibisafe
:hotfix/backup
:feature/vault-migration
:feature/hashicorp-vault
:feature/homepage
:feature/argocd-rbac
:feature/argocd-tls
:feature/multi-cloud
:feature/karpor
:feature/backstage
:feature/ai-review
:gitea-pages
:feature/gitea-docs
:feature/multicluster
:feature/secret-syncing
:feature/smtp
Dismiss Review
Are you sure you want to dismiss this review?
No labels
Milestone
No items
No Milestone
Assignees
ai_bot (Forte AI Bot)
aslak.ege (Aslak Ege)
danijel.simeunovic (Danijel Simeunovic)
edvard.unsvag (Edvard Unsvåg)
eilif.akerjordet (Eilif Akerjordet)
ellina.ivleva (Ellina Ivleva)
fredrik.heistad (Fredrik Heistad)
frode.haugarne (Frode Selnes Haugarne)
gitea_admin
grysiri (Gry Siri Eggen)
henrik.farstad (Henrik Farstad)
jorgen.stensrud (Jørgen Stensrud)
kristoffer.kopperud (Kristoffer Markus Kopperud)
nina.marie.wahl (Nina Marie Wahl)
ola.skarphol
oystein.roti (Øystein Roti)
peter.froystad (Peter Frøystad)
petter.schultz (Petter Schultz)
ragnhild.hande (Ragnhild Aaraas Hånde)
Thomas-Mannsverk-Eliassen (Thomas Mannsverk Eliassen)
thomas.solbjor (Thomas Solbjor)
trond.tomtebakken (Trond Andre Tømtebakken)
vibearchitect (Rolf Alexander Valstad)
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Forte/launchpad#62
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📝 README Sync
Checking whether the code changes in PR #62 require documentation updates.
README.md,README.*.md,doc/**/*.md,docs/**/*.mdoffer-as-pr📝 README Sync
No documentation changes were needed for PR #62.
🤖 AI Code Review
Review: "fix backups"
1. Blocking issues
1. Pruning now deletes everything in the bucket older than 7 days (important)
cluster-resources/gitea-backup-cronjob.yaml,rclone delete --min-age 7d "s3:${S3_BUCKET}/" || truerclone deleteis recursive by default. It removes every object older than 7 days under the bucket root, not just Gitea dumps.forte-drop-postgresqlpg-backup-cronjob, or manually kept archives), those objects are silently destroyed.mc rm --older-thancall had no--recursive. It likely failed and was swallowed by|| true, so this is effectively the first time pruning will actually delete anything. That makes it a real behaviour change.--dry-runagainst the real bucket.2. Pinned image tags must be confirmed to exist and match the server (important)
image: gitea/gitea:1.27.0andimage: rclone/rclone:1.75.2ImagePullBackOff. A non-existent tag reproduces the same failure.appVersionand anyimage.tag/image.rootlessoverride ininfra/values/*/gitea-values.yaml./data/gitea/conf/app.inipath assumes the rootful layout.2. Non-blocking suggestions
3. Possible bucket check failure (minor)
copytostep.ListBuckets/CreateBucket) on MinIO or another S3 backend, the upload can fail.RCLONE_S3_NO_CHECK_BUCKET=true. ConsiderRCLONE_CONFIG_S3_REGIONtoo if the endpoint requires one.4. Credentials are re-exported in the script (minor)
export RCLONE_CONFIG_S3_ACCESS_KEY_ID="${AWS_ACCESS_KEY_ID}"and the related exports.RCLONE_CONFIG_S3_ENV_AUTH=true, which lets rclone readAWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEYdirectly. Only the endpoint would then need exporting.5. Silent version drift risk (minor)
renovate.jsonrule that disablesgitea/giteaupdates for the cronjob.groupNamethat links the chart and the image so they move together.6. Unrelated notification change bundled in (minor)
apps/overlays/upc-dev/ai-git-bot/ai-git-bot.yaml, the newnotifications.argoproj.io/subscribe.*.slack: ""annotations.on-sync-succeededcombined withselfHeal: truecan be noisy.7. Deleted
apps/charts/claude-impl.md(no change needed)Removing this AI session transcript is a good cleanup. It shouldn't live in the repo.
3. Tests
kubectl -n gitea create job --from=cronjob/gitea-backup gitea-backup-manual.gitea-dump-*.zip. Run it with--dry-runfirst.scripts/gitea-restore.sh, to prove the backup is usable.4. Overall assessment
The direction is right: replacing the now-private
minio/mcimage and pinning the dump image to the server version is the correct fix. However, the newrclone deleteis unscoped and can wipe unrelated data in the bucket, and both image tags need verification. Request changes on item 1. Confirm item 2 before merging.Automated review by AI Git Bot
New commits pushed, approval review dismissed automatically according to repository settings
@ai_bot review if there are blockers for merging this PR
🤖 Follow-up
I don't see any hard blockers. The backup fix looks correct. Before merging, I'd check the two version numbers it relies on and deal with the changes that have nothing to do with backups.
The backup fix (
cluster-resources/gitea-backup-cronjob.yaml)minio/mc:latestto the pinnedrclone/rclone:1.75.2is reasonable.command:replaces rclone's default entrypoint, and the image includessh, sosh -cwill work.HOME=/tmp, nothing needs to be written to a config file, which suits a container running as user 1000.rclone copytodoes the same job asmc cp.delete --min-age 7dremoves only files older than 7 days, the same asmc rm --older-than 7d.set -emeans a failed upload now fails the Job. Before, the prune step still ran and the Job could be marked as succeeded. That's an improvement.28.0.0tag) is the right fix, and the new rule inrenovate.jsoncorrectly keeps Renovate from bumping it on its own.Check before merging (not blockers)
1.27.0really the version the chart runs? The comment says chart12.7.0ships Gitea1.27.0. I couldn't confirm this from the repo, and nothing ininfra/values/*/gitea-values.yamloverrides the image. If the versions differ, the dump fails exactly as before. Runninghelm show chart gitea --repo https://dl.gitea.com/charts --version 12.7.0will show the real version.rclone/rclone:1.75.2andgitea/gitea:1.27.0tags actually exist? A wrong tag meansImagePullBackOffagain. Running the job once by hand (kubectl create job --from=cronjob/gitea-backup …) after syncing is the quickest way to confirm the whole fix.PROVIDER=Otherwith no region orforce_path_styleset works with MinIO-style storage. Some S3-compatible providers needRCLONE_CONFIG_S3_REGIONset. Check this against whatS3_ENDPOINTpoints to.gitea-dump-*files. If the bucket is shared, consider adding--include "gitea-dump-*.zip".Changes not related to backups
The PR is titled "fix backups" and has no description, but it also:
.gitea/workflows/ai-review.yaml. This removes the AI PR-review CI. If that's on purpose (perhaps the new ai-git-bot replaces it), say so. Some leftovers become stale:docs/REFERENCE.md(lines ~1316–1373) still documents the workflow..gitmodulesand theshared-promptssubmodule now look unused.apps/charts/claude-impl.md. This was a pasted chat transcript, so removing it is good.ai-git-bot. These match the other apps (forte-drop,musicman, etc.), so they're fine.I'd recommend splitting these out, or at least listing them in the PR description so the CI removal doesn't go unnoticed. It's a process concern, not a technical one.
Verdict: OK to merge once you've confirmed items 1–2, ideally with one manual job run. Fix the stale docs and submodule now or in a follow-up.
Read-only agentic review follow-up by AI Git Bot
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.