Skip to content

watch: reload changes in contents of --env-file - #54109

Merged
nodejs-github-bot merged 2 commits into
nodejs:mainfrom
marekpiechut:watch-env-file
Aug 5, 2024
Merged

watch: reload changes in contents of --env-file#54109
nodejs-github-bot merged 2 commits into
nodejs:mainfrom
marekpiechut:watch-env-file

Conversation

@marekpiechut

Copy link
Copy Markdown
Contributor

Make sure we watch and reload on env file changes.
Ignore env file in parent process, so child process can reload current vars when we recreate it.

Fixes: #54001

I've noticed now that it's probably a duplicate of #54033.

Feel free to close or reuse tests from here in the other PR if you plan on merging it.
It was a nice small bug to get feet wet with Node internals anyway. 👋

Make sure we watch and reload on env file changes.
Ignore env file in parent process, so child process can reload
current vars when we recreate it.
Fixes: nodejs#54001
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/startup

@nodejs-github-botnodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels Jul 29, 2024
@anonriganonrig added the request-ci Add this label to start a Jenkins CI on a PR. label Jul 31, 2024
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jul 31, 2024
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@codecov

codecovBot commented Jul 31, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.07%. Comparing base (cf9a814) to head (a8eecc8).
Report is 540 commits behind head on main.

Additional details and impacted files
@@ Coverage Diff @@## main #54109 +/- ##
=======================================
Coverage 87.07% 87.07% =======================================
Files 643 643 Lines 181590 181576 -14 Branches 34893 34892 -1 =======================================
- Hits 158114 158109 -5 + Misses 16754 16746 -8 + Partials 6722 6721 -1 
Files with missing linesCoverage Δ
src/node.cc74.03% <100.00%> (ø)

... and 31 files with indirect coverage changes

@marekpiechut

Copy link
Copy Markdown
ContributorAuthor

Fixed linter issues.

@MoLowMoLow added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 2, 2024
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 2, 2024
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@marekpiechut

Copy link
Copy Markdown
ContributorAuthor

I see there are test failures in the latest check. I tried to look into them, but they all look weird. There are some unrelated test failures and build issues on Windows, etc.

@MoLow@anonrig could you give some advice how to continue with that?

@MoLow

MoLow commented Aug 4, 2024

Copy link
Copy Markdown
Member

none of those seem related

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@MoLowMoLow added commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Aug 5, 2024
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 5, 2024
@nodejs-github-bot
nodejs-github-bot merged commit a816688 into nodejs:mainAug 5, 2024
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in a816688

@marekpiechut
marekpiechut deleted the watch-env-file branch August 5, 2024 11:25
@tniessen

Copy link
Copy Markdown
Member

Are there no NODE_OPTIONS that should affect the parent process?

@MoLow

MoLow commented Aug 5, 2024

Copy link
Copy Markdown
Member

@tniessen I am not sure what you mean? can you elaborate?
passing --env-file will be correctly forwarded to inner process regardless of if it is used with NODE_OPTIONS or without

targos pushed a commit that referenced this pull request Aug 14, 2024
Make sure we watch and reload on env file changes.
Ignore env file in parent process, so child process can reload
current vars when we recreate it.
Fixes: #54001
PR-URL: #54109
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
@RafaelGSSRafaelGSS mentioned this pull request Aug 19, 2024
@dchenk

Copy link
Copy Markdown

This change didn't cover the --env-file-if-exists flag. Please see #49148 (comment)

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++Issues and PRs that require attention from people who are familiar with C++.commit-queue-squashAdd this label to instruct the Commit Queue to squash all the PR commits into the first one.needs-ciPRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--env-file watch

7 participants

@marekpiechut@nodejs-github-bot@MoLow@tniessen@dchenk@anonrig@targos