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

ENH: small refactor of upgrade functions #2058

Merged
3 commits merged into from
Aug 23, 2021
Merged

ENH: small refactor of upgrade functions #2058

3 commits merged into from
Aug 23, 2021

Conversation

ghost
Copy link

@ghost ghost commented Aug 20, 2021

merge defaults and runtime configuration, only using the new format with
the global parameters
add **kwargs to the upgrade functions to allow adding more paramters
without breaking the old functions
handle the global parameters in all functions and update the tests
accordingly

Independent of this change, config-upgrade issues may appear in regards
to the defaults config file if intelmq versions are skipped.

pass version_history to functions
this allows the upgrade functions to determine if this is a new
installation or an upgraded intelmq instance

@ghost ghost added the component: core label Aug 20, 2021
@ghost ghost added this to the 3.1.0 milestone Aug 20, 2021
@ghost ghost self-requested a review August 20, 2021 08:23
@codecov-commenter
Copy link

codecov-commenter commented Aug 20, 2021

Codecov Report

Merging #2058 (ffea92c) into develop (e489bee) will increase coverage by 0.04%.
The diff coverage is 85.00%.

❗ Current head ffea92c differs from pull request most recent head bf770e0. Consider uploading reports for the commit bf770e0 to get more accurate results

@@             Coverage Diff             @@
##           develop    #2058      +/-   ##
===========================================
+ Coverage    75.99%   76.03%   +0.04%     
===========================================
  Files          428      428              
  Lines        23002    23033      +31     
  Branches      3061     3082      +21     
===========================================
+ Hits         17480    17514      +34     
+ Misses        4815     4812       -3     
  Partials       707      707              
Impacted Files Coverage Δ
intelmq/bin/intelmqctl.py 12.89% <0.00%> (+0.05%) ⬆️
intelmq/lib/upgrades.py 71.57% <81.15%> (+1.91%) ⬆️
intelmq/tests/lib/test_upgrades.py 100.00% <100.00%> (ø)

Sebastian Wagner added 3 commits August 20, 2021 10:49
merge defaults and runtime configuration, only using the new format with
the global parameters
add **kwargs to the upgrade functions to allow adding more paramters
without breaking the old functions
handle the global parameters in all functions and update the tests
accordingly

Independent of this change, config-upgrade issues may appear in regards
to the defaults config file if intelmq versions are skipped.
this allows the upgrade functions to determine if this is a new
installation or an upgraded intelmq instance
@ghost ghost merged commit b14d9c6 into develop Aug 23, 2021
@ghost ghost deleted the upgrade-refactor branch August 23, 2021 12:27
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant