Fix TypeError when calling emr:RunJobFlow with AutoTerminationPolicy (#5285)

This commit is contained in:
Brian Pandola 2022-07-02 17:03:54 -07:00 committed by GitHub
parent 01d0141da8
commit fff61af6fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -916,6 +916,8 @@ def to_str(value, spec):
vtype = spec["type"] vtype = spec["type"]
if vtype == "boolean": if vtype == "boolean":
return "true" if value else "false" return "true" if value else "false"
elif vtype == "long":
return int(value)
elif vtype == "integer": elif vtype == "integer":
return str(value) return str(value)
elif vtype == "float": elif vtype == "float":

View File

@ -117,6 +117,7 @@ def test_describe_cluster():
args["Tags"] = [{"Key": "tag1", "Value": "val1"}, {"Key": "tag2", "Value": "val2"}] args["Tags"] = [{"Key": "tag1", "Value": "val1"}, {"Key": "tag2", "Value": "val2"}]
args["SecurityConfiguration"] = "my-security-configuration" args["SecurityConfiguration"] = "my-security-configuration"
args["AutoScalingRole"] = "EMR_AutoScaling_DefaultRole" args["AutoScalingRole"] = "EMR_AutoScaling_DefaultRole"
args["AutoTerminationPolicy"] = {"IdleTimeout": 123}
cluster_id = client.run_job_flow(**args)["JobFlowId"] cluster_id = client.run_job_flow(**args)["JobFlowId"]