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: Check nil pointer in buildPaths() #495

Merged
merged 3 commits into from
Mar 28, 2023

Conversation

MonicaisHer
Copy link
Contributor

@MonicaisHer MonicaisHer commented Mar 28, 2023

This PR will resolve #494

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

Build and install edegfxoundry using go mod bootstrapper from this PR

snapcraft
snap install ./edgexfoundry_3.0.0-dev.114_amd64.snap --dangerous

Set env variables:

sudo snap set edgexfoundry apps.core-data.config.edgex-config-provider='none'
sudo snap set edgexfoundry apps.core-data.config.edgex-common-config=./config/core-common-config-bootstrapper/res/configuration.yaml
sudo snap restart edgexfoundry.core-data

Check logs:

$ journalctl -f | grep core-data
Mär 28 10:05:43 ubuntu edgexfoundry.core-data[271774]: level=INFO ts=2023-03-28T08:05:43.543578388Z app=core-data source=config.go:192 msg="Common configuration loaded from file with 0 overrides applied"
...
Mär 28 10:05:43 ubuntu edgexfoundry.core-data[271774]: level=INFO ts=2023-03-28T08:05:43.572789735Z app=core-data source=httpserver.go:133 msg="Web server starting (localhost:59880)"
Mär 28 10:05:43 ubuntu edgexfoundry.core-data[271774]: level=INFO ts=2023-03-28T08:05:43.572801546Z app=core-data source=message.go:50 msg="Service dependencies resolved..."
Mär 28 10:05:43 ubuntu edgexfoundry.core-data[271774]: level=INFO ts=2023-03-28T08:05:43.572805912Z app=core-data source=message.go:51 msg="Starting core-data 3.0.0-dev.114 "
Mär 28 10:05:43 ubuntu edgexfoundry.core-data[271774]: level=INFO ts=2023-03-28T08:05:43.572809113Z app=core-data source=message.go:55 msg="This is the Core Data Microservice"
Mär 28 10:05:43 ubuntu edgexfoundry.core-data[271774]: level=INFO ts=2023-03-28T08:05:43.572812418Z app=core-data source=message.go:58 msg="Service started in: 33.37508ms

New Dependency Instructions (If applicable)

bootstrap/environment/variables.go Outdated Show resolved Hide resolved
MonicaisHer and others added 2 commits March 28, 2023 16:58
Co-authored-by: Leonard Goodell <[email protected]>
Signed-off-by: Mengyi Wang <[email protected]>

Co-authored-by: Lenny Goodell <[email protected]>
Signed-off-by: Mengyi Wang <[email protected]>
@MonicaisHer MonicaisHer marked this pull request as ready for review March 28, 2023 15:02
@codecov-commenter
Copy link

Codecov Report

Merging #495 (e614a65) into main (e43ae9c) will not change coverage.
The diff coverage is 100.00%.

📣 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     #495   +/-   ##
=======================================
  Coverage   58.54%   58.54%           
=======================================
  Files          27       27           
  Lines        2118     2118           
=======================================
  Hits         1240     1240           
  Misses        803      803           
  Partials       75       75           
Impacted Files Coverage Δ
bootstrap/environment/variables.go 90.14% <100.00%> (ø)

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

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

@lenny-goodell lenny-goodell merged commit 02bbd1b into edgexfoundry:main Mar 28, 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.

Invalid memory address or nil pointer dereference runtime error
3 participants