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(feature-activation): add feature settings validation #894

Merged
merged 1 commit into from
Mar 5, 2024

Conversation

glevco
Copy link
Contributor

@glevco glevco commented Dec 14, 2023

Motivation

This PR implements a validation that compares the Feature Activation settings from the configuration file, against the previous value that is stored in the database. This runs during full node initialization and is just to prevent human errors when editing those files, since one cannot remove or change existing features from there.

Acceptance Criteria

  • Create new FeatureActivationStorage that validates configured feature activation settings against the previous value from the database.
  • Add new reset-feature-settings CLI tool for erasing saved feature settings.

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged

@glevco glevco self-assigned this Dec 14, 2023
@glevco glevco marked this pull request as ready for review December 14, 2023 16:23
hathor/feature_activation/feature.py Show resolved Hide resolved
hathor/manager.py Outdated Show resolved Hide resolved
@glevco glevco force-pushed the feat/feature-activation/settings-validation branch 2 times, most recently from 48770c6 to 5fa6220 Compare January 8, 2024 21:30
Copy link

codecov bot commented Jan 8, 2024

Codecov Report

Attention: Patch coverage is 80.95238% with 12 lines in your changes are missing coverage. Please review.

Project coverage is 85.13%. Comparing base (b1e8d35) to head (2446dd2).

Files Patch % Lines
...e_activation/storage/feature_activation_storage.py 78.72% 7 Missing and 3 partials ⚠️
hathor/builder/builder.py 75.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #894      +/-   ##
==========================================
+ Coverage   85.10%   85.13%   +0.02%     
==========================================
  Files         293      294       +1     
  Lines       22719    22781      +62     
  Branches     3418     3426       +8     
==========================================
+ Hits        19335    19394      +59     
- Misses       2705     2706       +1     
- Partials      679      681       +2     

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

jansegre
jansegre previously approved these changes Jan 18, 2024
msbrogli
msbrogli previously approved these changes Mar 4, 2024
@glevco glevco force-pushed the feat/feature-activation/settings-validation branch from 5fa6220 to b9fb592 Compare March 4, 2024 21:11
@glevco glevco dismissed stale reviews from jansegre and msbrogli via 3c94c98 March 4, 2024 21:18
msbrogli
msbrogli previously approved these changes Mar 5, 2024
jansegre
jansegre previously approved these changes Mar 5, 2024
@glevco glevco dismissed stale reviews from jansegre and msbrogli via 2446dd2 March 5, 2024 15:52
@glevco glevco force-pushed the feat/feature-activation/settings-validation branch from 3c94c98 to 2446dd2 Compare March 5, 2024 15:52
@glevco glevco merged commit d800b72 into master Mar 5, 2024
12 checks passed
@glevco glevco deleted the feat/feature-activation/settings-validation branch March 5, 2024 17:00
@jansegre jansegre mentioned this pull request Apr 5, 2024
2 tasks
@jansegre jansegre mentioned this pull request May 8, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants