Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

feat: add generator as an option to config and save it in the manifest and remove isInternal #1341

Merged
merged 3 commits into from
Feb 17, 2023

Conversation

khendrikse
Copy link
Contributor

@khendrikse khendrikse commented Feb 8, 2023

πŸŽ‰ Thanks for submitting a pull request! πŸŽ‰

Summary

In this PR we do the following:

  • Remove the recently introduced isInternal and internalSrcFolder configuration options.
  • Add a generator configuration option.

For more information about the why, feel free to check this issue: https://github.com/netlify/pod-compute/issues/350


For us to review and ship your PR efficiently, please perform the following steps:

  • Open a bug/issue before writing your code πŸ§‘β€πŸ’».
    This ensures we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing
    a typo or something that`s on fire πŸ”₯ (e.g. incident related), you can skip this step.
  • Read the contribution guidelines πŸ“–. This ensures your code follows our style guide and
    passes our tests.
  • Update or add tests (if any source code was changed or added) πŸ§ͺ
  • Update or add documentation (if features were changed or added) πŸ“
  • Make sure the status checks below are successful βœ…

A picture of a cute animal (not mandatory, but encouraged)
image of cute rabbit

@khendrikse khendrikse added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Feb 8, 2023
@khendrikse khendrikse self-assigned this Feb 8, 2023
@khendrikse khendrikse changed the title feat: add generator as an option to config and save it in the manifest feat: add generator as an option to config and save it in the manifest and remove isInternal Feb 8, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Feb 8, 2023

⏱ Benchmark results

Comparing with cde6f11

largeDepsEsbuild: 2.1s

⬇️ 20.51% decrease vs. cde6f11

^                                                            3s                                           
β”‚           2.9s                                            β”Œβ”€β”€β”                                          
β”‚           β”Œβ”€β”€β”                                            |  |    2.7s    2.6s                          
β”‚           |  |                                            |  |    β”Œβ”€β”€β”    β”Œβ”€β”€β”            2.6s          
β”‚           |  |                                            |  |    |  |    |  |            β”Œβ”€β”€β”          
β”‚ ──────────┼──┼────2.2s────────────────────2.2s────────────┼──┼────┼──┼────┼──┼────────────┼──┼──────────
β”‚    2s     |  |    β”Œβ”€β”€β”    2.1s    2.1s    β”Œβ”€β”€β”    2.2s    |  |    |  |    |  |    2.1s    |  |    2.1s  
β”‚   β”Œβ”€β”€β”    |  |    |  |    β”Œβ”€β”€β”    β”Œβ”€β”€β”    |  |    β”Œβ”€β”€β”    |  |    |  |    |  |    β”Œβ”€β”€β”    |  |    β”Œβ”€β”€β”  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
└───┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴──>
    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

largeDepsNft: 8.1s

⬇️ 26.78% decrease vs. cde6f11

^                                                          12.1s                                          
β”‚          11.5s                                            β”Œβ”€β”€β”                                          
β”‚           β”Œβ”€β”€β”                                            |  |   11.1s                                  
β”‚           |  |                                            |  |    β”Œβ”€β”€β”   10.5s           10.3s          
β”‚           |  |                                            |  |    |  |    β”Œβ”€β”€β”            β”Œβ”€β”€β”          
β”‚           |  |                                            |  |    |  |    |  |            |  |          
β”‚ ──────────┼──┼────8.2s────────────────────8.5s────8.4s────┼──┼────┼──┼────┼──┼────────────┼──┼──────────
β”‚   7.7s    |  |    β”Œβ”€β”€β”    7.8s    7.9s    β”Œβ”€β”€β”    β”Œβ”€β”€β”    |  |    |  |    |  |    7.8s    |  |    8.1s  
β”‚   β”Œβ”€β”€β”    |  |    |  |    β”Œβ”€β”€β”    β”Œβ”€β”€β”    |  |    |  |    |  |    |  |    |  |    β”Œβ”€β”€β”    |  |    β”Œβ”€β”€β”  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
└───┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴──>
    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

largeDepsZisi: 15.5s

⬇️ 21.19% decrease vs. cde6f11

^                                                          22.3s                                          
β”‚          21.3s                                            β”Œβ”€β”€β”                                          
β”‚           β”Œβ”€β”€β”                                            |  |   20.3s    20s                           
β”‚           |  |                                            |  |    β”Œβ”€β”€β”    β”Œβ”€β”€β”           18.8s          
β”‚           |  |                                            |  |    |  |    |  |            β”Œβ”€β”€β”          
β”‚ ──────────┼──┼───────────────────────────16.3s────────────┼──┼────┼──┼────┼──┼────────────┼──┼──────────
β”‚  15.1s    |  |   15.9s   15.5s   15.4s    β”Œβ”€β”€β”    16s     |  |    |  |    |  |   15.1s    |  |   15.5s  
β”‚   β”Œβ”€β”€β”    |  |    β”Œβ”€β”€β”    β”Œβ”€β”€β”    β”Œβ”€β”€β”    |  |    β”Œβ”€β”€β”    |  |    |  |    |  |    β”Œβ”€β”€β”    |  |    β”Œβ”€β”€β”  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
β”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |β–’β–’|  
└───┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴──>
    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

@khendrikse khendrikse force-pushed the feat-350/add-generator-option-to-config-and-manifest branch 2 times, most recently from 8202346 to 1cf4fef Compare February 8, 2023 15:55
@khendrikse khendrikse force-pushed the feat-350/add-generator-option-to-config-and-manifest branch from 1cf4fef to f8db3d1 Compare February 10, 2023 10:17
@khendrikse khendrikse marked this pull request as ready for review February 16, 2023 10:55
@khendrikse khendrikse requested a review from a team February 16, 2023 10:55
Copy link
Contributor

@danez danez left a comment

Choose a reason for hiding this comment

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

πŸš€

- _Type_: `string`
- _Default value_: undefined

A field to use if the function has been autogenerated by a plugin or integration. A recommended format is `@netlify/fake-plugin@1.0.0`, where adding the version is highly appreciated.
Copy link
Contributor

@danez danez Feb 16, 2023

Choose a reason for hiding this comment

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

I wonder about this scenario:

A user has a website with an integration at version 1.0.0. The user updates the integration to 1.0.1, and the following build will build the functions, but the functions are identical to the one previously, so we do not upload them. The version, in this case, will still be at 1.0.0 in the generator field probably, even though 1.0.1 is installed and deploys have happened with this version.

We should check if this is the case. Not a big issue, just something to keep in mind that the version in the generator field might not be equal the version that is installed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, I'll start looking into this!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I checked how this currently works for the (display) name. If I only update the configuration file, but the function itself is the same, I'm still getting the new name in the UI.

And I think it's because of the stage in which we update this information in mongodb. We always send the information. (implementation in bitballoon (pr 1, pr 2))

I think the stage happens before we actually upload the function πŸ€” but I'm going to ask @biruwon to confirm.

@khendrikse khendrikse merged commit 914ae53 into main Feb 17, 2023
@khendrikse khendrikse deleted the feat-350/add-generator-option-to-config-and-manifest branch February 17, 2023 08:59
Skn0tt pushed a commit to netlify/build that referenced this pull request May 21, 2024
…t and remove isInternal (netlify/zip-it-and-ship-it#1341)

* feat: add generator as an option to config and save it in the manifest

* test: add test and remove internalSrcFolder usage
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants