-
Notifications
You must be signed in to change notification settings - Fork 485
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
feat(data): update validateEvent topic check #4345
Conversation
event topic from device service will be: <prefix>/<service-name>/<profile-name>/<device-name>/<source-name> corresponding to edgexfoundry/device-sdk-go#1261 Signed-off-by: Chris Hung <chris@iotechsys.com>
Kudos, SonarCloud Quality Gate passed! |
@lenny-intel according to document app-service expects event topic to have the same suffix: However if event is added by REST API, coredata does not know the device service name: Do we allow this inconsistency ? or maybe we update the event topic published by coredata to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
recheck |
@hahattan , the Add Event REST API needs to be updated to include the |
@lenny-intel REST endpoint only includes device name, profile name and source name. |
@hahattan after the discussion in the Core WG meeting on 15th-Feb-2023, we should modify the REST API to fit this change After this API change, you can get the device service name from REST API |
@hahattan , @cloudxxx8 , FYI may PR here #4348 took care of this except for updating the swagger. This PR can be closed. @cherrycl , FYI for TAF tests |
fields := strings.Split(messageTopic, "/") | ||
|
||
// assumes a non-empty base topic with /profileName/deviceName/sourceName appended by publisher | ||
if len(fields) < 4 { | ||
if len(fields) < 5 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lenny-intel Do you think we still need to check this ? I didn't see the change in #4348
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we need this check, and update the comment in line 120
however, why doesn't it if len(fields) < 6
?
event topic from device service will be:
<prefix>/<service-name>/<profile-name>/<device-name>/<source-name>
corresponding to edgexfoundry/device-sdk-go#1261
Signed-off-by: Chris Hung chris@iotechsys.com
If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/edgex-go/blob/main/.github/Contributing.md
PR Checklist
Please check if your PR fulfills the following requirements:
BREAKING CHANGE:
describing the break)Testing Instructions
New Dependency Instructions (If applicable)