Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: correctly watch function files specified in the config option included_files #4619

Merged
merged 4 commits into from
Jun 8, 2022

Conversation

danez
Copy link
Contributor

@danez danez commented May 20, 2022

Summary

Fixes #4454

Adds the files/globs from the included_files config option to the watcher.

This requires a new version of zisi with netlify/zip-it-and-ship-it#1098 , which is not released yet.

@danez danez added type: bug code to address defects in shipped code area: functions labels May 20, 2022
@danez danez requested a review from a team May 20, 2022 14:52
@github-actions
Copy link

github-actions bot commented May 20, 2022

📊 Benchmark results

Comparing with 2a6d9f3

Package size: 294 MB

⬇️ 0.00% decrease vs. 2a6d9f3

^  287 MB  287 MB  287 MB  287 MB  287 MB  287 MB  287 MB  287 MB  287 MB  287 MB  287 MB  287 MB  294 MB 
│   ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
└───┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴──>
    T-12    T-11    T-10    T-9     T-8     T-7     T-6     T-5     T-4     T-3     T-2     T-1      T    
Legend

src/lib/functions/registry.js Outdated Show resolved Hide resolved
@danez danez changed the title fix: correctly watch function files specified in the config option included_files (WIP) fix: correctly watch function files specified in the config option included_files May 25, 2022
@danez danez force-pushed the dt/4454/watchIncludedFilesFromConfig branch from eb3f87d to fc89bb7 Compare May 30, 2022 17:50
@danez danez marked this pull request as draft June 7, 2022 08:22
@danez danez changed the title (WIP) fix: correctly watch function files specified in the config option included_files fix: correctly watch function files specified in the config option included_files Jun 7, 2022
…ncluded_files`

Adds the files/globs from the `included_files` config option to the watcher.
The resolved paths are returned by zip-it-and-ship-it.
@danez danez force-pushed the dt/4454/watchIncludedFilesFromConfig branch from 8154ec4 to 3e59113 Compare June 7, 2022 08:59
@danez danez requested a review from eduardoboucas June 7, 2022 09:03
@danez danez marked this pull request as ready for review June 7, 2022 09:03
@danez danez requested a review from a team June 7, 2022 09:03
eduardoboucas
eduardoboucas previously approved these changes Jun 7, 2022
Copy link
Member

@eduardoboucas eduardoboucas left a comment

Choose a reason for hiding this comment

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

Looks great! ✨

tests/integration/330.serving-functions.test.js Outdated Show resolved Hide resolved
eduardoboucas
eduardoboucas previously approved these changes Jun 7, 2022
@danez danez added the automerge Add to Kodiak auto merge queue label Jun 7, 2022
Copy link
Member

@eduardoboucas eduardoboucas left a comment

Choose a reason for hiding this comment

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

It's such a pain that we have to use timeouts to make these tests work. 😢

@kodiakhq kodiakhq bot merged commit 3bfbe87 into main Jun 8, 2022
@kodiakhq kodiakhq bot deleted the dt/4454/watchIncludedFilesFromConfig branch June 8, 2022 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: functions automerge Add to Kodiak auto merge queue type: bug code to address defects in shipped code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Changes to Included Files should restart/rebuild function
2 participants