Skip to content

feat(snap): Add core-common-config-bootstrapper#4347

Merged
farshidtz merged 7 commits intoedgexfoundry:mainfrom
MonicaisHer:EDGEX-657-add-core-common-config-bootstrapper
Feb 15, 2023
Merged

feat(snap): Add core-common-config-bootstrapper#4347
farshidtz merged 7 commits intoedgexfoundry:mainfrom
MonicaisHer:EDGEX-657-add-core-common-config-bootstrapper

Conversation

@MonicaisHer
Copy link
Copy Markdown
Contributor

@MonicaisHer MonicaisHer commented Feb 13, 2023

A component called "core-common-config-bootstrapper" has been added through PR #4292, which pushes the common configuration to the Config Provider. This PR adds it into snap packaging.

Additionally, the command-line flags have been updated by this PR to use preferred options for apps.

Signed-off-by: Mengyi Wang mengyi.wang@canonical.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:

  • I am not introducing a breaking change (if you are, flag in conventional commit message with BREAKING CHANGE: describing the break)
  • I am not introducing a new dependency (add notes below if you are)
  • I have added unit tests for the new feature or bug fix (if not, why?)
  • I have fully tested (add details below) this the new feature or bug fix (if not, why?)
  • I have opened a PR for the related docs change (if not, why?)

Testing Instructions

New Dependency Instructions (If applicable)

Signed-off-by: Mengyi Wang <mengyi.wang@canonical.com>
@lenny-goodell
Copy link
Copy Markdown
Member

recheck

lenny-goodell
lenny-goodell previously approved these changes Feb 13, 2023
Copy link
Copy Markdown
Member

@lenny-goodell lenny-goodell left a comment

Choose a reason for hiding this comment

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

LGTM

Comment thread snap/snapcraft.yaml Outdated
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

Merging #4347 (fceb7ce) into main (15a983a) will not change coverage.
The diff coverage is n/a.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@           Coverage Diff           @@
##             main    #4347   +/-   ##
=======================================
  Coverage   43.54%   43.54%           
=======================================
  Files         116      116           
  Lines       10732    10732           
=======================================
  Hits         4673     4673           
  Misses       5640     5640           
  Partials      419      419           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Copy Markdown
Member

@ejlee3 ejlee3 left a comment

Choose a reason for hiding this comment

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

need to add dependencies for services that rely on core-common-config-bootstrapper for any services that use common configuration - core-command, core-data, core-metadata, support-notifications, support-scheduler, etc

Signed-off-by: Mengyi Wang <mengyi.wang@canonical.com>
- correct `configDir` path
- add input of `configProvider`

Signed-off-by: Mengyi Wang <mengyi.wang@canonical.com>
Signed-off-by: Mengyi Wang <mengyi.wang@canonical.com>
lenny-goodell
lenny-goodell previously approved these changes Feb 14, 2023
Copy link
Copy Markdown
Member

@lenny-goodell lenny-goodell left a comment

Choose a reason for hiding this comment

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

LGTM

@lenny-goodell
Copy link
Copy Markdown
Member

@MonicaisHer, @farshidtz , can we take this out of Draft now se it can be merged?

@MonicaisHer
Copy link
Copy Markdown
Contributor Author

@lenny-intel Thank you. I still need to address some open topics for example:

level=ERROR ts=2023-02-14T17:06:50.072503544Z app=core-data source=bootstrap.go:48 msg="did not get boolean from config provider for IsCommonConfigReady: strconv.ParseBool: parsing \"\": invalid syntax"

I will let you know as soon as everything has been resolved.

@lenny-goodell
Copy link
Copy Markdown
Member

lenny-goodell commented Feb 14, 2023

@lenny-intel Thank you. I still need to address some open topics for example:

level=ERROR ts=2023-02-14T17:06:50.072503544Z app=core-data source=bootstrap.go:48 msg="did not get boolean from config provider for IsCommonConfigReady: strconv.ParseBool: parsing \"\": invalid syntax"

I will let you know as soon as everything has been resolved.

@MonicaisHer , That will happen in the retry loop waiting for Common Config to be ready. Is it causing the service to exit?

@farshidtz
Copy link
Copy Markdown
Member

farshidtz commented Feb 14, 2023

@lenny-intel Thank you. I still need to address some open topics for example:

level=ERROR ts=2023-02-14T17:06:50.072503544Z app=core-data source=bootstrap.go:48 msg="did not get boolean from config provider for IsCommonConfigReady: strconv.ParseBool: parsing \"\": invalid syntax"

I will let you know as soon as everything has been resolved.

@MonicaisHer , That will happen in the retry loop waiting for Common Config to be ready. Is it causing the service to exit?

Yes, the services exit immediately after that error and give up after several quick restarts. See the logs here, as an artifact: https://github.com/edgexfoundry/edgex-go/actions/runs/4175670981

This PR is still missing the needed startup ordering that was mentioned in #4347 (review)

@lenny-goodell
Copy link
Copy Markdown
Member

lenny-goodell commented Feb 14, 2023

Yes, the services exit immediately after that error and give up after several quick restarts. See the logs here, as an artifact: https://github.com/edgexfoundry/edgex-go/actions/runs/4175670981

@farshidtz , @MonicaisHer , the core/support services are failing because core-common-config-bootstrapper never ran. core-common-config-bootstrapper should be in the list, but isn't:

Feb 14 17:35:49 fv-az358-706 edgexfoundry.configure[3098]: Processing autostart for: [              consul redis core-data core-metadata core-command support-notifications support-scheduler postgres kong-daemon vault security-secretstore-setup security-consul-bootstrapper security-proxy-setup security-bootstrapper-redis]
Feb 14 17:35:49 fv-az358-706 edgexfoundry.configure[3098]: consul will start and enable.
Feb 14 17:35:49 fv-az358-706 edgexfoundry.configure[3098]: redis will start and enable.
Feb 14 17:35:49 fv-az358-706 edgexfoundry.configure[3098]: core-data will start and enable.
Feb 14 17:35:49 fv-az358-706 edgexfoundry.configure[3098]: core-metadata will start and enable.
Feb 14 17:35:49 fv-az358-706 edgexfoundry.configure[3098]: core-command will start and enable.
Feb 14 17:35:49 fv-az358-706 edgexfoundry.configure[3098]: support-notifications will start and enable.
Feb 14 17:35:49 fv-az358-706 edgexfoundry.configure[3098]: support-scheduler will start and enable.
Feb 14 17:35:49 fv-az358-706 edgexfoundry.configure[3098]: postgres will start and enable.
Feb 14 17:35:49 fv-az358-706 edgexfoundry.configure[3098]: kong-daemon will start and enable.
Feb 14 17:35:49 fv-az358-706 edgexfoundry.configure[3098]: vault will start and enable.
Feb 14 17:35:49 fv-az358-706 edgexfoundry.configure[3098]: security-secretstore-setup will start and enable.
Feb 14 17:35:49 fv-az358-706 edgexfoundry.configure[3098]: security-consul-bootstrapper will start and enable.
Feb 14 17:35:49 fv-az358-706 edgexfoundry.configure[3098]: security-proxy-setup will start and enable.
Feb 14 17:35:49 fv-az358-706 edgexfoundry.configure[3098]: security-bootstrapper-redis will start and enable.

Signed-off-by: Mengyi Wang <mengyi.wang@canonical.com>
@MonicaisHer MonicaisHer force-pushed the EDGEX-657-add-core-common-config-bootstrapper branch from 3fddbef to a0b2d94 Compare February 15, 2023 10:43
@MonicaisHer MonicaisHer marked this pull request as ready for review February 15, 2023 11:18
Comment thread snap/local/helper-go/common.go Outdated
Comment thread snap/local/helper-go/common.go Outdated
Comment thread snap/local/helper-go/common.go Outdated
@MonicaisHer MonicaisHer force-pushed the EDGEX-657-add-core-common-config-bootstrapper branch from 849fbee to 4b96645 Compare February 15, 2023 15:06
MonicaisHer and others added 2 commits February 15, 2023 16:10
Signed-off-by: Mengyi Wang <mengyi.wang@canonical.com>
move core-common-config-bootstrapper to core services group

Co-authored-by: Farshid Tavakolizadeh <farshid.tavakolizadeh@canonical.com>
Signed-off-by: Mengyi Wang <mengyi.wang@canonical.com>
@MonicaisHer MonicaisHer force-pushed the EDGEX-657-add-core-common-config-bootstrapper branch from 4b96645 to 35a5f4b Compare February 15, 2023 15:11
@sonarqubecloud
Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@MonicaisHer MonicaisHer requested a review from ejlee3 February 15, 2023 15:33
Copy link
Copy Markdown
Member

@lenny-goodell lenny-goodell left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Member

@farshidtz farshidtz left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks!

@farshidtz farshidtz merged commit 8ffa5fb into edgexfoundry:main Feb 15, 2023
@lenny-goodell lenny-goodell linked an issue Feb 21, 2023 that may be closed by this pull request
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.

Add Core Common Config to edgex-go snap

5 participants