From 4cbf7c0fdbdb8227eaa488a0535fc5ccd3bca638 Mon Sep 17 00:00:00 2001 From: Tyler Gu Date: Tue, 31 Oct 2023 21:33:26 -0500 Subject: [PATCH] Fix Signed-off-by: Tyler Gu --- acto/__main__.py | 8 +++---- .../anvil-rabbitmq-operator/config-crash.json | 12 +++++++--- data/anvil-rabbitmq-operator/config.json | 9 ++++++-- .../operator-crash.yaml | 22 ++++++++++++++----- data/anvil-rabbitmq-operator/operator.yaml | 22 ++++++++++++++----- .../config-crash.json | 9 ++++++-- data/anvil-zookeeper-operator/config.json | 9 ++++++-- test/cassop-330/difftest-006.json | 7 +++++- 8 files changed, 71 insertions(+), 27 deletions(-) diff --git a/acto/__main__.py b/acto/__main__.py index 20839c18f2..b7525ebb78 100644 --- a/acto/__main__.py +++ b/acto/__main__.py @@ -1,5 +1,5 @@ import argparse -from datetime import datetime +import importlib import json import logging import os @@ -7,8 +7,7 @@ import sys import threading import time -import importlib - +from datetime import datetime start_time = time.time() workdir_path = 'testrun-%s' % datetime.now().strftime('%Y-%m-%d-%H-%M') @@ -92,10 +91,9 @@ from acto import common from acto.engine import Acto, apply_testcase from acto.input.input import DeterministicInputModel, InputModel -from acto.post_process import PostDiffTest from acto.lib.operator_config import OperatorConfig +from acto.post_process.post_diff_test import PostDiffTest from acto.utils.error_handler import handle_excepthook, thread_excepthook - from acto.utils.thread_logger import get_thread_logger logger = get_thread_logger(with_prefix=False) diff --git a/data/anvil-rabbitmq-operator/config-crash.json b/data/anvil-rabbitmq-operator/config-crash.json index 326d9dafd5..aace9e825b 100644 --- a/data/anvil-rabbitmq-operator/config-crash.json +++ b/data/anvil-rabbitmq-operator/config-crash.json @@ -6,9 +6,15 @@ }, "crd_name": "rabbitmqclusters.anvil.dev", "seed_custom_resource": "data/anvil-rabbitmq-operator/cr.yaml", - "kubernetes_version": "v1.26.6", + "kubernetes_version": "v1.26.3", "diff_ignore_fields": [ "\\['metadata'\\]\\['annotations'\\]\\['anvil\\.dev\\\/lastRestartAt'\\]", - "\\['spec'\\]\\['containers'\\]\\[0\\]\\['command'\\]" - ] + "\\['spec'\\]\\['containers'\\]\\[0\\]\\['command'\\]", + "\\['spec'\\]\\['containers'\\]\\[0\\]\\['args'\\]" + ], + "kubernetes_engine": { + "feature_gates": { + "StatefulSetAutoDeletePVC": "true" + } + } } \ No newline at end of file diff --git a/data/anvil-rabbitmq-operator/config.json b/data/anvil-rabbitmq-operator/config.json index 69e7698e8d..af142b259b 100644 --- a/data/anvil-rabbitmq-operator/config.json +++ b/data/anvil-rabbitmq-operator/config.json @@ -6,8 +6,13 @@ }, "crd_name": "rabbitmqclusters.anvil.dev", "seed_custom_resource": "data/anvil-rabbitmq-operator/cr.yaml", - "kubernetes_version": "v1.26.6", + "kubernetes_version": "v1.26.3", "diff_ignore_fields": [ "\\['metadata'\\]\\['annotations'\\]\\['anvil\\.dev\\\/lastRestartAt'\\]" - ] + ], + "kubernetes_engine": { + "feature_gates": { + "StatefulSetAutoDeletePVC": "true" + } + } } \ No newline at end of file diff --git a/data/anvil-rabbitmq-operator/operator-crash.yaml b/data/anvil-rabbitmq-operator/operator-crash.yaml index 6719893174..2f038ea53b 100644 --- a/data/anvil-rabbitmq-operator/operator-crash.yaml +++ b/data/anvil-rabbitmq-operator/operator-crash.yaml @@ -649,15 +649,25 @@ spec: type: array limits: additionalProperties: - description: "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n``` ::= \n\n\t(Note that may be empty, from the \"\" case in .)\n\n ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= \"+\" | \"-\" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei\n\n\t(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n\n ::= m | \"\" | k | M | G | T | P | E\n\n\t(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n\n ::= \"e\" | \"E\" ```\n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n\n- No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible.\n\nThe sign will be omitted unless the number is negative.\n\nExamples:\n\n- 1.5 will be serialized as \"1500m\" - 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation." - type: string - description: "Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/" + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' type: object requests: additionalProperties: - description: "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n``` ::= \n\n\t(Note that may be empty, from the \"\" case in .)\n\n ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= \"+\" | \"-\" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei\n\n\t(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n\n ::= m | \"\" | k | M | G | T | P | E\n\n\t(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n\n ::= \"e\" | \"E\" ```\n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n\n- No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible.\n\nThe sign will be omitted unless the number is negative.\n\nExamples:\n\n- 1.5 will be serialized as \"1500m\" - 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation." - type: string - description: "Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/" + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' type: object type: object tolerations: diff --git a/data/anvil-rabbitmq-operator/operator.yaml b/data/anvil-rabbitmq-operator/operator.yaml index 5c87448195..3f71597a2a 100644 --- a/data/anvil-rabbitmq-operator/operator.yaml +++ b/data/anvil-rabbitmq-operator/operator.yaml @@ -649,15 +649,25 @@ spec: type: array limits: additionalProperties: - description: "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n``` ::= \n\n\t(Note that may be empty, from the \"\" case in .)\n\n ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= \"+\" | \"-\" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei\n\n\t(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n\n ::= m | \"\" | k | M | G | T | P | E\n\n\t(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n\n ::= \"e\" | \"E\" ```\n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n\n- No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible.\n\nThe sign will be omitted unless the number is negative.\n\nExamples:\n\n- 1.5 will be serialized as \"1500m\" - 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation." - type: string - description: "Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/" + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' type: object requests: additionalProperties: - description: "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n``` ::= \n\n\t(Note that may be empty, from the \"\" case in .)\n\n ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= \"+\" | \"-\" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei\n\n\t(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n\n ::= m | \"\" | k | M | G | T | P | E\n\n\t(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n\n ::= \"e\" | \"E\" ```\n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n\n- No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible.\n\nThe sign will be omitted unless the number is negative.\n\nExamples:\n\n- 1.5 will be serialized as \"1500m\" - 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation." - type: string - description: "Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/" + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' type: object type: object tolerations: diff --git a/data/anvil-zookeeper-operator/config-crash.json b/data/anvil-zookeeper-operator/config-crash.json index 9f8f608ce7..3a41ce7ffd 100644 --- a/data/anvil-zookeeper-operator/config-crash.json +++ b/data/anvil-zookeeper-operator/config-crash.json @@ -7,10 +7,15 @@ "crd_name": "zookeeperclusters.anvil.dev", "custom_oracle": "data.zookeeper-operator.oracle", "seed_custom_resource": "data/anvil-zookeeper-operator/cr.yaml", - "kubernetes_version": "v1.26.6", + "kubernetes_version": "v1.26.3", "diff_ignore_fields": [ "\\[\\'metadata\\'\\]\\[\\'annotations\\'\\]\\[\\'config\\'\\]", "\\['metadata'\\]\\['annotations'\\]\\['anvil\\.dev\\\/lastRestartAt'\\]", "\\['spec'\\]\\['containers'\\]\\[0\\]\\['command'\\]" - ] + ], + "kubernetes_engine": { + "feature_gates": { + "StatefulSetAutoDeletePVC": "true" + } + } } \ No newline at end of file diff --git a/data/anvil-zookeeper-operator/config.json b/data/anvil-zookeeper-operator/config.json index 99a6f6cc4e..a6b18eed9a 100644 --- a/data/anvil-zookeeper-operator/config.json +++ b/data/anvil-zookeeper-operator/config.json @@ -7,9 +7,14 @@ "crd_name": "zookeeperclusters.anvil.dev", "custom_oracle": "data.zookeeper-operator.oracle", "seed_custom_resource": "data/anvil-zookeeper-operator/cr.yaml", - "kubernetes_version": "v1.26.6", + "kubernetes_version": "v1.26.3", "diff_ignore_fields": [ "\\[\\'metadata\\'\\]\\[\\'annotations\\'\\]\\[\\'config\\'\\]", "\\['metadata'\\]\\['annotations'\\]\\['anvil\\.dev\\\/lastRestartAt'\\]" - ] + ], + "kubernetes_engine": { + "feature_gates": { + "StatefulSetAutoDeletePVC": "true" + } + } } \ No newline at end of file diff --git a/test/cassop-330/difftest-006.json b/test/cassop-330/difftest-006.json index 18af846e01..98ca3cb2a9 100644 --- a/test/cassop-330/difftest-006.json +++ b/test/cassop-330/difftest-006.json @@ -11421,5 +11421,10 @@ "trial": "trial-00-0001", "gen": 8 } - ] + ], + "time": { + "k8s_bootstrap": 124.68207931518555, + "operator_deploy": -0.013962507247924805, + "run": 125.33488893508911 + } } \ No newline at end of file