kruize / autotune

Autonomous Performance Tuning for Kubernetes!
Apache License 2.0
158 stars 54 forks source link

Create Experiment failed with Cannot invoke "com.autotune.common.data.ValidationOutputData.isSuccess()" #769

Open chandrams opened 1 year ago

chandrams commented 1 year ago

Creating experiment with blank mode fails with this error - Cannot invoke "com.autotune.common.data.ValidationOutputData.isSuccess()" because "addedToDB" is null

    # Create experiment using the specified json
        response = create_experiment(tmp_json_file)
        data = response.json()
        print(data['message'])

>       assert response.status_code == int(expected_status_code)
E       AssertionError: assert 500 == 400
E        +  where 500 = <Response [500]>.status_code
E        +  and   400 = int('400')

test_create_experiment.py:78: AssertionError
 ------------------------------Captured stdout call------------------------------ 

****************************************************
Test -  blank_mode
****************************************************

************************************************************
[{'version': '1.0', 'experiment_name': 'quarkus-resteasy-kruize-min-http-response-time-db', 'cluster_name': 'cluster-one-division-bell', 'performance_profile': 'resource-optimization-openshift', 'mode': '', 'target_cluster': 'remote', 'kubernetes_objects': [{'type': 'deployment', 'name': 'tfb-qrh-sample', 'namespace': 'default', 'containers': [{'container_image_name': 'kruize/tfb-qrh:1.13.2.F_et17', 'container_name': 'tfb-server'}]}], 'trial_settings': {'measurement_duration': '15min'}, 'recommendation_settings': {'threshold': '0.1'}}]

************************************************************

Creating the experiment...
<Response [500]>
Response status code =  500
Internal Server Error: Cannot invoke "com.autotune.common.data.ValidationOutputData.isSuccess()" because "addedToDB" is null
chandrams commented 1 year ago

Same issue is seen with invalid mode, blank/null/invalid target_cluster