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

[Placeholder]Node.js Placeholders #4511

Closed
4 of 6 tasks
mhoeger opened this issue May 29, 2019 · 7 comments
Closed
4 of 6 tasks

[Placeholder]Node.js Placeholders #4511

mhoeger opened this issue May 29, 2019 · 7 comments
Assignees
Milestone

Comments

@mhoeger
Copy link
Contributor

mhoeger commented May 29, 2019

We need to move the scope of the node.js worker's startup so that it can run in placeholder mode.

And this special casing must be done for Node.js placeholders to not have a bug: #4488

  1. Whitelist node (Windows and Linux)
    new List<string>() { LanguageWorkerConstants.JavaLanguageWorkerName }
    new List<string>() { LanguageWorkerConstants.PythonLanguageWorkerName }
  2. Cache node version (WEBSITE_DEFAULT_NODE_VERSION from App Settings) in Placeholder mode to be accessed later. Probably best here: https://github.com/Azure/azure-functions-host/blob/dev/src/WebJobs.Script/Rpc/WebHostLanguageWorkerChannelManager.cs (backup: check with Brett if this is ok) https://github.com/Azure/azure-functions-host/blob/dev/src/WebJobs.Script.WebHost/Standby/StandbyOptions.cs https://github.com/Azure/azure-functions-host/blob/dev/src/WebJobs.Script.WebHost/Standby/StandbyOptionsSetup.cs
  3. Update logic for IsSupportedRuntime to figure out if we should kill placeholder node.exe
    if (Utility.IsSupportedRuntime(_workerRuntime, _workerConfigs))
  4. Run from zip only? (Verify if Portal editing will work.)

Test:

  • Going through Placeholders
  • Not going through Placeholders
  • x64 and x86 tests (Placeholders only apply for x86)
  • Node 8 vs 10
    • Node 10.0.0 (not latest) - no placeholders
    • Node ~10 (placeholder) and ~8 (no placeholder)
    • Node exact match for latest (10.15.2, placeholder)
  • With / without RUN_FROM_PACKAGE

Breakdown of issues:

@mhoeger mhoeger self-assigned this May 29, 2019
@mhoeger mhoeger added this to the Triaged milestone May 29, 2019
@pragnagopa pragnagopa changed the title Node.js Placeholders Node.js Placeholders with Run From Zip enabled Jun 4, 2019
@pragnagopa pragnagopa changed the title Node.js Placeholders with Run From Zip enabled [Placeholder]Node.js Placeholders with Run From Zip enabled Jun 4, 2019
@pragnagopa pragnagopa changed the title [Placeholder]Node.js Placeholders with Run From Zip enabled [Placeholder]Node.js Placeholders with Run From Zip enabled and ~10 Jun 4, 2019
@pragnagopa
Copy link
Member

Changes needed:

@pragnagopa pragnagopa modified the milestones: Triaged, Functions Sprint 51 Jun 5, 2019
@pragnagopa pragnagopa self-assigned this Jun 5, 2019
@pragnagopa
Copy link
Member

Adding more details on the picking node version

  • Host needs to know what is the latest node 10 version on
    • Antares for windows apps
    • Linux for linux consumption apps
  • Placeholder node.exe will be used only if WEBSITE_NODE_DEFAULT_VERSION is an exact match with the current node 10 latest version .

@mhoeger - Let me know if you have any further questions.

@pragnagopa pragnagopa removed their assignment Jun 5, 2019
@pragnagopa
Copy link
Member

pragnagopa commented Jun 5, 2019

cc @fabiocav
Adding more details on how to get the latest version of node

  • Placeholder template site has, WEBSITE_NODE_DEFAULT_VERSION is set to ~10
  • Cache value of WEBSITE_NODE_DEFAULT_VERSION during placeholder mode
  • During specialization look for exact match,

@mhoeger
Copy link
Contributor Author

mhoeger commented Jun 25, 2019

if (Utility.IsSupportedRuntime(_workerRuntime, _workerConfigs))

@fabiocav
Copy link
Member

@mhoeger moving this to Epics, can you please break this up and create the tasks we need to track?

@fabiocav
Copy link
Member

Blocked on ANT83

@mhoeger mhoeger changed the title [Placeholder]Node.js Placeholders with Run From Zip enabled and ~10 [Placeholder]Node.js Placeholders Jul 24, 2019
@fabiocav
Copy link
Member

Closing stale issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants