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

fix(snap): source security-bootstrapper config overrides from env file #4283

Merged
merged 1 commit into from
Jan 17, 2023

Conversation

farshidtz
Copy link
Member

@farshidtz farshidtz commented Jan 16, 2023

The PR #4071 upgraded the library to generate correct environment files, and updated the env loader script accordingly. However, another env file loader logic was in the consul security bootstrapper script which was left out.

This PR removes the duplicate logic and makes the bootstrapper use the generic env file loader script.

Fixes #4284

Signed-off-by: Farshid Tavakolizadeh farshid.tavakolizadeh@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

  1. Download the snap from GH action snap builds or build it locally
  2. Install Device MQTT and connect sudo snap install edgex-device-mqtt --edge && sudo snap connect edgexfoundry:edgex-secretstore-token edgex-device-mqtt:edgex-secretstore-token
  3. (Install mosquitto sudo snap install mosquitto)
  4. Start sudo snap start edgex-device-mqtt
  5. Check the logs to make sure you don't see consul-related errors as reported in Missing device/app service role in consul when using snap app options #4284

New Dependency Instructions (If applicable)

Signed-off-by: Farshid Tavakolizadeh <farshid.tavakolizadeh@canonical.com>
@farshidtz farshidtz requested a review from MonicaisHer January 16, 2023 16:14
@sonarqubecloud
Copy link

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
3.8% 3.8% Duplication

@farshidtz farshidtz marked this pull request as ready for review January 16, 2023 16:49
Copy link
Contributor

@MonicaisHer MonicaisHer left a comment

Choose a reason for hiding this comment

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

@farshidtz Thanks for the fix. I have run snap testing device-mqtt suite on this PR together with device-mqtt refactor PR and there is no more device-mqtt service role missing in consul.

$ PLATFORM_CHANNEL=edge/pr-4283 SERVICE_CHANNEL=edge/pr-454 go test -v --count=1 ./test/suites/device-mqtt/
ok      edgex-snap-testing/test/suites/device-mqtt      281.369s

@farshidtz farshidtz merged commit 01248c1 into edgexfoundry:main Jan 17, 2023
@farshidtz farshidtz deleted the fix-consul-sec-bootstrapper branch January 17, 2023 13:42
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.

Missing device/app service role in consul when using snap app options
2 participants