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): Refactor to avoid conflicts with readonly config provider directory #163

Merged
merged 2 commits into from
Mar 22, 2023

Conversation

MonicaisHer
Copy link
Contributor

@MonicaisHer MonicaisHer commented Mar 17, 2023

Changes to incorporate the following fixes:

If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/app-rfid-llrp-inventory/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

Setup:

snap install ./edgex-app-rfid-llrp-inventory_3.0.0-dev.15_amd64.snap --dangerous
snap install ./edgex-config-provider/edgex-config-provider-example_2.3_amd64.snap --dangerous
snap install edgexfoundry --edge
sudo snap connect edgexfoundry:edgex-secretstore-token edgex-app-rfid-llrp-inventory:edgex-secretstore-token
sudo snap connect edgex-app-rfid-llrp-inventory:app-rfid-llrp-inventory-config edgex-config-provider-example:app-rfid-llrp-inventory-config

Validate that there are config files come from config provider:

$ snap start edgex-app-rfid-llrp-inventory && journalctl -f | grep "app=app-rfid-llrp-inventory source=service.go"
...app=app-rfid-llrp-inventory source=service.go:211 msg="CONFIG BY EXAMPLE PROVIDER"

Validate that .env file exists and works:

$ snap set edgex-app-rfid-llrp-inventory config.writable-loglevel=DEBUG
$ cat /var/snap/edgex-app-rfid-llrp-inventory/current/config/app-rfid-llrp-inventory/overrides.env 
# Sys-gen env vars from snap options:
WRITABLE_LOGLEVEL="DEBUG"

$ snap restart edgex-app-rfid-llrp-inventory && journalctl -f | grep app-rfid-llrp-inventory | grep DEBUG
# ... level=DEBUG ...

New Dependency Instructions (If applicable)

…directory

Changes to incorporate the following fixes:
- canonical/edgex-snap-hooks#83
- canonical/edgex-snap-hooks#82

Signed-off-by: Mengyi Wang <mengyi.wang@canonical.com>
snap/local/bin/source-env-file.sh Outdated Show resolved Hide resolved
Signed-off-by: Mengyi Wang <mengyi.wang@canonical.com>
@farshidtz farshidtz merged commit 636b604 into edgexfoundry:main Mar 22, 2023
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.

2 participants