Skip to content

feat: lifecycle configuration control plane - #1338

Open
ferhatelmas wants to merge 3 commits into
masterfrom
ferhat/lifecycle-control-plane
Open

feat: lifecycle configuration control plane#1338
ferhatelmas wants to merge 3 commits into
masterfrom
ferhat/lifecycle-control-plane

Conversation

@ferhatelmas

Copy link
Copy Markdown
Member

What kind of change does this PR introduce?

feat

What is the new behavior?

Add schema for lifecyle configuration and REST/S3 routes to get/put/delete gated by global feature flag.

@ferhatelmas
ferhatelmas requested a review from a team as a code ownerAugust 18, 2026 11:12
CopilotAI lite review requested due to automatic review settings August 18, 2026 11:12

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Comment threadsrc/http/plugins/xml.test.ts Dismissed
Comment threadsrc/storage/storage.ts
@coveralls

coveralls commented Aug 18, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 32860587778

Coverage increased (+0.4%) to 81.687%

Details

  • Coverage increased (+0.4%) from the base build.
  • Patch coverage: 10 uncovered changes across 3 files (281 of 291 lines covered, 96.56%).
  • No coverage regressions found.

Uncovered Changes

FileChangedCovered%
src/storage/lifecycle/configuration.ts15614894.87%
src/http/routes/bucket/lifecycle.ts313096.77%
src/storage/protocols/s3/s3-handler.ts201995.0%
Total (13 files)29128196.56%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines:13518
Covered Lines:11484
Line Coverage:84.95%
Relevant Branches:8030
Covered Branches:6118
Branch Coverage:76.19%
Branches in Coverage %:Yes
Coverage Strength:690.05 hits per line

💛 - Coveralls

Comment threadsrc/storage/lifecycle/configuration.ts
Comment threadsrc/storage/schemas/lifecycle.ts Outdated
Comment threadsrc/storage/protocols/s3/s3-handler.ts Outdated
Comment threadsrc/http/routes/bucket/lifecycle.ts
@ferhatelmas
ferhatelmasforce-pushed the ferhat/lifecycle-control-plane branch from 316c6d8 to 3a7d9ceCompareAugust 18, 2026 11:49
@ferhatelmas

Copy link
Copy Markdown
MemberAuthor

@claude always review

Comment threadsrc/storage/protocols/s3/s3-handler.ts
Comment threadsrc/storage/schemas/lifecycle.ts
Comment threadsrc/storage/database/pg.ts Outdated
Comment threadsrc/storage/database/pg.ts
Comment threadsrc/storage/database/pg.ts
Signed-off-by: ferhat elmas <elmas.ferhat@gmail.com>
Signed-off-by: Ferhat Elmas <elmas.ferhat@gmail.com>
@ferhatelmas
ferhatelmasforce-pushed the ferhat/lifecycle-control-plane branch from 3a7d9ce to 10e3120CompareAugust 25, 2026 14:23
Comment on lines +137 to +140
EXECUTE format(
'CREATE TRIGGER protect_bucket_control_insert BEFORE INSERT ON storage.buckets FOR EACH ROW EXECUTE FUNCTION storage.protect_bucket_control_columns(%L)',
service_role
);

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GuptaManan100 this was working a week ago but now it's failing with

EXECUTE of a runtime-built statement inside a PL/pgSQL body is not supported: the statement text is not a constant, so it cannot be checked for unsafe session-state changes

is it expected?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MT_UNSAFE_POOLER_MODE: "true" seems silencing it but does it have any drawbacks to be aware of?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For completeness, it fails its first example in https://github.com/supabase/storage/blob/master/migrations/tenant/0002-storage-schema.sql but we can't change old migrations.

This commit seems working, 64dd33d

Signed-off-by: Ferhat Elmas <elmas.ferhat@gmail.com>
@TylerHillery
TylerHillery self-requested a review August 25, 2026 19:39
Sign up for freeto 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.

5 participants

@ferhatelmas@coveralls@TylerHillery@github-advanced-security