Skip to content

fix: functions download#5096

Merged
avallete merged 4 commits intosupabase:developfrom
7ttp:fix/functions-download
Apr 17, 2026
Merged

fix: functions download#5096
avallete merged 4 commits intosupabase:developfrom
7ttp:fix/functions-download

Conversation

@7ttp
Copy link
Copy Markdown
Contributor

@7ttp 7ttp commented Apr 16, 2026

TL;DR

fix docker based functions download so _shared files are extracted correctly

prob

when docker is used, the cli was binding only supabase/functions/<slug> and unbundling to /home/deno
for functions that import ../_shared/*
those files resolve outside the bound function folder, so _shared is missing after download
the --use-api path works because it does not use this docker bind layout

sol

changed docker extraction to bind supabase/functions as the writable root and unbundle to /home/deno/<slug>
IMO this keeps function files in the function folder while allowing _shared to be written as a sibling directory

added a smol test as well for this

ref:

@7ttp 7ttp requested a review from a team as a code owner April 16, 2026 19:00
@coveralls
Copy link
Copy Markdown

coveralls commented Apr 16, 2026

Coverage Report for CI Build 24557619474

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Warning

No base build found for commit a03a8bf on develop.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 63.662%

Details

  • Patch coverage: 1 uncovered change across 1 file (3 of 4 lines covered, 75.0%).

Uncovered Changes

File Changed Covered %
internal/functions/download/download.go 4 3 75.0%

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 15499
Covered Lines: 9867
Line Coverage: 63.66%
Coverage Strength: 7.0 hits per line

💛 - Coveralls

@7ttp 7ttp requested a review from kallebysantos April 16, 2026 19:39
@7ttp 7ttp added bug Something isn't working functions docker Pull requests that update Docker code labels Apr 16, 2026
@kallebysantos kallebysantos requested a review from avallete April 16, 2026 19:49
@avallete avallete enabled auto-merge (squash) April 17, 2026 09:17
@avallete avallete merged commit 6b1b270 into supabase:develop Apr 17, 2026
10 checks passed
@7ttp 7ttp deleted the fix/functions-download branch April 17, 2026 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working docker Pull requests that update Docker code functions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: folder extraction not working _shared folder not extracted with docker

3 participants