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

Address spec alignment issue by revising UTransport and NotificationSink APIs #240

Conversation

gregmedd
Copy link
Contributor

@gregmedd gregmedd commented Jul 17, 2024

The core changes here:

  • Updated UTransport API to correct alignment on optional/required URIs when registering listeners
  • Updated NotificationSink API to align with UTransport API update
  • Updated listener filter URI validation to allow wildcards (via addition of validator::uri::isValidFilter())
  • Update validation checks for URIs (in particular, source URIs) to use the correct validator for the specific message type (deprecating validator::uri::isValid() in the process)
  • Fixing source / sink swap in Subscriber and NotificationSink

Each change above, plus all of the unit test updates, ripple outward from the correction to the source and sink URIs in UTransport, NotificationSink, and Subscriber.

digital pond ripple

@gregmedd gregmedd self-assigned this Jul 17, 2024
Copy link

Code coverage report is ready! 📈

@gregmedd gregmedd linked an issue Jul 17, 2024 that may be closed by this pull request
@gregmedd
Copy link
Contributor Author

Remaining work:

  • Unit testing new APIs
  • Checking if there are any unnecessary changes that caught a ride in these commits

Copy link

Code coverage report is ready! 📈

Copy link

Code coverage report is ready! 📈

Copy link

Code coverage report is ready! 📈

Copy link

Code coverage report is ready! 📈

Copy link

Code coverage report is ready! 📈

@gregmedd gregmedd force-pushed the bugfix/1.6.0/237-spec-uri-alignment-issue branch from 476493c to 6fffc22 Compare July 18, 2024 18:44
@gregmedd gregmedd marked this pull request as ready for review July 18, 2024 18:44
Copy link

Code coverage report is ready! 📈

Copy link

@stevenhartley stevenhartley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please see comments

include/up-cpp/communication/NotificationSink.h Outdated Show resolved Hide resolved
src/communication/RpcServer.cpp Outdated Show resolved Hide resolved
src/transport/UTransport.cpp Show resolved Hide resolved
@gregmedd gregmedd force-pushed the bugfix/1.6.0/237-spec-uri-alignment-issue branch from 6fffc22 to 6218281 Compare July 24, 2024 22:43
Copy link

Code coverage report is ready! 📈

The UTransport API was not well aligned with the final version of the
UProtocol 1.6.0 spec, in particular around the optionality of URI
filters for registered listeners. This change adds new methods that
better align with the intent of the spec. The existing APIs are retained
(in some cases with new workarounds for buggy behavior) having now been
flagged as deprecated.
UTransport now calls it the "entity" or "default entity" URI to avoid
confusion since it is not solely used as a source address (it could also
be used in constructing a sink filter).

Deprecating isValid() check. Either a specific message type validity
check should be used (in the case of a message with attributes) or the
isValidFilter() should be used.
@gregmedd gregmedd force-pushed the bugfix/1.6.0/237-spec-uri-alignment-issue branch from 6218281 to 9783123 Compare July 24, 2024 23:08
Copy link

Code coverage report is ready! 📈

With the source/sink pivot in UTransport, some adjustment in Layer 2 was
necessar. This includes removing calls to deprecated APIs and adjusting
the NotificationSink API to match the UTransport changes.
Many tests broke when changes were made to validate source URIs with a
situation-specific validator instead of the generic isValid() check.
This test validates the transport mock, but has no assertions on the
behavior of the base UTransport class. It qualifies as an "extra" test -
it does not contribute coverage to the up-cpp library.
@gregmedd gregmedd force-pushed the bugfix/1.6.0/237-spec-uri-alignment-issue branch from 9783123 to d5cc19e Compare July 24, 2024 23:40
Copy link

Code coverage report is ready! 📈

@gregmedd
Copy link
Contributor Author

@stevenhartley @billpittman - Changes have been made to this PR. Please confirm your comments have been addressed and approve. Thanks!

Copy link
Contributor

@billpittman billpittman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - Thanks for addressing my comments.

Copy link

@stevenhartley stevenhartley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gregmedd gregmedd merged commit 9d53a0a into eclipse-uprotocol:v1.0_up-v1.6.0 Jul 25, 2024
10 checks passed
@gregmedd gregmedd deleted the bugfix/1.6.0/237-spec-uri-alignment-issue branch July 25, 2024 17:10
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.

Layer 1 register listener needs sink_filter to be optional
3 participants