Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support declaring objects path for seeding buckets #2591

Merged
merged 1 commit into from
Aug 7, 2024

Conversation

sweatybridge
Copy link
Contributor

@sweatybridge sweatybridge commented Aug 6, 2024

What kind of change does this PR introduce?

feature

What is the new behavior?

Allows configuring an objects_path for seeding buckets. Files under the path will be uploaded to their respective bucket.

[storage.buckets.images]
objects_path = "./images"

Path will be resolved relative to config.toml, ie. the path above resolves to supabase/images.

Also seeds automatically when running the following commands locally

  • supabase start
  • supabase db reset

For hosted projects, a separate command needs to be run:

  • supabase seed buckets

Additional context

This works fine for small objects but large files will require a separate solution.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 10269536805

Details

  • 21 of 32 (65.63%) changed or added relevant lines in 5 files are covered.
  • 5 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.06%) to 60.129%

Changes Missing Coverage Covered Lines Changed/Added Lines %
cmd/seed.go 0 1 0.0%
internal/seed/buckets/buckets.go 9 13 69.23%
internal/db/reset/reset.go 0 6 0.0%
Files with Coverage Reduction New Missed Lines %
internal/gen/keys/keys.go 5 12.9%
Totals Coverage Status
Change from base Build 10247406942: -0.06%
Covered Lines: 6343
Relevant Lines: 10549

💛 - Coveralls

@sweatybridge sweatybridge changed the title feat: support objects path for seeding buckets feat: support declaring objects path for seeding buckets Aug 6, 2024
@sweatybridge sweatybridge merged commit f559eb7 into develop Aug 7, 2024
9 checks passed
@sweatybridge sweatybridge deleted the seed-objects branch August 7, 2024 04:10
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.

2 participants