Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Add support for action configs #402

Merged
merged 14 commits into from
Sep 1, 2020
Merged

Add support for action configs #402

merged 14 commits into from
Sep 1, 2020

Conversation

vigyasharma
Copy link
Contributor

@vigyasharma vigyasharma commented Aug 31, 2020

Fixes #: #403 #404 #405

Description: This change allows action level configurations to be provided via config file - rca.conf.

Additional code refactoring includes:

  • Config objects to encapsulate the an entire configuration. These allow config key, value, default value and validation functions to be stored in a single object.
  • Support for validating config values via predicate functions.
  • NestedConfig to recursively nest through a map and support multi-level nested configurations. Current support only allowed for three nested levels.
  • Remove cache bound configurations from DeciderConfig
  • Allow skipping muted configurations from rca.conf
  • Changes in RcaConf to allow passing config jsons as strings for tests.
  • Ignore flaky test TimeExpiringSetTest.testExpiringIteration

Tests: Added unit tests for all components

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@vigyasharma vigyasharma self-assigned this Aug 31, 2020
@vigyasharma vigyasharma added code-refactoring The change reduces the cognitive load of the reader of the code and makes adding new changes easier enhancement Enhancements to existing codebase labels Aug 31, 2020
@codecov
Copy link

codecov bot commented Aug 31, 2020

Codecov Report

Merging #402 into master will increase coverage by 0.48%.
The diff coverage is 97.46%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #402      +/-   ##
============================================
+ Coverage     70.09%   70.58%   +0.48%     
- Complexity     2287     2311      +24     
============================================
  Files           303      307       +4     
  Lines         13605    13686      +81     
  Branches       1133     1142       +9     
============================================
+ Hits           9537     9660     +123     
+ Misses         3695     3663      -32     
+ Partials        373      363      -10     
Impacted Files Coverage Δ Complexity Δ
...yzer/decisionmaker/actions/SuppressibleAction.java 100.00% <ø> (ø) 5.00 <0.00> (ø)
...performanceanalyzer/rca/configs/DeciderConfig.java 47.05% <ø> (+0.39%) 4.00 <0.00> (-4.00) ⬆️
...ormanceanalyzer/rca/store/rca/cache/CacheUtil.java 58.62% <ø> (ø) 9.00 <0.00> (ø)
...erformanceanalyzer/rca/framework/core/RcaConf.java 52.21% <75.00%> (+1.30%) 33.00 <2.00> (+2.00)
...ecisionmaker/actions/ModifyCacheMaxSizeAction.java 88.88% <92.59%> (+10.68%) 17.00 <2.00> (+2.00)
...cisionmaker/actions/configs/QueueActionConfig.java 97.22% <97.22%> (ø) 5.00 <5.00> (?)
...cisionmaker/actions/ModifyQueueCapacityAction.java 80.95% <100.00%> (+11.21%) 14.00 <1.00> (-1.00) ⬆️
...cisionmaker/actions/configs/CacheActionConfig.java 100.00% <100.00%> (ø) 5.00 <5.00> (?)
...zer/decisionmaker/deciders/CacheHealthDecider.java 94.54% <100.00%> (+4.38%) 17.00 <0.00> (-2.00) ⬆️
...rmanceanalyzer/decisionmaker/deciders/Decider.java 65.51% <100.00%> (+6.89%) 5.00 <1.00> (-2.00) ⬆️
... and 15 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8a806d2...f8ddb98. Read the comment docs.

@vigyasharma vigyasharma requested a review from ktkrg August 31, 2020 15:36
This was referenced Aug 31, 2020
ktkrg
ktkrg previously approved these changes Aug 31, 2020
Copy link
Contributor

@ktkrg ktkrg left a comment

Choose a reason for hiding this comment

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

🚢 it!

rguo-aws
rguo-aws previously approved these changes Aug 31, 2020
 - Add nullable annotations
 - Move default values to static final variables
@ktkrg ktkrg self-requested a review September 1, 2020 17:58
@vigyasharma vigyasharma merged commit 2f6ba39 into master Sep 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
code-refactoring The change reduces the cognitive load of the reader of the code and makes adding new changes easier enhancement Enhancements to existing codebase
Projects
None yet
3 participants