The user is requesting the ability to generate service role keys with limited access, specifically for backing up Supabase storage to S3 without database access. This suggests a need for more granular control over key permissions.
The user is asking if they can safely set the 'Strict-Transport-Security' header in Supabase edge functions without causing issues. They seek confirmation on whether this is allowed or could potentially cause problems.
The user is attempting to map a full_name attribute using first name, last name, and infix provided by their IdP. They are seeking a way to merge these attributes since their IdP does not provide a full_name attribute directly.
If anyone else has any suggestions, I would love to hear it
No problem, thanks for looking into this!
Does anyone have any suggestions?
Hmm maybe not, the IDE isnt complaining anymore but deno check still complains?
Should probably be mentioned in the docs lol
Found the issue Add "types": ["jsr:@supabase/functions-js/edge-runtime.d.ts"] to your deno.json
https://supabase.com/docs/guides/functions/recursive-functions?queryGroups=client&client=supabase-js#handling-rate-limit-errors
I feel like I set something up wrongly. But I did everything according to the edge function docs
Same issue here but with Deno.errors.RateLimitError ```ts try { await fetch(reqUrl, { method: "POST", headers: chainHeaders, body: chainBody }); break; } catch (err) { if (err instanceof Deno.errors.RateLimitError && attempt < RETRY_ATTEMPTS - 1) { // Back off for the platform-recommended duration before retrying the chain call await new Promise((resolve) => setTimeout(resolve, err.retryAfterMs)); } else { Sentry.captureException(err); break; } } } ``` Property 'RateLimitError' does not exist on type 'typeof errors'.deno-ts(2339)
Because whatever I do I cant get the IDE to recognize EdgeRuntime. For now I did this as a workaround: ```ts declare const EdgeRuntime: { waitUntil: (promise: Promise<unknown>) => void; }; ```
My bad, so the docs specify a pattern where you can do this: https://supabase.com/docs/guides/functions/background-tasks Howevery when I try to use EdgeRuntime it says cannot find name EdgeRuntime in my IDE. So I though I should import it, but nothing has this export. So maybe it's a global that I should have added in for example my deno.json
Ah I see, I actually like that rule so I will just have to ignore it
It wants me to do: Function private.run_nightly_maintenance has a role mutable search_path But I cant for this function because i wont be able to commit;
Anyone know whats going on?
I also checked the prod org, in case they mixed orgs up. But this one also doesnt exceed and limits and has no spend caps.
If someone knows the cause I would love to hear it!
Nope fully client side on sveltekit. It is able to force release the lock in my case after 5m
Yes of course, almost forgot to update you haha There are 2 things you can do, either try and get the IdP to include the claims in openid. Or instead of setting as OIDC set as oauth2.0 because that will force supabase to hit the endpoint anyways. I tried both and it didnt work for us so I will have to contact them again...
Yes exactly, when including openid, the IdP has some claims, but they wont appear in users.raw_user_metadata. I talked with the auth team, turns out they dont hit the claims endpoint for OIDC, they only decode claims that are included in the token id, they might add this in the future tho. But there seems to be a workaround to unblock us, waiting for a reply from them.
Lol just tried again and it works: AWS Marketplace Setup completed The organization is now managed and billed through AWS Marketplace.
Thanks!
Nvm email was delayed: SU-357020
Cant really think of a way to do that, I am honestly very happy with the Supabase CLI, aside from the mindfucks here and there. Honestly having these flows and local images ready to go in 1 command is really a gamechanger for DX
Fair enough
They could theoratically tell them apart by attaching the version to the volume, if there are non volumes/projects with that old version they can prune it
Not feeling like making a issue because they never respond to me on github haha
Maybe its because if you have multiple projects with different versions it doesnt have a way to tell them apart?
Yeah I noticed that, kinda dumb that it doesnt delete them when updating...
Hahaah very relatable. I added supabase cli to my packages.json instead of using it with npx. So I just update it once a week or 2 weeks so it doesnt suprise me with downloads
I mixed - and _ in my file names like an idiot haha • supabase\schemas\900_app\get-chapter.sql (this one uses the create type) .... • supabase\schemas\900_app\get_calendar_page.sql (this one contains the create type) And for some reason it sees `-` first and then `_` alphabetically haha
I found my issue...
Also in the stoutput when running db diff it says: "Creating local database from declarative schemas", it says this after running all the migrations. So it seems to make 2 shadows, one migrations and one schemas
I agree haha
Also: "Your schema files are run in lexicographic order by default. The order is important when you have foreign keys between multiple tables as the parent table must be created first." Suggesting the schema files are ran. And it says in lexicographic order which is what i wants and prevents the initial issue I talked about with the dependencies. But for some reason it doesnt do this...
Thanks, and sorry I am bad at explaining in english haha. So I am making this a bit more confusing than it has to be haha
I think they have 2 different flows on the same command which makes it confusing, and it chooses the flow based on the existance of the /schemas folder?
And the docs says: With declarative schemas, you instead declare the state you want your database to be in, and the instructions are generated for you.
https://supabase.com/docs/guides/local-development/declarative-database-schemas This docs says, just make a file in/schemas, run db diff and you magically have a migration file for that. add a column in /schemas run db diff again and you will have a generated migration in migrations/ containing ```sql alter table "public"."employees" add column "age" smallint not null; ```
Isnt it making 2 shadow dbs if you have a /schemas folder?
But the second docs says the diff is /migrations vs /schema not /migrations vs local db?
But the order of the /migrations isnt the problem. thats fine it follows the timestamp. The order in /schemas when building a shadow db is the problem
But my original question is the following: when Supabase builds the shadow database from my /schemas folder during db diff, why does it not execute the SQL files in a predictable order (for example alphabetical), and is there any supported way to make that ordering deterministic so I don’t run into dependency errors like a type being used before it’s created?
Nope so all I want is to compare my /schemas against my /migrations and generate a new migration based on that. the second docs suggests I am doing this correctly, the first docs suggest that the db diff command is for comparing the local db against /migrations but i want /schemas against /migrations
Lol these docs contradict each other: https://supabase.com/docs/reference/cli/supabase-db-diff https://supabase.com/docs/guides/local-development/declarative-database-schemas Or is it when there is a schemas folder it will compare against that instead of the local db?
https://supabase.com/docs/guides/local-development/declarative-database-schemas These docs kinda describe db diff as what I expected?
I want something to run my schema/ which is my database as code/declaritive schema And run my migrations/ and compare those 2 against each other, which are the changes I made to schema/ and put out a new migration file But it seems db diff compares migrations against your local db, which is nice for developers that built the DB via supabase studio but I built my db just by writing code. Is there anything for this?
I misunderstood db diff.
Wait I think I am being an idiot haha
So I am trying to generate a migration in my /migrations folder by diffing my changes in /schema (shadow db) against my local db (which runs the previous version of the schema) However it doesnt run schema in alphabetic order when building the shadow db. So this is about the order in /schema when building the shadow db to diff to generate a migration file
This is about migrations, so lets say I have 2 files a.sql and b.sql in my /schema a.sql contains a type b.sql uses that type I expected migra to first run a.sql and then b.sql however it first runs b.sql which tries to use a type that doesnt exist yet. since a.sql hasnt run. I expected migra to create the shadow db alphabetically baseed on file names. But it doesnt do that?