Skip to content

fix(functions): reload kong after edge runtime restart#4990

Merged
jgoux merged 3 commits intosupabase:developfrom
okedeji:fix/kong-dns-stale-edge-runtime
Mar 25, 2026
Merged

fix(functions): reload kong after edge runtime restart#4990
jgoux merged 3 commits intosupabase:developfrom
okedeji:fix/kong-dns-stale-edge-runtime

Conversation

@okedeji
Copy link
Contributor

@okedeji okedeji commented Mar 25, 2026

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

After supabase functions serve restarts the Edge Runtime container (on file change or initial serve), Kong's DNS cache still points to the old container IP, causing 502 errors on /functions/v1/* endpoints.

closes #4757

What is the new behavior?

Runs kong reload after each Edge Runtime restart to flush DNS cache and resolve the new container IP.

Additional context

The reload is non-disruptive. Kong flushes DNS without dropping in-flight connections. If the reload fails, a warning is printed to stderr and execution continues.

@okedeji okedeji requested a review from a team as a code owner March 25, 2026 17:19
@okedeji okedeji force-pushed the fix/kong-dns-stale-edge-runtime branch from 008b444 to ebc3bd7 Compare March 25, 2026 17:42
@aantti
Copy link

aantti commented Mar 25, 2026

@singh-inder fyi, 🤔

@coveralls
Copy link

coveralls commented Mar 25, 2026

Pull Request Test Coverage Report for Build 23561179257

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 7 of 7 (100.0%) changed or added relevant lines in 1 file are covered.
  • 5 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.005%) to 63.18%

Files with Coverage Reduction New Missed Lines %
internal/utils/git.go 5 57.14%
Totals Coverage Status
Change from base Build 23561140882: -0.005%
Covered Lines: 9199
Relevant Lines: 14560

💛 - Coveralls

@jgoux jgoux enabled auto-merge March 25, 2026 20:03
@jgoux jgoux merged commit d03a45b into supabase:develop Mar 25, 2026
15 checks passed
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.

Edge functions return 502 Bad Gateway after running supabase functions serve (CLI 2.72.7 and Podman 4.9.3)

4 participants