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: Add command line/environment flag for commonConfig #486

Merged
merged 1 commit into from
Oct 17, 2023

Conversation

FelixTing
Copy link
Member

@FelixTing FelixTing commented Sep 27, 2023

fix: #485

Hold until #484 is merged

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

Non-secure mode testing

  1. From the latest compose builder run make run no-secty.
  2. Set the environment variable for non-secure testing export EDGEX_SECURITY_SECRET_STORE=false
  3. Run device-random example (/src/c/examples/random) with -cc=../commonconfiguration.yaml argument.
  4. The device-random service should bootstrap successfully without having the following error
level=ERROR ts=2023-10-06T04:34:11Z app=device-random msg="Unable to load common config file: Unable to open configuration file"
Error: 1: Unable to open configuration file
  1. The configuration can also be verified through the REST API: http://localhost:59999/api/v3/config

Secure mode testing

  1. From the latest compose builder, modify add-security.yml to add secret store token and registry ACL role for device-random, and then run make run.
  2. Set the environment variable for secure testing export EDGEX_SECURITY_SECRET_STORE=true
  3. Run device-random example (/src/c/examples/random) with -cc=../commonconfiguration.yaml argument.
  4. The device-random service should bootstrap successfully without the following error
level=ERROR ts=2023-10-06T04:34:11Z app=device-random msg="Unable to load common config file: Unable to open configuration file"
Error: 1: Unable to open configuration file

New Dependency Instructions (If applicable)

@FelixTing FelixTing changed the title Common config flag feat: Add command line/environment flag for commonConfig Sep 27, 2023
src/c/service.c Outdated Show resolved Hide resolved
@FelixTing FelixTing force-pushed the common-config-flag branch 5 times, most recently from 70bec12 to fce8b44 Compare October 6, 2023 04:19
@FelixTing FelixTing marked this pull request as ready for review October 6, 2023 04:40
src/c/service.c Outdated Show resolved Hide resolved
@FelixTing
Copy link
Member Author

Hi @lenny-intel, this PR cannot be merged due to the change request. Could you please approve this PR if you are happy with the changes?

Copy link
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

@FelixTing FelixTing merged commit 753c0e6 into edgexfoundry:main Oct 17, 2023
3 checks passed
@FelixTing FelixTing deleted the common-config-flag branch October 17, 2023 00:54
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 command line/environment flag for commonConfig
3 participants