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

khepri_utils: Gracefully handle unavailable default applications #215

Merged
merged 1 commit into from
Jul 25, 2023

Conversation

the-mikedavis
Copy link
Member

If the Khepri application is started and any of the default applications (mnesia, sasl, ssl, and khepri itself) are not available, application:get_key/2 will return undefined, causing a badmatch that will terminate the Khepri application. Instead we can gracefully handle these applications being unavailable and not include their modules in the list of modules to skip when extracting functions.

Fixes #214

If the Khepri application is started and any of the default applications
(mnesia, sasl, ssl, and khepri itself) are not available,
`application:get_key/2` will return `undefined`, causing a badmatch
that will terminate the Khepri application. Instead we can gracefully
handle these applications being unavailable and not include their
modules in the list of modules to skip when extracting functions.
@the-mikedavis the-mikedavis added the bug Something isn't working label Jul 25, 2023
@codecov
Copy link

codecov bot commented Jul 25, 2023

Codecov Report

Patch coverage: 66.66% and project coverage change: -0.07% ⚠️

Comparison is base (812bb82) 89.39% compared to head (4c858e1) 89.33%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #215      +/-   ##
==========================================
- Coverage   89.39%   89.33%   -0.07%     
==========================================
  Files          20       20              
  Lines        2820     2822       +2     
==========================================
  Hits         2521     2521              
- Misses        299      301       +2     
Flag Coverage Δ
erlang-24 88.23% <66.66%> (-0.03%) ⬇️
erlang-25 88.23% <66.66%> (-0.07%) ⬇️
erlang-26 88.87% <66.66%> (-0.17%) ⬇️
os-ubuntu-latest 89.33% <66.66%> (-0.07%) ⬇️
os-windows-latest 88.23% <66.66%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
src/khepri_utils.erl 98.09% <66.66%> (-0.94%) ⬇️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dumbbell dumbbell added this to the v0.8.0 milestone Jul 25, 2023
Copy link
Member

@dumbbell dumbbell left a comment

Choose a reason for hiding this comment

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

Thank you!

@dumbbell dumbbell merged commit 8a6e4a7 into main Jul 25, 2023
10 checks passed
@dumbbell dumbbell deleted the md-khepri_utils-remove-application-modules-assertion branch July 25, 2023 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setting up an Elixir app with a dependency on khepri does not start
2 participants