{"action":"created","issue":{"url":"https://api.github.com/repos/boto/boto3/issues/733","repository_url":"https://api.github.com/repos/boto/boto3","labels_url":"https://api.github.com/repos/boto/boto3/issues/733/labels{/name}","comments_url":"https://api.github.com/repos/boto/boto3/issues/733/comments","events_url":"https://api.github.com/repos/boto/boto3/issues/733/events","html_url":"https://github.com/boto/boto3/issues/733","id":167937872,"number":733,"title":"EMR `run_job_flow` : Steps order not respected","user":{"login":"Pedroyev","id":5444449,"avatar_url":"https://avatars.githubusercontent.com/u/5444449?v=3","gravatar_id":"","url":"https://api.github.com/users/Pedroyev","html_url":"https://github.com/Pedroyev","followers_url":"https://api.github.com/users/Pedroyev/followers","following_url":"https://api.github.com/users/Pedroyev/following{/other_user}","gists_url":"https://api.github.com/users/Pedroyev/gists{/gist_id}","starred_url":"https://api.github.com/users/Pedroyev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pedroyev/subscriptions","organizations_url":"https://api.github.com/users/Pedroyev/orgs","repos_url":"https://api.github.com/users/Pedroyev/repos","events_url":"https://api.github.com/users/Pedroyev/events{/privacy}","received_events_url":"https://api.github.com/users/Pedroyev/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/boto/boto3/labels/api-question","name":"api-question","color":"cc317c"},{"url":"https://api.github.com/repos/boto/boto3/labels/closing-soon-if-no-response","name":"closing-soon-if-no-response","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-27T19:38:10Z","updated_at":"2016-07-28T17:58:47Z","closed_at":null,"body":"I'm migrating from boto to boto3 and I found this problem:\r\n\r\nWhen creating Steps for a MapReduce Job, the order of the elements in the  array passed to run_job_flow function is not respected.  The element n in the array \"Steps\" in the dict passed as parameter to run_job_flow function is not always the n step in the job according to aws emr console.  \r\n\r\n\r\nI'm using boto3 version 1.3.1, python 2.7.6 . \r\n"},"comment":{"url":"https://api.github.com/repos/boto/boto3/issues/comments/235974496","html_url":"https://github.com/boto/boto3/issues/733#issuecomment-235974496","issue_url":"https://api.github.com/repos/boto/boto3/issues/733","id":235974496,"user":{"login":"Pedroyev","id":5444449,"avatar_url":"https://avatars.githubusercontent.com/u/5444449?v=3","gravatar_id":"","url":"https://api.github.com/users/Pedroyev","html_url":"https://github.com/Pedroyev","followers_url":"https://api.github.com/users/Pedroyev/followers","following_url":"https://api.github.com/users/Pedroyev/following{/other_user}","gists_url":"https://api.github.com/users/Pedroyev/gists{/gist_id}","starred_url":"https://api.github.com/users/Pedroyev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pedroyev/subscriptions","organizations_url":"https://api.github.com/users/Pedroyev/orgs","repos_url":"https://api.github.com/users/Pedroyev/repos","events_url":"https://api.github.com/users/Pedroyev/events{/privacy}","received_events_url":"https://api.github.com/users/Pedroyev/received_events","type":"User","site_admin":false},"created_at":"2016-07-28T17:58:46Z","updated_at":"2016-07-28T17:58:46Z","body":"Hi,\r\nHere is the log. I replaced confidential info with \"XXX\". The body of the request is in the log, so I think it is enough to know how the request was made. \r\nLooking at the aws console, the order of the steps vary randomly from call to call.\r\n\r\nPlease, if this information is not enough, just let me know.\r\nThanks.\r\n\r\n> 2016-07-28 14:39:54,554 botocore.credentials [DEBUG] Looking for credentials via: assume-role\r\n2016-07-28 14:39:54,555 botocore.credentials [DEBUG] Looking for credentials via: shared-credentials-file\r\n2016-07-28 14:39:54,556 botocore.credentials [INFO] Found credentials in shared credentials file: ~/.aws/credentials\r\n2016-07-28 14:39:54,557 botocore.loaders [DEBUG] Loading JSON file: /usr/local/lib/python2.7/dist-packages/botocore/data/endpoints.json\r\n2016-07-28 14:39:54,569 botocore.loaders [DEBUG] Loading JSON file: /usr/local/lib/python2.7/dist-packages/botocore/data/emr/2009-03-31/service-2.json\r\n2016-07-28 14:39:54,591 botocore.loaders [DEBUG] Loading JSON file: /usr/local/lib/python2.7/dist-packages/botocore/data/_retry.json\r\n2016-07-28 14:39:54,592 botocore.client [DEBUG] Registering retry handlers for service: emr\r\n2016-07-28 14:39:54,593 botocore.hooks [DEBUG] Event creating-client-class.emr: calling handler <function add_generate_presigned_url at 0x7f65f3b120c8>\r\n2016-07-28 14:39:54,595 botocore.client [DEBUG] The s3 config key is not a dictionary type, ignoring its value of: None\r\n2016-07-28 14:39:54,597 botocore.endpoint [DEBUG] Setting elasticmapreduce timeout as (60, 60)\r\n2016-07-28 14:39:54,600 botocore.endpoint [DEBUG] Making request for OperationModel(name=RunJobFlow) (verify_ssl=True) with params: {'body': '{\"AdditionalInfo\": \"{}\", \"Name\": \"XXXXX\", \"ServiceRole\": \"EMR_DefaultRole\", \"Instances\": {\"InstanceCount\": 4, \"MasterInstanceType\": \"c3.xlarge\", \"HadoopVersion\": \"1.0.3\", \"KeepJobFlowAliveWhenNoSteps\": false, \"SlaveInstanceType\": \"c3.xlarge\", \"Ec2KeyName\": \"XXXXX\"}, \"JobFlowRole\": \"EMR_EC2_DefaultRole\", \"Steps\": [{\"HadoopJarStep\": {\"MainClass\": \"XXXXXX\", \"Args\": [\"XX\", \"XX\"], \"Jar\": \"XXX\", \"Properties\": []}, **\"Name\": \"STEP 1\"**, \"ActionOnFailure\": \"TERMINATE_JOB_FLOW\"}, {\"HadoopJarStep\": {\"MainClass\": \"XXXXX\", \"Args\": [\"XX\", \"XX\"], \"Jar\": \"XXXX\", \"Properties\": []}, **\"Name\": \"STEP 2\"**, \"ActionOnFailure\": \"TERMINATE_JOB_FLOW\"}, {\"HadoopJarStep\": {\"MainClass\": \"XXXX\", \"Args\": [\"XX\", \"XX\"], \"Jar\": \"XXX\", \"Properties\": []}, **\"Name\": \"STEP 3\"**, \"ActionOnFailure\": \"TERMINATE_JOB_FLOW\"}], \"VisibleToAllUsers\": false, \"LogUri\": \"XX\", \"AmiVersion\": \"2.3.3\"}', 'url': u'https://elasticmapreduce.us-east-1.amazonaws.com/', 'headers': {'User-Agent': 'Boto3/1.3.1 Python/2.7.6 Linux/4.2.0-42-generic Botocore/1.4.37', 'Content-Type': u'application/x-amz-json-1.1', 'X-Amz-Target': u'ElasticMapReduce.RunJobFlow'}, 'context': {'client_region': 'us-east-1', 'has_streaming_input': False, 'client_config': <botocore.config.Config object at 0x7f65f3853850>}, 'query_string': '', 'url_path': '/', 'method': u'POST'}\r\n2016-07-28 14:39:54,600 botocore.hooks [DEBUG] Event request-created.elasticmapreduce.RunJobFlow: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x7f65f3853750>>\r\n2016-07-28 14:39:54,601 botocore.auth [DEBUG] Calculating signature using v4 auth.\r\n2016-07-28 14:39:54,601 botocore.auth [DEBUG] CanonicalRequest:\r\nPOST\r\n/\r\n\r\n> content-type:application/x-amz-json-1.1\r\n> host:elasticmapreduce.us-east-1.amazonaws.com\r\n> x-amz-date:20160728T173954Z\r\n> x-amz-target:ElasticMapReduce.RunJobFlow\r\n> \r\n> content-type;host;x-amz-date;x-amz-target\r\n> 1d42b2a6d958b182ad021f7a4c7d7c68aab80972625ea6aa141a2addc4b930f2\r\n> 2016-07-28 14:39:54,602 botocore.auth [DEBUG] StringToSign:\r\n> AWS4-HMAC-SHA256\r\n> 20160728T173954Z\r\n> 20160728/us-east-1/elasticmapreduce/aws4_request\r\n> 09138741a75dff27a2da1ef5886940b75e981336f698d9475ff1f9cfe4c1a27c\r\n> 2016-07-28 14:39:54,602 botocore.auth [DEBUG] Signature:\r\n> 7cb6b7b28b0b6a366366189e1960cd06da8d434f76b3478ad24ab31e508b23ee\r\n> 2016-07-28 14:39:54,609 botocore.endpoint [DEBUG] Sending http request: <PreparedRequest [POST]>\r\n> 2016-07-28 14:39:54,609 botocore.vendored.requests.packages.urllib3.connectionpool [INFO] Starting new HTTPS connection (1): elasticmapreduce.us-east-1.amazonaws.com\r\n> 2016-07-28 14:39:55,909 botocore.vendored.requests.packages.urllib3.connectionpool [DEBUG] \"POST / HTTP/1.1\" 200 31\r\n> 2016-07-28 14:39:55,910 botocore.parsers [DEBUG] Response headers: {'x-amzn-requestid': '4c13b868-54ea-11e6-99f1-87f0a90a88a1', 'date': 'Thu, 28 Jul 2016 17:39:55 GMT', 'content-length': '31', 'content-type': 'application/x-amz-json-1.1'}\r\n> 2016-07-28 14:39:55,910 botocore.parsers [DEBUG] Response body:\r\n> {\"JobFlowId\":\"j-XXX\"}\r\n> 2016-07-28 14:39:55,911 botocore.hooks [DEBUG] Event needs-retry.elasticmapreduce.RunJobFlow: calling handler <botocore.retryhandler.RetryHandler object at 0x7f65f3908e50>\r\n> 2016-07-28 14:39:55,911 botocore.retryhandler [DEBUG] No retry needed.\r\n> {\"ResponseMetadata\": {\"HTTPStatusCode\": 200, \"RequestId\": \"4c13b868-54ea-11e6-99f1-87f0a90a88a1\", \"HTTPHeaders\": {\"x-amzn-requestid\": \"4c13b868-54ea-11e6-99f1-87f0a90a88a1\", \"date\": \"Thu, 28 Jul 2016 17:39:55 GMT\", \"content-length\": \"31\", \"content-type\": \"application/x-amz-json-1.1\"}}, \"JobFlowId\": \"j-XXX\"}\r\n> "}}
{"actor":{"display_login":"Pedroyev"}}