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 #109

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

aneeshkp
Copy link
Member

Fix Backward Compatibility for PTP Clock-Class Event Subscription (PR 1 of 2)

This is the first of two pull requests to address a backward compatibility issue. The second PR will be in the cloud-event-proxy repository.

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:

Added **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.

Signed-off-by: Aneesh Puttur <aputtur@redhat.com>
@aneeshkp aneeshkp changed the title OCPBUGS-44900: PTP operator Event Notification API breaking change within 4.16 release OCPBUGS-44954: PTP operator Event Notification API breaking change within 4.16 release Nov 25, 2024
@aneeshkp
Copy link
Member Author

/jira refresh

@vitus133
Copy link
Member

/lgtm

@aneeshkp aneeshkp merged commit fc15be4 into redhat-cne:main Nov 25, 2024
2 checks passed
@aneeshkp
Copy link
Member Author

/jira refresh

aneeshkp added a commit to aneeshkp/sdk-go-1 that referenced this pull request Nov 25, 2024
Signed-off-by: Aneesh Puttur <aputtur@redhat.com>
aneeshkp added a commit that referenced this pull request Nov 26, 2024
Signed-off-by: Aneesh Puttur <aputtur@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants