Conversation
__pmStartOptions() read getenv("ORIGIN_TIME") instead of
getenv("PCP_ORIGIN_TIME"), so the origin time exported by the pcp(1)
front-end was never picked up by subtools. Correct the name in both
libpcp and libpcp3.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Repository UI (inherited), Organization UI (inherited) Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 SummarySummary by CodeRabbit
WalkthroughBoth option parser implementations now use ChangesOrigin-time configuration
Suggested reviewers: Priority: ⬇️ Low Change: Bug fix Merge Risk: ⚪ Minimal · up to This change aligns origin-time configuration in both libraries and presents no identified merge-blocking risk. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. A rabbit checks the clock at dawn Comment |
| fprintf(stderr, "pmGetOptions: PCP_ORIGIN=%s set from the environment\n", value); | ||
| } | ||
| if ((value = getenv("ORIGIN_TIME")) != NULL) { /* THREADSAFE */ | ||
| if ((value = getenv("PCP_ORIGIN_TIME")) != NULL) { /* THREADSAFE */ |
There was a problem hiding this comment.
hmm, this is odd - I wonder why we have ORIGIN_TIME in the first place? the corresponding command line option is --origin and not --origintime (unlike --starttime and --endtime).
Can we just remove this oddball ORIGIN_TIME case entirely and use PCP_ORIGIN instead?
There was a problem hiding this comment.
After going through the code yesterday, I determined ORIGIN_TIME does not exist (I assume it was a typo). PCP_ORIGIN_TIME comes from src/pcp/pcp.sh and PCP_ORIGIN comes from src/pcp/summary/pcp-summary.sh. I think PCP_ORIGIN_TIME makes the most sense here and maybe we could even replace PCP_ORIGIN with PCP_ORIGIN_TIME in other places so we only use one of these, eliminating some confusion. @kmcdonell Any thoughts on this?
Also, it looks like Ken already fixed the typo causing the QA failures in the changes from last night, #2717, so we are safe to close this MR.
|
@sfeifer and @natoscott ORIGIN_TIME is was in the old code and I has assumed it was for some backwards compatibility reason. |
|
@sfeifer and @natoscott PCP_ORIGIN exists in more places (other src/pcp scripts, qa and man pages). |
|
I think we need to keep PCP_ORIGIN (e.g. for pcp(1) frontend to pass -O through to backend tools, like all the other options) but remove PCP_ORIGIN_TIME - is that what we're thinking here? |
|
@natoscott I think we need both for backwards compatibility (at least for the moment).
|
|
Hmm, I think I prefer keeping these matching with the command line option naming. PCP_ORIGIN_TIME is a new thing that seems out of place for that reason. PCP_ORIGIN matches --origin exactly, so seems like the right thing to me (and should not be deprecated unless we plan to also deprecate that command line option naming and go with --origintime ... which doesn't have a great ring to it). The _TIME suffixed names match command line options with "time" at the end of the option name ... so they too seem tight to me as-is. |
|
@natoscott PCP_ORIGIN_TIME is not new, it was there in PCP 3.8 and maybe before. And PCP_ORIGIN was there then too. |
__pmStartOptions() read getenv("ORIGIN_TIME") instead of getenv("PCP_ORIGIN_TIME"), so the origin time exported by the pcp(1) front-end was never picked up by subtools. Correct the name in both libpcp and libpcp3.