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

feat: support message bus to sync metadata changes #1955

Closed
wants to merge 2 commits into from

Conversation

wangxye
Copy link
Member

@wangxye wangxye commented Feb 21, 2024

What type of PR is this?

/sig iot
/kind feature

What this PR does / why we need it:

Since MessageBus is now the default inter-communication method for EdgeX, yurt-iot-dock should switch to MessageBus, and supports synchronization of message bus-driven metadata changes.

Which issue(s) this PR fixes:

Fixes #1799

Special notes for your reviewer:

/assign @LavenderQAQ
/assign @Rui-Gan

other Note

There are still the following issues to be resolved:

  • Openyurt side supports CRUD based on message bus;
  • Real-time asynchronous acquisition of device data;
Example of Test
users:
# curl -X POST -H 'Content-Type: application/json'  \
http://edgex-core-metadata:59881/api/v3/device \
-d '[
         {
            "apiVersion": "v3",
            "device": {
               "name":"Camera",
               "serviceName": "device-rest",
               "profileName": "sample-numeric",
               "description": "My test camera",
               "adminState": "UNLOCKED",
               "operatingState": "UP",
               "protocols": {
                  "Onvif": {
                     "Address": "192.168.0.1",
                     "Port": "80",
                     "MACAddress": "xx:xx:xx:xx:xx:xx",
                     "FriendlyName":"Default Camera"
                  },
                  "CustomMetadata": {
                     "Location":"Front door"
                  }
               }
            }
         }
]'

openyurt:
# kubectl get device | grep camera
hangzhou-camera             hangzhou   true     5s

Copy link

codecov bot commented Feb 21, 2024

Codecov Report

Attention: Patch coverage is 0% with 73 lines in your changes are missing coverage. Please review.

Project coverage is 52.22%. Comparing base (3dd6c5c) to head (063d15f).
Report is 55 commits behind head on master.

Files Patch % Lines
pkg/yurtiotdock/controllers/util/messagebus.go 0.00% 41 Missing ⚠️
pkg/yurtiotdock/controllers/util/health_checker.go 0.00% 32 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1955      +/-   ##
==========================================
- Coverage   52.23%   52.22%   -0.01%     
==========================================
  Files         173      175       +2     
  Lines       21117    21088      -29     
==========================================
- Hits        11031    11014      -17     
- Misses       9110     9124      +14     
+ Partials      976      950      -26     
Flag Coverage Δ
unittests 52.22% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@wangxye
Copy link
Member Author

wangxye commented Feb 21, 2024

/rerun

@wangxye
Copy link
Member Author

wangxye commented Feb 21, 2024

/assign @LavenderQAQ
/assign @Rui-Gan

@LavenderQAQ
Copy link
Member

/assign

@LavenderQAQ LavenderQAQ self-assigned this Feb 23, 2024
Signed-off-by: wangxye <xuanyewang.cs@gmail.com>
Copy link

sonarcloud bot commented Feb 23, 2024

Quality Gate Passed Quality Gate passed

Issues
6 New issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@wangxye
Copy link
Member Author

wangxye commented Feb 23, 2024

/rerun

Copy link

stale bot commented May 24, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label May 24, 2024
@stale stale bot closed this May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature request] Use message-bus instead of REST to communicate with EdgeX
3 participants