Skip to content

Big increase in edge function script size in v1.69.1 vs 1.68.3 #597

@adbl

Description

@adbl

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

Without any changes in our code, our edge functions script size (as reported by supabase functions deploy) have increased by around 50% with the recent supabase cli versions with upgraded edge-runtime (v1.68.3 -> v1.69.1) supabase/cli#4064
This started happening in supabase cli version 2.38.1

Our ./supabase/functions/<function> are part of workspace defined in ./deno.json`, not sure if that is relevant.

Our functions:

deno info 2.38.0 2.38.1
bot 128.02 MB 14.49 MB 21.91 MB
index-knowledge 59.44 MB 7.07 MB 10.45 MB
local-test 66.02 MB 7.983 MB 11.18 MB
message-worker 126.16 MB 13.26 MB 20.23
schedules 147.78 MB 15.05 MB 23.54 MB

To Reproduce

  1. Create a supabase edge function
  2. Add some dependencies, here's an example deno.json from our project where this can be observed.
    {
     "imports": {
       "@openai/openai": "jsr:@openai/openai@^4.88.0",
       "@types/express": "npm:@types/express@^5.0.0",
       "botbuilder": "npm:[email protected]",
       "botbuilder-core": "npm:[email protected]",
       "botframework-schema": "npm:[email protected]",
       "drizzle-orm": "npm:drizzle-orm@^0.44.4",
       "drizzle-orm/": "npm:/drizzle-orm@^0.44.4/",
       "express": "npm:express@^5.1.0",
       "pg": "npm:pg@^8.15.6",
       "rrule": "npm:rrule@^2.8.1",
       "zod": "npm:zod@^3.24.2"
     },
     "compilerOptions": {
       "types": ["npm:@types/pg", "npm:@types/express"]
     }
    }
    
    
  3. run npx [email protected] functions deploy <function-name>, check the output for Deploying Function: ... (script size: <size-1>)
  4. run npx [email protected] functions deploy <function-name>, check the output for Deploying Function: ... (script size: <size-2>)
  5. Observe how size-2 is noticeably bigger than size-2.

Expected behavior

Size should be roughly the same.

System information

Irrelevant.

Metadata

Metadata

Assignees

Labels

C-bugCategory: something isn't workingPerformance

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions