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

acking the 4.18 and 4.19 issues #81

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ack/4.18_cluster-density_ack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
ack:
- uuid: 7f7337aa-cee3-4a36-b154-a7c48ed1fb75
metric: etcdCPU_avg
reason: "Below 10%"
1 change: 1 addition & 0 deletions ack/4.18_crd-scale_ack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
---
5 changes: 5 additions & 0 deletions ack/4.18_node-density_ack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
ack:
- uuid: 7f7337aa-cee3-4a36-b154-a7c48ed1fb75
metric: etcdCPU_avg
reason: "Below 10%"
5 changes: 5 additions & 0 deletions ack/4.19_cluster-density_ack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
ack :
- uuid: cfae6e1e-8c47-4628-be52-8705c8c64285
metric: kubelet_avg
reason: "kube-burner change which increased cpu for kubelet, it was reverted."
1 change: 1 addition & 0 deletions ack/4.19_crd-scale_ack .yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
---
1 change: 1 addition & 0 deletions ack/4.19_node-density_ack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
---
2 changes: 1 addition & 1 deletion orion.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def cmd_analysis(**kwargs):
logger_instance = SingletonLogger(debug=level, name="Orion")
logger_instance.info("🏹 Starting Orion in command-line mode")
if len(kwargs["ack"]) > 1 :
kwargs["ackMap"] = load_ack(kwargs["ack"])
kwargs["ackMap"] = load_ack(kwargs["ack"])
kwargs["configMap"] = load_config(kwargs["config"])
output, regression_flag = run(**kwargs)
if output is None:
Expand Down
2 changes: 1 addition & 1 deletion pkg/algorithms/edivisive/edivisive.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def _analyze(self):

# Process if we have ack'ed regression
ackSet = set()
if len(self.options["ack"]) > 1 :
if len(self.options["ack"]) > 1 and self.options["ackMap"] is not None:
for ack in self.options["ackMap"]["ack"]:
pos = series.find_by_attribute("uuid",ack["uuid"])
ackSet.add(str(pos[0]) + "_" + ack["metric"])
Expand Down
11 changes: 9 additions & 2 deletions pkg/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ def load_config(config: str, parameters: Dict= None) -> Dict[str, Any]:
return rendered_config

def load_ack(ack: str) -> Dict[str,Any]:
"""Loads ack file

Args:
config (str): path to config file

Returns:
dict: dictionary of the config file
"""

logger_instance = SingletonLogger.getLogger("Orion")
try:
with open(ack, "r", encoding="utf-8") as template_file:
Expand All @@ -67,8 +76,6 @@ def load_ack(ack: str) -> Dict[str,Any]:
logger_instance.error("An error occurred: %s", e)
sys.exit(1)

required_parameters = get_template_variables(template_content)

rendered_config = yaml.safe_load(template_content)
return rendered_config

Expand Down
Loading