Skip to content

feat: hot reload eszip bundle when function source changes#3710

Merged
sweatybridge merged 12 commits into
developfrom
watch-serve
Jun 18, 2025
Merged

feat: hot reload eszip bundle when function source changes#3710
sweatybridge merged 12 commits into
developfrom
watch-serve

Conversation

@sweatybridge

@sweatybridge sweatybridge commented Jun 12, 2025

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

Bug fix

What is the new behavior?

Feel free to include screenshots if it includes visual changes.

Additional context

Add any other context or screenshots.

@sweatybridge sweatybridge requested a review from a team as a code owner June 12, 2025 07:30
@sweatybridge sweatybridge force-pushed the watch-serve branch 2 times, most recently from c226f2b to cf62e9a Compare June 13, 2025 08:25
avallete and others added 4 commits June 15, 2025 12:34
* chore: add watcher tests and main.ts

* chore: add serve tests

* chore: fix lints

* chore: remove sleep in tests

* chore: simulate fs event when possible

* chore: avoid flaky tests

* chore: undo debounce test

---------

Co-authored-by: Qiao Han <qiao@supabase.io>
@sweatybridge sweatybridge changed the title fix: file watcher skeleton for serving functions feat: implement file watcher for serving functions Jun 16, 2025

@avallete avallete left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, tested on the branch:

  1. Change config.toml reload serve
  2. Update transient deps reload serve
  3. Adding a new function / removing new function update serve
  4. Updating funciton index.ts reload serve

if watcher := runtimeOption.fileWatcher; watcher != nil {
var watchPaths []string
for _, b := range binds {
if spec, err := loader.ParseVolume(b); err != nil {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise

Nice re-use of docker api.

@sweatybridge sweatybridge changed the title feat: implement file watcher for serving functions feat: hot reload eszip bundle when function source changes Jun 18, 2025
@sweatybridge sweatybridge merged commit 1773931 into develop Jun 18, 2025
14 checks passed
@sweatybridge sweatybridge deleted the watch-serve branch June 18, 2025 03:36
@github-actions github-actions Bot mentioned this pull request Jun 24, 2025
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.

2 participants