Skip to content

Merge development into production - #476

Merged
rbruhn merged 4 commits into
mainfrom
development
Oct 4, 2026
Merged

rbruhn merged 4 commits into
mainfrom
development

Conversation

@rbruhn

@rbruhn rbruhn commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • promote the current development branch to production

Included

Deployment

  • No migrations and no data updates (update_queries_operation is '').
  • Production subjects already uses imageId (no id field), which this release relies on.
  • Optional after deploy: php artisan files:cleanup-orphaned --dry-run should list only uploads/projects/logos/1761087456_badge1.png.

Validation

  • development deployment completed
  • 5,000-subject expedition save on development: 2.69 s server time (previously 10–15 s); bulk MongoDB attach of 5,000 subjects measured at 0.76 s on development

rbruhn added 4 commits October 3, 2026 19:28
- Treat each avatar's medium and small variants as referenced; only the
  original path is stored, so a live run deleted in-use variants.
- Scan upload directories recursively so files left in retired layouts
  (the old expedition logos/original and logos/medium) are found.
- Skip hidden placeholder files such as .gitkeep.
- Use a keyed lookup for referenced paths and return an exit code.
- Fail with an incomplete-results message when a directory cannot be
  listed or a file cannot be deleted, instead of reporting 0 orphans.

Closes #464
Rework files:cleanup-orphaned for current upload layouts
Attaching or detaching subjects loaded and saved each subject one at a
time: two round trips per subject, about 36 seconds for 20,000 subjects
locally. Use chunked $addToSet/$pull updates instead (about 1.2 seconds
for 20,000).

- SubjectService: bulk attachSubjects()/detachSubjects() in chunks of
  1,000, plus getIdsByExpeditionId() and countByExpeditionId().
- ExpeditionService: store()/update() write MySQL only; saveSubjects()
  applies the selection afterwards and sets the stat and actor totals
  from the MongoDB count. The MongoDB rollback code is removed; the
  updates are idempotent, so a failed save is fixed by resubmitting.
- ExpeditionController: if subjects fail to save, the expedition stays
  saved and the user is sent to edit and resubmit. New-expedition
  notifications are sent after subjects save.
- ExpeditionFormRequest: validate subject-ids against
  config('config.expedition_size').

Closes #332
Save expedition subjects with bulk MongoDB updates
Fixes #332
@rbruhn
rbruhn merged commit f61104c into main Oct 4, 2026
4 checks passed

This branch was successfully deployed

1 active deployment
development — bc3c4f41 Deployed Oct 4, 2026 by rbruhn via build-and-deploy-development #277
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.

Cleanup CleanupOrphanedS3UploadFiles Move Expedition create or edit into Job

1 participant