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

OCPBUGS-44954: PTP operator Event Notification API breaking change within 4.16 release #371

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

aneeshkp
Copy link
Member

Fix Backward Compatibility for PTP Clock-Class Event Subscription

The problem arises because the V1 version of PTP events subscribed to the resource address /sync/ptp-status/ptp-clock-class-change, which was updated to /sync/ptp-status/clock-class in V2 as per O-RAN spec.
As a result, older versions referencing /sync/ptp-status/ptp-clock-class-change failed to subscribe to clock-class events.

This PR resolves the issue by introducing a new enum type, PtpClockClassV1, which refers to the older event resource.
The solution ensures backward compatibility for V1 while adhering to the O-RAN 7.2.3.10 specification for the PtpClockClass notification.

Key Changes:
In Cloud-event-proxy , manages different clock type subscription names by detecting API version
if v1Api {

  •                   subscribeTo[string(ptpEvent.PtpClockClassChange)] = string(ptpEvent.PtpClockClassV1)
    
  •           }
    

In redhat-cnt/sd-go:
sdk-go updated by adding PtpClockClassV1 to support the older /sync/ptp-status/ptp-clock-class-change resource for V1 compatibility.
Retained the PtpClockClass resource for the updated /sync/ptp-status/clock-class to align with the O-RAN specification.
Updated Definitions:
// O-RAN 7.2.3.10
// PtpClockClass notification is generated when the clock-class changes.
PtpClockClass EventResource = "/sync/ptp-status/clock-class"

// Support V1
// PtpClockClassV1 notification is generated when the clock-class changes for V1.
PtpClockClassV1 EventResource = "/sync/ptp-status/ptp-clock-class-change"

This change ensures that both V1 and the current versions of PTP events can correctly subscribe to clock-class notifications without breaking functionality for older versions.

@openshift-ci-robot
Copy link

@aneeshkp: This pull request references Jira Issue OCPBUGS-44954, which is invalid:

  • expected the bug to target the "4.19.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Fix Backward Compatibility for PTP Clock-Class Event Subscription

The problem arises because the V1 version of PTP events subscribed to the resource address /sync/ptp-status/ptp-clock-class-change, which was updated to /sync/ptp-status/clock-class in V2 as per O-RAN spec.
As a result, older versions referencing /sync/ptp-status/ptp-clock-class-change failed to subscribe to clock-class events.

This PR resolves the issue by introducing a new enum type, PtpClockClassV1, which refers to the older event resource.
The solution ensures backward compatibility for V1 while adhering to the O-RAN 7.2.3.10 specification for the PtpClockClass notification.

Key Changes:
In Cloud-event-proxy , manages different clock type subscription names by detecting API version
if v1Api {

  •                   subscribeTo[string(ptpEvent.PtpClockClassChange)] = string(ptpEvent.PtpClockClassV1)
    
  •           }
    

In redhat-cnt/sd-go:
sdk-go updated by adding PtpClockClassV1 to support the older /sync/ptp-status/ptp-clock-class-change resource for V1 compatibility.
Retained the PtpClockClass resource for the updated /sync/ptp-status/clock-class to align with the O-RAN specification.
Updated Definitions:
// O-RAN 7.2.3.10
// PtpClockClass notification is generated when the clock-class changes.
PtpClockClass EventResource = "/sync/ptp-status/clock-class"

// Support V1
// PtpClockClassV1 notification is generated when the clock-class changes for V1.
PtpClockClassV1 EventResource = "/sync/ptp-status/ptp-clock-class-change"

This change ensures that both V1 and the current versions of PTP events can correctly subscribe to clock-class notifications without breaking functionality for older versions.

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.

Copy link
Contributor

openshift-ci bot commented Nov 25, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aneeshkp

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@aneeshkp
Copy link
Member Author

/jira refresh

@openshift-ci-robot
Copy link

@aneeshkp: This pull request references Jira Issue OCPBUGS-44954, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.19.0) matches configured target version for branch (4.19.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

No GitHub users were found matching the public email listed for the QA contact in Jira (bblock@redhat.com), skipping review request.

In response to this:

/jira refresh

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.

Signed-off-by: Aneesh Puttur <aputtur@redhat.com>
@aneeshkp
Copy link
Member Author

aneeshkp commented Dec 2, 2024

/cherry-pick release-4.18

@openshift-cherrypick-robot

@aneeshkp: once the present PR merges, I will cherry-pick it on top of release-4.18 in a new PR and assign it to you.

In response to this:

/cherry-pick release-4.18

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 kubernetes-sigs/prow repository.

@vitus133
Copy link
Member

vitus133 commented Dec 2, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Dec 2, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 7a0f127 into redhat-cne:main Dec 2, 2024
5 checks passed
@openshift-ci-robot
Copy link

@aneeshkp: Jira Issue OCPBUGS-44954: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-44954 has been moved to the MODIFIED state.

In response to this:

Fix Backward Compatibility for PTP Clock-Class Event Subscription

The problem arises because the V1 version of PTP events subscribed to the resource address /sync/ptp-status/ptp-clock-class-change, which was updated to /sync/ptp-status/clock-class in V2 as per O-RAN spec.
As a result, older versions referencing /sync/ptp-status/ptp-clock-class-change failed to subscribe to clock-class events.

This PR resolves the issue by introducing a new enum type, PtpClockClassV1, which refers to the older event resource.
The solution ensures backward compatibility for V1 while adhering to the O-RAN 7.2.3.10 specification for the PtpClockClass notification.

Key Changes:
In Cloud-event-proxy , manages different clock type subscription names by detecting API version
if v1Api {

  •                   subscribeTo[string(ptpEvent.PtpClockClassChange)] = string(ptpEvent.PtpClockClassV1)
    
  •           }
    

In redhat-cnt/sd-go:
sdk-go updated by adding PtpClockClassV1 to support the older /sync/ptp-status/ptp-clock-class-change resource for V1 compatibility.
Retained the PtpClockClass resource for the updated /sync/ptp-status/clock-class to align with the O-RAN specification.
Updated Definitions:
// O-RAN 7.2.3.10
// PtpClockClass notification is generated when the clock-class changes.
PtpClockClass EventResource = "/sync/ptp-status/clock-class"

// Support V1
// PtpClockClassV1 notification is generated when the clock-class changes for V1.
PtpClockClassV1 EventResource = "/sync/ptp-status/ptp-clock-class-change"

This change ensures that both V1 and the current versions of PTP events can correctly subscribe to clock-class notifications without breaking functionality for older versions.

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.

@openshift-cherrypick-robot

@aneeshkp: new pull request created: #374

In response to this:

/cherry-pick release-4.18

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 kubernetes-sigs/prow repository.

@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: cloud-event-proxy
This PR has been included in build cloud-event-proxy-container-v4.19.0-202412030007.p0.g7a0f127.assembly.stream.el9.
All builds following this will include this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants