CNF-26637: Deprecate minOffsetThreshold and use absolute offset comparison - #738
CNF-26637: Deprecate minOffsetThreshold and use absolute offset comparison#738vitus133 wants to merge 1 commit into
Conversation
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vitus133 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Important Review available on request
Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 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. Comment |
|
@vitus133: This pull request references CNF-26637 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "5.1.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
ec9d188 to
d771c08
Compare
Assisted by Opencode with Gemini
d771c08 to
985a351
Compare
|
/verified later @dpopsuev |
|
@vitus133: This PR has been marked to be verified later by DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
Summary
In
ptpClockThreshold, threshold configuration currently specifies bothmaxOffsetThresholdandminOffsetThreshold. Because timing offsets are symmetric, defining separate upper and lower offset boundaries is redundant.minOffsetThresholdis deprecated in favor of a single absolute-value comparison againstmaxOffsetThreshold:abs(offset) < maxOffsetThresholdThis PR updates
isOffsetInRange()and its call sites incloud-event-proxyto evaluate whetherabs(offset) < maxOffsetThreshold(non-inclusive boundary, preserving existing comparison semantics).Jira
Testing
logparser_internal_test.goandconfig_test.gocovering in-range, out-of-range positive/negative, exact non-inclusive boundary, and backward compatibility whenminOffsetThresholdis omitted/zero/asymmetric.