-
Notifications
You must be signed in to change notification settings - Fork 39
Detect systemd cgroup path using cgroup name (instead of container id) #1270
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
Conversation
Add proper dependencies to Makefile targets that use gmt-lib.o and detect_cgroup_path.o object files. This ensures Make will rebuild the metric-provider-binary when dependency objects change. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Eco CI Output - Old Energy EstimationEco CI Output [RUN-ID: 16750109676]: 🌳 CO2 Data: Total cost of whole PR so far:
|
|||||||||||||||||||||||||||||||||||
| CFLAGS = -O3 -Wall -Werror -lm -I../../../../../../lib/c | ||
|
|
||
| metric-provider-binary: source.c | ||
| metric-provider-binary: source.c ../../../../../../lib/c/gmt-lib.o |
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.
To my understanding this will track the change and rebuild metric-provider-binary if the .o file has changed. But it will also try to rebuild the o-file if their source has changed, not? I wonder if you can build the source from here ... are all the headers / includes set?
Testing would be that you only change the source of the gmt-lib.c and see if the make of the metric-provider-binary rebuilds fully.
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.
Correct, the rebuild happens if the source of the dependency has changed. I tested it with gmt-lib.c: If I add a comment, a rebuild happens. However, a change in the header file does not lead to a rebuild. If that should be the case, the header file has to be added to it too as a dependency:
metric-provider-binary: source.c ../../../../../lib/c/gmt-lib.o ../../../../../lib/c/gmt-lib.hShould I do that?
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.
hmm actually unsure. I have never seen header files as dependencies. @ribalba Do you have insights here?
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.
I would include the header files too. What we want is that if the functionality would change you should recompile which can happen if you change the .h file.
Let's say you change some buffer size in the .h file and then want to test the metric provider you would expect it to have the new buffer size.
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.
Done. I added the header files as dependencies. I also replaced the long paths to the lib/c directory with a variable.
[skip ci]
|
Eco CI Output [RUN-ID: 16775702680]: 🌳 CO2 Data: Total cost of whole PR so far:
|
|||||||||||||||||||||||||||||||||||
|
LGTM. Just tested the build on macOS and also works. Will merge |
* main: Bump actions/create-github-app-token in /.github/workflows (#1284) Bump pylint from 3.3.7 to 3.3.8 (#1285) Updated echarts vor v.6.0 (#1282) Bump python from 3.13.5-slim-bookworm to 3.13.6-slim-bookworm in /docker (#1286) Bump deepdiff from 8.5.0 to 8.6.0 (#1283) Log parsing on full data (#1276) Bump redis from 6.3.0 to 6.4.0 (#1281) Added Gemini PR Review measurement_flow_process_duration is set in any case. Supplying a timeout of None will lead to no timeout Detect systemd cgroup path using cgroup name (instead of container id) (#1270) Bump redis from 6.2.0 to 6.3.0 (#1275) Removing sampling_rate for XGboost also from codespaces lsmod now uses sort Added kernel modules to listing (fix): Warnings error should not show on HTTP 204 - case is expected Fix NetworkIoCgroupSystemProvider doesn't create a value column (#1274) Clarifying comment for design decision Document the usage of cgroup system metric providers (#1273) Suspend check (#1269)
* main: Bump actions/create-github-app-token in /.github/workflows (#1284) Bump pylint from 3.3.7 to 3.3.8 (#1285) Updated echarts vor v.6.0 (#1282) Bump python from 3.13.5-slim-bookworm to 3.13.6-slim-bookworm in /docker (#1286) Bump deepdiff from 8.5.0 to 8.6.0 (#1283) Log parsing on full data (#1276) Bump redis from 6.3.0 to 6.4.0 (#1281) Added Gemini PR Review measurement_flow_process_duration is set in any case. Supplying a timeout of None will lead to no timeout Detect systemd cgroup path using cgroup name (instead of container id) (#1270) Bump redis from 6.2.0 to 6.3.0 (#1275)
* main: (70 commits) Updated Gemini Actions Workflow to latest version from upstream Update gemini-pr-review.yml - Only run when actively triggered via comment Bump orjson from 3.11.1 to 3.11.2 (#1288) Bump actions/create-github-app-token in /.github/workflows (#1284) Bump pylint from 3.3.7 to 3.3.8 (#1285) Updated echarts vor v.6.0 (#1282) Bump python from 3.13.5-slim-bookworm to 3.13.6-slim-bookworm in /docker (#1286) Bump deepdiff from 8.5.0 to 8.6.0 (#1283) Log parsing on full data (#1276) Bump redis from 6.3.0 to 6.4.0 (#1281) Added Gemini PR Review measurement_flow_process_duration is set in any case. Supplying a timeout of None will lead to no timeout Detect systemd cgroup path using cgroup name (instead of container id) (#1270) Bump redis from 6.2.0 to 6.3.0 (#1275) Removing sampling_rate for XGboost also from codespaces lsmod now uses sort Added kernel modules to listing (fix): Warnings error should not show on HTTP 204 - case is expected Fix NetworkIoCgroupSystemProvider doesn't create a value column (#1274) Clarifying comment for design decision ...
Closes #1267
The change was tested successfully:
Between the two statements the binary was recompiled with the change introduced in this PR.
This PR includes changes to all Makefiles to add the missing dependency declarations. I had the problem, that re-compiling the metric-provider-binary lead to the message: "'metric-provider-binary' is up to date"
The changed
detect_cgroup_path.owas not recognized due to the missing dependency declaration. I hope it is ok to include this change here. If not, let me know.