-
Notifications
You must be signed in to change notification settings - Fork 30k
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
report: fix typos in memory limit units #56068
report: fix typos in memory limit units #56068
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #56068 +/- ##
=======================================
Coverage 88.00% 88.00%
=======================================
Files 656 656
Lines 189131 189136 +5
Branches 36009 36007 -2
=======================================
+ Hits 166439 166447 +8
+ Misses 15853 15850 -3
Partials 6839 6839
|
Nice spot! Thank you for the contribution, I think this could be a breaking change in removing keys in the diagnostic report, even their values are incorrect. I think an alternative could be adding both the new keys and keeping the old ones, but with correct values. |
Hi @legendecas, Thank you so much for your thoughtful reply and for spotting the potential compatibility issue! This is my first contribution to a public, well-known repository, so I greatly appreciate your guidance and encouragement. Coming from the Python community, I am aware of deprecation mechanisms (like deprecation warnings) that allow for gradual transitions when updating APIs or key names. Does Node have a similar mechanism to flag keys like Alternatively, I’m also fine with keeping the same keys and ensuring they provide the correct values in bytes. That said, I realize there’s an edge case to consider: the Since I’m still a student with a background mainly in science and very new to software development, I’ll gladly adjust my PR based on your guidance. Would it be necessary for me to write tests for the changes if I provide the correct values for the original keys? I’m unsure how to write unit tests that require system-level settings as input, so any advice or pointers would be really helpful. Thank you again for guiding me through this process! |
IIRC, this is the first time that a key is been removed from the report. Referencing the version number explainer:
Given that either adding or removing keys needs a version bump, the keys I filed #56130 to trace the changes in the diagnostic report. And the change in this PR should be recorded in the same way. /cc @nodejs/diagnostics |
To prevent a merge conflict, should I wait until #56130 landing then rebase and force push to this branch? Or should I update this now, so you can review it sooner? (Then resolved the conflict later.) |
I would suggest waiting a bit to avoid conflicts and unnecessary labor. |
PR-URL: #56130 Refs: #56068 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]>
@technic960183 would you mind rebaseing on top of the main branch and bumping the version/adding the change doc? Thank you! |
PR-URL: #56130 Refs: #56068 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]>
@legendecas Thanks for your guidance. Should the Node version be v23.4.0 in the version 5 report version history? By the way, I notice that the example report in
I have checked that the test will only check if the value is a number (or 'unlimited').
|
fca9005
to
2b82d98
Compare
I think I do something wrong when I try to rebase it. Update: Fixed. Sorry for the trouble caused. As a first-time contributor to a large public project, it's hard to explain how nerve-wracking it was to realize at 1 AM that I had messed up the entire commit history and push it as a PR. |
Please use
I think it is reasonable to update the example with a more realistic sample. Please feel free to update it in a separate PR as they are not related to this PR change.
I don't think we need to verify the value. They are retrieved from external source. The report should reflect what as exact as possible about the external source says. |
2b82d98
to
ffb295f
Compare
Bumped the report version and added the corresponding version history. @legendecas would you mind taking a look again? Thanks. |
ffb295f
to
de272ff
Compare
PR-URL: nodejs#56130 Refs: nodejs#56068 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Replace "kbytes" with "bytes" in `PrintSystemInformation()` in `src/node_report.cc`, as RLIMIT_DATA, RLIMIT_RSS, and RLIMIT_AS are given in bytes. The report version is bumped from 4 to 5. Refs: https://www.ibm.com/docs/en/aix/7.3?topic=k-kgetrlimit64-kernel-service
de272ff
to
eebdcdd
Compare
Modified as suggested. Thank you! |
PR-URL: nodejs#56130 Backport-PR-URL: nodejs#56055 Refs: nodejs#56068 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> PR-URL: nodejs#55697
@legendecas Some of the tests in the ci failed. But I don't understand why my commit caused them to fail. |
I think they are unrelevant flaky tests: #56190. Restarted the CI. |
Landed in 938a581 |
Replace "kbytes" with "bytes" in `PrintSystemInformation()` in `src/node_report.cc`, as RLIMIT_DATA, RLIMIT_RSS, and RLIMIT_AS are given in bytes. The report version is bumped from 4 to 5. Refs: https://www.ibm.com/docs/en/aix/7.3?topic=k-kgetrlimit64-kernel-service PR-URL: #56068 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: James M Snell <[email protected]>
Replace typos "kbytes" with "bytes" in
PrintSystemInformation()
insrc/node_report.cc
for"data_seg_size_kbytes"
,"max_memory_size_kbytes"
and"virtual_memory_kbytes"
, asRLIMIT_DATA
,RLIMIT_RSS
andRLIMIT_AS
from<sys/resource.h>
are given in bytes. (ref)I found this problem when I was testing the limit of virtual memory. When I set it to 32GB, the report showed
After checking the source codes, I think that it should be in
bytes
, notkbytes
.Refs: https://www.ibm.com/docs/en/aix/7.3?topic=k-kgetrlimit64-kernel-service
Update:
The keys with
*_kbytes
are replaced by*_bytes
, and the report version is bumped from 4 to 5.This is my first contribution (first PR) to a public, well-known repository. Thanks the members for the guidance.
Although it is just a tiny fix, this means a lot for me.