Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Gu <[email protected]>
  • Loading branch information
tylergu committed Nov 19, 2023
1 parent db9e57b commit 072c065
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/kubernetes_engine_test.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Kubernetes Engine Test
on:
push:
path:
paths:
- acto/kubernetes_engine/**
jobs:
KubernetesEngineTest:
Expand Down
11 changes: 9 additions & 2 deletions performance_measurement/measure_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,9 @@ def run(self,
if sts_name_f:
last_revision = event_list[-1][0]["object"].status.update_revision
last_spec = event_list[-1][0]['object'].to_dict()["spec"]
# remove the lastRestartAt label for rabbitmq, hack for the reference rabbitmq operator
if "rabbitmq.com/lastRestartAt" in last_spec["template"]["metadata"]["labels"]:
del last_spec["template"]["metadata"]["labels"]["rabbitmq.com/lastRestartAt"]
last_spec_hash = hashlib.sha256(json.dumps(
last_spec, sort_keys=True).encode()).hexdigest()

Expand All @@ -243,9 +246,13 @@ def run(self,
patch = jsonpatch.JsonPatch.from_diff(prev_spec, obj_dict["spec"])
logger.info(f"Patch: {patch}")

prev_spec = obj_dict["spec"]
curr_spec = obj_dict["spec"]
# remove the lastRestartAt label for rabbitmq, hack for the reference rabbitmq operator
if "rabbitmq.com/lastRestartAt" in curr_spec["template"]["metadata"]["labels"]:
del curr_spec["template"]["metadata"]["labels"]["rabbitmq.com/lastRestartAt"]
current_spec_hash = hashlib.sha256(json.dumps(
obj_dict["spec"], sort_keys=True).encode()).hexdigest()
curr_spec, sort_keys=True).encode()).hexdigest()
prev_spec = curr_spec
if condition_1 is None:
if current_spec_hash == last_spec_hash:
condition_1 = timestamp
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ requests~=2.31.0
pytest~=7.4.0
pydantic~=1.10.9
pytest-cov~=4.1.0
tabulate~=0.9.0
tabulate~=0.9.0
docker~=6.1.3

0 comments on commit 072c065

Please sign in to comment.