-
Notifications
You must be signed in to change notification settings - Fork 484
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: Implement Device System Events #4101
feat: Implement Device System Events #4101
Conversation
d602e86
to
10c8b50
Compare
Codecov Report
@@ Coverage Diff @@
## main #4101 +/- ##
==========================================
- Coverage 47.32% 43.63% -3.70%
==========================================
Files 114 120 +6
Lines 9850 10591 +741
==========================================
- Hits 4662 4621 -41
- Misses 4801 5586 +785
+ Partials 387 384 -3
Continue to review full report at Codecov.
|
c91a622
to
ac32090
Compare
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
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.
The snap fails to start because security-secretstore-setup exits with non-zero code. The CI logs currently don't get the logs when the snap fails to even start (we are working on improving this).
I downloaded the build from Github (see for example here; scroll down) and installed manually to check the logs:
$ snap install --dangerous ./edgexfoundry_2.3.0-dev.30_amd64.snap
Run service command "start" for services ["consul" "core-command" "core-data" "core-metadata" "kong-daemon" "postgres" "redis" "security-bootstrapper-redis" "security-consul-bootstrapper" "security-proxy-setup" "security-secretstore-setup" "vault"] of snap "edgexfoundry" (systemctl command [start snap.edgexfoundry.security-secretstore-setup.service] failed with exit status 1: Job for snap.edgexfoundry.security-secretstore-setup.service failed because the control process exited with error code.
$ sudo journalctl -n 1000 | grep edgexfoundry | grep ERROR
level=ERROR ts=2022-07-28T08:14:23.57437856Z app=security-secretstore-setup source=init.go:329 msg="token provider failed: /snap/edgexfoundry/x1/bin/security-file-token-provider terminated with non-zero exit code 1"
Unfortunately, security-secretstore-setup is not printing the error message. Unrelated to this PR, it looks like standard output and standard error aren't captured by EdgeX logger here. This code sets to use os output streams but not sure if this is ever called.
I could not figure out why the changes in this PR are causing this failure.
Full logs: edgexfoundry_2.3.0-dev.30.logs.txt, see line 493
@farshidtz , @jim-wang-intel create this PR to test which go-mod and which version has triggered this. We have narrowed it down to go-mod-bootstrap v2.2.1-dev.9 I am taking a look at the commit for that to see how it could be impacting this. |
@farshidtz , that change to go-mod-bootstrap was to make sure the exit code it set properly when bootstrapping fails. Before it always returned with 0 exit code. I suspect that the issue with Secret Store setup in the test was always there, be now has the proper exit code. |
@farshidtz , found the culprit ! The file token provider is incorrectly returning We'll get a fix in for that which will un-block this PR. |
d69e356
to
d98ec5e
Compare
@jim-wang-intel , @farshidtz , Rebased this PR to pull in fixes from the other PR. |
Put in draft to it doesn't get merged until this PR is merged otherwise TAF tests will fail. |
Also, refactor to use common Messaging Bootstrap Handler closes edgexfoundry#4099 Signed-off-by: Leonard Goodell <[email protected]>
Signed-off-by: Leonard Goodell <[email protected]>
Signed-off-by: Leonard Goodell <[email protected]>
Signed-off-by: Leonard Goodell <[email protected]>
Signed-off-by: Leonard Goodell <[email protected]>
Signed-off-by: Leonard Goodell <[email protected]>
Signed-off-by: Leonard Goodell <[email protected]>
ed9310a
to
d0dd691
Compare
Newest version may be causing issue and not needed in this PR. Signed-off-by: Leonard Goodell <[email protected]>
d0dd691
to
cb23cb0
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Also, refactored to use common Messaging Bootstrap Handler
closes #4099
Implements related ADR
Dependent on the following PRs:
Signed-off-by: Leonard Goodell [email protected]
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)feat: Document Core Metadata Device System Events edgex-docs#830
Testing Instructions
Run edgex stack with Device Virtual
Stop Core Metadata container
Build and run this branch locally (require branches from PR referenced above) with DEBUG enabled
Using curl or postman delete, add and remove Device Virtual devices (can't use EdgeX UI from docker since core-metadata is running locally)
Verify log show debug message that System Event was published
New Dependency Instructions (If applicable)