Skip to content

fix(imports): use s3 storage for temporary csv imports - #630

Merged
smarcet merged 2 commits into
mainfrom
fix/imports-storage-configurable
Oct 11, 2026
Merged

smarcet merged 2 commits into
mainfrom
fix/imports-storage-configurable

Conversation

@smarcet

@smarcet smarcet commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

CSV imports (tickets, events, registration companies, selection plan allowed members) save the uploaded file to storage, then a queued job reads it back, processes it and deletes it. SummitService, SummitOrderService and SummitSelectionPlanService were hard bound to the Swift storage strategies for that temporary file.

On dev the Swift backend is failing: every ticket import job (ProcessTicketDataImport) dies about 3 seconds after starting with OpenStack\Common\Error\BadResponseError: HTTP Error, before processing any row. The upload request still returns OK, so the admin sees no error and nothing gets imported.

This PR binds the three services to S3StorageFileUploadStrategy / S3StorageFileDownloadStrategy (the s3 disk, AWS_* vars). The storage only holds temporary import files under tmp/… that are deleted when the job finishes, so no persisted data is left in Swift.

Deployment steps

  • The s3 disk must be configured (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION, AWS_BUCKET, AWS_ENDPOINT) with write access to the bucket.
  • php artisan queue:restart after deploy so workers pick up the new binding.
  • Any import job queued with the old binding will look for its file in Swift and fail; re-upload it.

Tests

Resolved the three services from the container and checked both strategies report the s3 driver:

SummitOrderService s3/s3
SummitService s3/s3
SummitSelectionPlanService s3/s3

Summary by CodeRabbit

  • Updates
    • File uploads and downloads for summit workflows, including orders and selection plans, now use S3 storage instead of Swift. This changes the storage service used for these file operations.

… s3)

Ticket, event, registration company and selection plan member imports
were hard bound to the swift storage strategies. Add
FILESYSTEMS_IMPORTS_STORAGE (default swift) so an environment without a
working swift backend can use the s3 disk instead.
Drop the FILESYSTEMS_IMPORTS_STORAGE switch: ticket, event, registration
company and selection plan member imports are bound to the s3 strategies
unconditionally.
@coderabbitai

coderabbitai Bot commented Oct 11, 2026

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7944e4d6-ab96-49c5-a14b-30bb58c8cf8d

📥 Commits

Reviewing files that changed from the base of the PR and between eb3839d and 81c4e5e.


📒 Files selected for processing (1)
  • app/Services/ModelServicesProvider.php

 _________________________________
< Never fear, CodeRabbit is here! >
 ---------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR

🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

📘 OpenAPI / Swagger preview

➡️ https://OpenStackweb.github.io/summit-api/openapi/pr-630/

This page is automatically updated on each push to this PR.

@smarcet
smarcet merged commit 1d71f05 into main Oct 11, 2026
35 of 39 checks passed
smarcet added a commit that referenced this pull request Oct 12, 2026
#630 bound the ticket, event, registration company and selection plan
member imports to the s3 storage strategies, but the tests still faked
and wrote to the swift disk. In CI the real s3 disk has no region, so
the imports threw "Missing required client configuration options" and
SummitServiceTest, SummitSelectionPlanServiceTest and the oauth2 ingest
tests failed.

Fake and write to the s3 disk instead, and fake it in the two ticket
ingest tests that previously relied on the real disk.
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