{"action":"closed","issue":{"url":"https://api.github.com/repos/boto/boto3/issues/1731","repository_url":"https://api.github.com/repos/boto/boto3","labels_url":"https://api.github.com/repos/boto/boto3/issues/1731/labels{/name}","comments_url":"https://api.github.com/repos/boto/boto3/issues/1731/comments","events_url":"https://api.github.com/repos/boto/boto3/issues/1731/events","html_url":"https://github.com/boto/boto3/issues/1731","id":368524097,"node_id":"MDU6SXNzdWUzNjg1MjQwOTc=","number":1731,"title":"head_object does not use the specified endpoint_url when adding (at least) PartNumber parameter","user":{"login":"xtero","id":7602791,"node_id":"MDQ6VXNlcjc2MDI3OTE=","avatar_url":"https://avatars0.githubusercontent.com/u/7602791?v=4","gravatar_id":"","url":"https://api.github.com/users/xtero","html_url":"https://github.com/xtero","followers_url":"https://api.github.com/users/xtero/followers","following_url":"https://api.github.com/users/xtero/following{/other_user}","gists_url":"https://api.github.com/users/xtero/gists{/gist_id}","starred_url":"https://api.github.com/users/xtero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xtero/subscriptions","organizations_url":"https://api.github.com/users/xtero/orgs","repos_url":"https://api.github.com/users/xtero/repos","events_url":"https://api.github.com/users/xtero/events{/privacy}","received_events_url":"https://api.github.com/users/xtero/received_events","type":"User","site_admin":false},"labels":[{"id":217065744,"node_id":"MDU6TGFiZWwyMTcwNjU3NDQ=","url":"https://api.github.com/repos/boto/boto3/labels/closing-soon-if-no-response","name":"closing-soon-if-no-response","color":"5319e7","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-10-10T07:15:26Z","updated_at":"2018-10-17T14:38:14Z","closed_at":"2018-10-17T14:38:14Z","author_association":"NONE","body":"Here is a sample of code to reproduce :\r\n```\r\nfeAccessKey=\"xxxxxxx\"\r\nfeSecretKey=\"xxxxxxx\"\r\nfeBucket=\"xxxxxxx\"\r\nfeKey=\"xxxxxxx\"\r\nfeEndpoint=\"https://oss.eu-west-0.prod-cloud-ocb.orange-business.com\"\r\nfeRegion=\"eu-west-0\"\r\ns3 = boto3.client('s3',\r\n        aws_access_key_id = feAccessKey,\r\n        aws_secret_access_key = feSecretKey,\r\n        region_name=feRegion,\r\n        endpoint_url=feEndpoint,\r\n        config=botocore.client.Config(signature_version='s3v4', retries = dict(max_attempts = 2)))\r\n\r\nres = s3.head_object( Bucket=feBucket, Key=feKey, PartNumber=1 );\r\n```\r\nAnd the stacktrace associated :\r\n```\r\nTraceback (most recent call last):\r\n  File \"test.py\", line 20, in <module>\r\n    res = s3.head_object( Bucket=feBucket, Key=feKey, PartNumber=1 );\r\n  File \"/usr/local/lib/python2.7/dist-packages/botocore/client.py\", line 320, in _api_call\r\n    return self._make_api_call(operation_name, kwargs)\r\n  File \"/usr/local/lib/python2.7/dist-packages/botocore/client.py\", line 610, in _make_api_call\r\n    operation_model, request_dict)\r\n  File \"/usr/local/lib/python2.7/dist-packages/botocore/endpoint.py\", line 102, in make_request\r\n    return self._send_request(request_dict, operation_model)\r\n  File \"/usr/local/lib/python2.7/dist-packages/botocore/endpoint.py\", line 136, in _send_request\r\n    success_response, exception):\r\n  File \"/usr/local/lib/python2.7/dist-packages/botocore/endpoint.py\", line 210, in _needs_retry\r\n    caught_exception=caught_exception, request_dict=request_dict)\r\n  File \"/usr/local/lib/python2.7/dist-packages/botocore/hooks.py\", line 356, in emit\r\n    return self._emitter.emit(aliased_event_name, **kwargs)\r\n  File \"/usr/local/lib/python2.7/dist-packages/botocore/hooks.py\", line 228, in emit\r\n    return self._emit(event_name, kwargs)\r\n  File \"/usr/local/lib/python2.7/dist-packages/botocore/hooks.py\", line 211, in _emit\r\n    response = handler(**kwargs)\r\n  File \"/usr/local/lib/python2.7/dist-packages/botocore/retryhandler.py\", line 183, in __call__\r\n    if self._checker(attempts, response, caught_exception):\r\n  File \"/usr/local/lib/python2.7/dist-packages/botocore/retryhandler.py\", line 251, in __call__\r\n    caught_exception)\r\n  File \"/usr/local/lib/python2.7/dist-packages/botocore/retryhandler.py\", line 277, in _should_retry\r\n    return self._checker(attempt_number, response, caught_exception)\r\n  File \"/usr/local/lib/python2.7/dist-packages/botocore/retryhandler.py\", line 317, in __call__\r\n    caught_exception)\r\n  File \"/usr/local/lib/python2.7/dist-packages/botocore/retryhandler.py\", line 223, in __call__\r\n    attempt_number, caught_exception)\r\n  File \"/usr/local/lib/python2.7/dist-packages/botocore/retryhandler.py\", line 359, in _check_caught_exception\r\n    raise caught_exception\r\nbotocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: \"https://s3.eu-west-0.amazonaws.com/xxxxxxxr?partNumber=1\"\r\n```\r\nAs you can see, the endpoint url is the DEFAULT_ENDPOINT, and not the one used in the definition of the client.\r\n\r\nBtw, when I don't precise any additional parameter, everything work well.\r\n\r\nHere are version of boto used :\r\nboto3 : 1.9.20\r\nbotocore: 1.12.20\r\ns3transfer: 0.1.13\r\nall installed with PIP on an Ubuntu 18.04, but I observed the same behaviour with on a CentOS7.3 with boto in versions:\r\nboto3: 1.7.84\r\nbotocore: 1.10.84\r\ns3transfer: 0.1.13"}}
{"actor":{"display_login":"xtero"}}