Skip to content

fix: tolerate non-URL edge function paths in api platform - #438

Merged
barryroodt merged 6 commits into
mainfrom
claude/fix-edge-function-invalid-url
Oct 30, 2026
Merged

barryroodt merged 6 commits into
mainfrom
claude/fix-edge-function-invalid-url

Conversation

@claude

@claude claude Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Requested via Slack thread

list_edge_functions and get_edge_function threw TypeError: Invalid URL whenever the Management API returned an entrypoint_path or import_map_path that was not a file:// URL, which Deno 2 deploys do, so one such function broke listing for the whole project. This falls back to the raw path, matching what the hosted server already does, and adds tests for the relative-path case.

Also regenerates management-api/types.ts (upstream made schema_version optional) so the types check passes.

🤖 Generated with Claude Code

https://claude.ai/code/session_014czimsTzzeDpcZQ1dumCTV

The Management API can return entrypoint_path and import_map_path as
plain paths rather than file:// URLs (Deno 2 deploys), which made
fileURLToPath throw "Invalid URL" and broke list_edge_functions and
get_edge_function for the whole project. Fall back to the raw path,
matching the hosted server.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_014czimsTzzeDpcZQ1dumCTV
@coveralls

coveralls commented Sep 18, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 41054503567

Coverage increased (+0.1%) to 97.722%

Details

  • Coverage increased (+0.1%) from the base build.
  • Patch coverage: 11 of 11 lines across 2 files are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 5768
Covered Lines: 5667
Line Coverage: 98.25%
Relevant Branches: 1125
Covered Branches: 1069
Branch Coverage: 95.02%
Branches in Coverage %: Yes
Coverage Strength: 169.64 hits per line

💛 - Coveralls

@claude

claude Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

The check job (check-management-api-types.yml) is red because the upstream Management API OpenAPI spec now marks schema_version optional, so regenerating management-api/types.ts produces a one-line diff. It fails identically on a clean main checkout (6c411e2) and on other branches today, and last passed on 2026-09-17 13:33 UTC. This PR does not touch that file, so I'm leaving the regenerated types to the scheduled types-sync PR rather than folding them in here; test, quality and coveralls are green on this head.


Generated by Claude Code

Upstream made `schema_version` optional on the snippet content schema, so
regenerate `management-api/types.ts` to keep the types check green.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_014czimsTzzeDpcZQ1dumCTV
@barryroodt
barryroodt marked this pull request as ready for review September 19, 2026 07:12
@barryroodt
barryroodt requested a review from a team as a code owner September 19, 2026 07:12
@claude

claude Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

Merged main (7d7356c) into this branch to resolve the conflict with #393 (kept both imports in edge-function.ts). Two checks are red, neither from this PR's diff:

No fix exists on main yet; I'll merge main again once one lands.


Generated by Claude Code

@claude

claude Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

Correction on Check Management API Types: it isn't transient, and it will fail on every PR until main changes. mise.toml sets node = "lts". Node 26 became LTS on 10-28, and mise 2026.10.22+ (which jdx/mise-action started picking up today because of its 24h release-age delay) resolves lts to 26.x, which isn't in mise.lock. mise-action v5.2.4 runs mise install --locked when a lockfile is present, so setup fails. Reproduced locally: mise install --locked node pnpm fails on mise 2026.10.22–10.24 and passes on 10.21.

Proposed fix on main (not in this PR): change node = "lts" to node = "24" in mise.toml. mise install --locked then passes on 2026.10.22+ with the existing lock (24.15.0). Once that lands I'll merge main into this branch again.


Generated by Claude Code

@claude

claude Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

Merged main again (b585528), now with #504's Node 24 pin: mise setup, test, quality and coverage pass. Check Management API Types now fails only at its diff step ("Management API types are out of date"): the live API spec changed after today's 10:10 UTC sync run and no sync PR is open yet. Not from this PR's diff; a sync run plus merge, then another merge of main here, will clear it.


Generated by Claude Code

@barryroodt
barryroodt merged commit 00d07a4 into main Oct 30, 2026
6 of 7 checks passed
@supabase-releaser supabase-releaser Bot mentioned this pull request Oct 30, 2026
barryroodt pushed a commit that referenced this pull request Nov 5, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>mcp-server-supabase: 0.16.0</summary>

##
[0.16.0](mcp-server-supabase-v0.15.0...mcp-server-supabase-v0.16.0)
(2026-11-05)


### Features

* bound run_notebook cost
([#511](#511))
([e90d110](e90d110))
* **mcp-server-supabase:** run selected notebook cells
([#514](#514))
([8d04248](8d04248))
* **notebooks:** add delete_notebook tool with elicitation confirmation
([#510](#510))
([f36f74a](f36f74a))
* **notebooks:** enable create_notebook and run_notebook tools
([#509](#509))
([addc4e5](addc4e5))


### Bug Fixes

* **feedback:** accept null project_id and surface the feedback length
limit ([#521](#521))
([994f56c](994f56c))
* hint agents to re-copy malformed project refs
([#522](#522))
([0c650bf](0c650bf))
* **notebooks:** return caller errors for client-caused notebook
refusals ([#512](#512))
([5f0d393](5f0d393))
* **pg-meta:** report partition FKs once and add partition_of to
list_tables ([#508](#508))
([2c7fa82](2c7fa82))
* **pg-meta:** return complete check expressions for NOT VALID and NO
INHERIT constraints ([#517](#517))
([c54bb40](c54bb40))
* **sql:** skip destructive confirmation for planner-only EXPLAIN
([#519](#519))
([95745e5](95745e5))
* tolerate non-URL edge function paths in api platform
([#438](#438))
([00d07a4](00d07a4))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: supabase-releaser[bot] <223506987+supabase-releaser[bot]@users.noreply.github.com>
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.

3 participants