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

NC | Fix node warning: Accessing non-existent property 'key' of module exports inside circular dependency #8842

Merged

Conversation

romayalon
Copy link
Contributor

Explain the changes

  1. A new node dependency warning started showing after merging PR when running NC nsfs/CLI -
(node:30731) Warning: Accessing non-existent property 'NOOBAA_LOG_LEVEL' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
2025-03-02 18:51:49.362704 [PID-30731/TID-8963] [L1] FS::FSWorker::Execute: Readfile 
(node:30731) Warning: Accessing non-existent property 'UV_THREADPOOL_SIZE' of module exports inside circular dependency
(node:30731) Warning: Accessing non-existent property 'GPFS_DL_PATH' of module exports inside circular dependency

Attaching logs when running with --node-trace-warnings at the additional details section.
The fix added in this PR avoids accessing non existing properties in config but it won't fix the circular dependency.

  1. Added a default of gpfs lib location.

Additional Details -

(node:31086) Warning: Accessing non-existent property 'NOOBAA_LOG_LEVEL' of module exports inside circular dependency
    at emitCircularRequireWarning (node:internal/modules/cjs/loader:937:11)
    at Object.get (node:internal/modules/cjs/loader:953:5)
    at noobaa-core/config.js:1123:19
    at Array.forEach (<anonymous>)
    at _set_nc_config_to_env (noobaa-core/config.js:1122:34)
    at load_nsfs_nc_config (noobaa-core/config.js:1189:5)
    at Object.<anonymous> (noobaa-core/config.js:1238:1)
    at Module._compile (node:internal/modules/cjs/loader:1467:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1551:10)
    at Module.load (node:internal/modules/cjs/loader:1282:32)
(node:31086) Warning: Accessing non-existent property 'UV_THREADPOOL_SIZE' of module exports inside circular dependency
    at emitCircularRequireWarning (node:internal/modules/cjs/loader:937:11)
    at Object.get (node:internal/modules/cjs/loader:953:5)
    at noobaa-core/config.js:1123:19
    at Array.forEach (<anonymous>)
    at _set_nc_config_to_env (noobaa-core/config.js:1122:34)
    at load_nsfs_nc_config (noobaa-core/config.js:1189:5)
    at Object.<anonymous> (noobaa-core/config.js:1238:1)
    at Module._compile (node:internal/modules/cjs/loader:1467:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1551:10)
    at Module.load (node:internal/modules/cjs/loader:1282:32)
(node:31086) Warning: Accessing non-existent property 'GPFS_DL_PATH' of module exports inside circular dependency
    at emitCircularRequireWarning (node:internal/modules/cjs/loader:937:11)
    at Object.get (node:internal/modules/cjs/loader:953:5)
    at noobaa-core/config.js:1123:19
    at Array.forEach (<anonymous>)
    at _set_nc_config_to_env (noobaa-core/config.js:1122:34)
    at load_nsfs_nc_config (noobaa-core/config.js:1189:5)
    at Object.<anonymous> (noobaa-core/config.js:1238:1)
    at Module._compile (node:internal/modules/cjs/loader:1467:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1551:10)
    at Module.load (node:internal/modules/cjs/loader:1282:32)

Issues: Fixed #xxx / Gap #xxx

  1. Open a gap about the circular dependencies found in this file.

Testing Instructions:

  • Doc added/updated
  • Tests added

Copy link
Contributor

@shirady shirady left a comment

Choose a reason for hiding this comment

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

LGTM
I added a minor comment and a question

@romayalon romayalon force-pushed the romy-fix-circular-dependencies-warning branch from 3978d95 to 36b2400 Compare March 4, 2025 13:09
…e exports inside circular dependency

Signed-off-by: Romy <[email protected]>
@romayalon romayalon force-pushed the romy-fix-circular-dependencies-warning branch from 36b2400 to 00186af Compare March 4, 2025 13:23
@romayalon romayalon merged commit 4bb9068 into noobaa:master Mar 4, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants