Open shruacha1234 opened 3 years ago
invalid
apiVersion: "recommender.com/v1"
kind: "AutotuneConfig"
metadata:
name: "invalid-tunable-datasource-name"
layer_name: container
layer_level: 0
details: generic container tunables
layerPresence:
# This layer is assumed to be available by default for all applications.
presence: always
tunables:
- name: memoryRequest
value_type: double
upper_bound: '300M'
lower_bound: '150M'
queries:
datasource:
- name: 'prme'
query: 'container_memory_working_set_bytes{$CONTAINER_LABEL$="", $POD_LABEL$="$POD$"}'
sla_class:
- response_time
- throughput
- resource_usage
- name: cpuRequest
value_type: double
upper_bound: '3.0'
lower_bound: '1.0'
queries:
datasource:
- name: 'prometheus'
query: '(container_cpu_usage_seconds_total{$CONTAINER_LABEL$!="POD", $POD_LABEL$="$POD$"}[1m])'
sla_class:
- response_time
- throughput
- resource_usage
multiple-sections
apiVersion: "recommender.com/v1"
kind: "AutotuneConfig"
metadata:
name: "multiple-tunable-datasource-name-section"
layer_name: container
layer_level: 0
details: generic container tunables
layerPresence:
# This layer is assumed to be available by default for all applications.
presence: always
tunables:
- name: memoryRequest
value_type: double
upper_bound: '300M'
lower_bound: '150M'
queries:
datasource:
- name: 'prometheus'
- name: 'graphite'
query: 'container_memory_working_set_bytes{$CONTAINER_LABEL$="", $POD_LABEL$="$POD$"}'
sla_class:
- response_time
- throughput
- resource_usage
- name: cpuRequest
value_type: double
upper_bound: '3.0'
lower_bound: '1.0'
queries:
datasource:
- name: 'prometheus'
query: '(container_cpu_usage_seconds_total{$CONTAINER_LABEL$!="POD", $POD_LABEL$="$POD$"}[1m])'
sla_class:
- response_time
- throughput
- resource_usage
no-tunable-datasource-name
apiVersion: "recommender.com/v1"
kind: "AutotuneConfig"
metadata:
name: "no-tunable-datasource-name"
layer_name: container
layer_level: 0
details: generic container tunables
layerPresence:
# This layer is assumed to be available by default for all applications.
presence: always
tunables:
- name: memoryRequest
value_type: double
upper_bound: '300M'
lower_bound: '150M'
queries:
datasource:
query: 'container_memory_working_set_bytes{$CONTAINER_LABEL$="", $POD_LABEL$="$POD$"}'
sla_class:
- response_time
- throughput
- resource_usage
- name: cpuRequest
value_type: double
upper_bound: '3.0'
lower_bound: '1.0'
queries:
datasource:
- name: 'prometheus'
query: '(container_cpu_usage_seconds_total{$CONTAINER_LABEL$!="POD", $POD_LABEL$="$POD$"}[1m])'
sla_class:
- response_time
- throughput
- resource_usage
no-tunable-datasource-name-value
apiVersion: "recommender.com/v1"
kind: "AutotuneConfig"
metadata:
name: "no-tunable-datasource-name-val"
layer_name: container
layer_level: 0
details: generic container tunables
layerPresence:
# This layer is assumed to be available by default for all applications.
presence: always
tunables:
- name: memoryRequest
value_type: double
upper_bound: '300M'
lower_bound: '150M'
queries:
datasource:
- name:
query: 'container_memory_working_set_bytes{$CONTAINER_LABEL$="", $POD_LABEL$="$POD$"}'
sla_class:
- response_time
- throughput
- resource_usage
- name: cpuRequest
value_type: double
upper_bound: '3.0'
lower_bound: '1.0'
queries:
datasource:
- name: 'prometheus'
query: '(container_cpu_usage_seconds_total{$CONTAINER_LABEL$!="POD", $POD_LABEL$="$POD$"}[1m])'
sla_class:
- response_time
- throughput
- resource_usage
null
apiVersion: "recommender.com/v1"
kind: "AutotuneConfig"
metadata:
name: "null-tunable-datasource-name"
layer_name: container
layer_level: 0
details: generic container tunables
layerPresence:
# This layer is assumed to be available by default for all applications.
presence: always
tunables:
- name: memoryRequest
value_type: double
upper_bound: '300M'
lower_bound: '150M'
queries:
datasource:
- name: NULL
query: 'container_memory_working_set_bytes{$CONTAINER_LABEL$="", $POD_LABEL$="$POD$"}'
sla_class:
- response_time
- throughput
- resource_usage
- name: cpuRequest
value_type: double
upper_bound: '3.0'
lower_bound: '1.0'
queries:
datasource:
- name: 'prometheus'
query: '(container_cpu_usage_seconds_total{$CONTAINER_LABEL$!="POD", $POD_LABEL$="$POD$"}[1m])'
sla_class:
- response_time
- throughput
- resource_usage
numerical
apiVersion: "recommender.com/v1"
kind: "AutotuneConfig"
metadata:
name: "numerical-tunable-datasource-name"
layer_name: container
layer_level: 0
details: generic container tunables
layerPresence:
# This layer is assumed to be available by default for all applications.
presence: always
tunables:
- name: memoryRequest
value_type: double
upper_bound: '300M'
lower_bound: '150M'
queries:
datasource:
- name: 135
query: 'container_memory_working_set_bytes{$CONTAINER_LABEL$="", $POD_LABEL$="$POD$"}'
sla_class:
- response_time
- throughput
- resource_usage
- name: cpuRequest
value_type: double
upper_bound: '3.0'
lower_bound: '1.0'
queries:
datasource:
- name: 'prometheus'
query: '(container_cpu_usage_seconds_total{$CONTAINER_LABEL$!="POD", $POD_LABEL$="$POD$"}[1m])'
sla_class:
- response_time
- throughput
- resource_usage
verified multiple-sections, no-tunable-datasource-name, no-tunable-datasource-name-value, null, numerical values and it is matching the expected result
@shruacha1234 - What is not working here? If all issues are resolved close this one.
Blank and invalid tunable-datasource-name isn't working
When I ran the tests for this issue, I still see 4 issues failed instead of 2.
Failed cases are :
blank-datasource-name
invalid-datasource-name
valid-datasource-name
invalid-direction-for-sloclass
Can I know why 'invalid-direction-for-sloclass' comes for 'datasource' name validation? Is this expected?
[app_autotune_yaml_tests.log](https://github.com/kruize/autotune/files/11048600/app_autotune_yaml_tests.log)
validate tunables-datasource-name for blank, invalid, multiple-sections, no-tunable-datasource-name, no-tunable-datasource-name-value, null, numerical values
blank-tunable-datasouce-name