New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 891505 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Last visit > 30 days ago
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 1
Type: Bug



Sign in to add a comment

git cl upload error: setproxy() takes at most 7 arguments (8 given)

Project Member Reported by mrunal.k...@intel.com, Oct 2

Issue description

With latest changes to depot_tools I am seeing following error whenever I run git cl upload,

~/cr/src $ git cl upload
Traceback (most recent call last):
  File "/home/mrunal/depot_tools/metrics.py", line 225, in print_notice_and_exit
    yield
  File "/home/mrunal/depot_tools/git_cl.py", line 6110, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/home/mrunal/depot_tools/git_cl.py", line 6092, in main
    return dispatcher.execute(OptionParser(), argv)
  File "/home/mrunal/depot_tools/subcommand.py", line 252, in execute
    return command(parser, args[1:])
  File "/home/mrunal/depot_tools/git_cl.py", line 5086, in CMDupload
    return cl.CMDUpload(options, args, orig_args)
  File "/home/mrunal/depot_tools/git_cl.py", line 1529, in CMDUpload
    self._codereview_impl.EnsureAuthenticated(force=options.force)
  File "/home/mrunal/depot_tools/git_cl.py", line 2407, in EnsureAuthenticated
    if gerrit_util.GceAuthenticator.is_gce():
  File "/home/mrunal/depot_tools/gerrit_util.py", line 259, in is_gce
    cls._cache_is_gce = cls._test_is_gce()
  File "/home/mrunal/depot_tools/gerrit_util.py", line 266, in _test_is_gce
    resp, _ = cls._get(cls._INFO_URL)
  File "/home/mrunal/depot_tools/gerrit_util.py", line 279, in _get
    resp, contents = c.request(url, 'GET', **kwargs)
  File "/home/mrunal/depot_tools/third_party/httplib2/__init__.py", line 1694, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/home/mrunal/depot_tools/third_party/httplib2/__init__.py", line 1434, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/home/mrunal/depot_tools/third_party/httplib2/__init__.py", line 1354, in _conn_request
    conn.connect()
  File "/home/mrunal/depot_tools/third_party/httplib2/__init__.py", line 961, in connect
    self.sock.setproxy(proxy_type, proxy_host, proxy_port, proxy_rdns, proxy_user, proxy_pass, proxy_headers)
TypeError: setproxy() takes at most 7 arguments (8 given)

It was definitely caused by latest changes to ___init__.py made here,
https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1173064

So far workaround is to remove the last parameter, "proxy_headers" and that seems to fix the issue for me. I have Ubuntu 14.04 and we indeed work behind proxies.
 
Owner: rrangel@chromium.org
Status: Assigned (was: Untriaged)
If you want to revert the CL I won't complain.
Cc: iannu...@google.com
Cc: -iannucci@chromium.org
Components: -Infra>Git>Admin
Project Member

Comment 7 by bugdroid1@chromium.org, Dec 12

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/tools/depot_tools/+/3d7ef65eef5b7b61a053c666425f72e24684f6e2

commit 3d7ef65eef5b7b61a053c666425f72e24684f6e2
Author: Mrunal Kapade <mrunal.kapade@intel.com>
Date: Wed Dec 12 20:57:22 2018

Revert "httplib: Update to 0.11.3"

This reverts commit dd0c341bd25158f0aba8108d738767308b5fbbee.
As it seems to be breaking the "git cl upload". Reverting the change
as per suggestion from original author.

BUG=891505

Change-Id: Ica3f9aaa78d33cee6935ffcff789417ce098905e
Reviewed-on: https://chromium-review.googlesource.com/c/1260043
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Mrunal Kapade <mrunal.kapade@intel.com>

[modify] https://crrev.com/3d7ef65eef5b7b61a053c666425f72e24684f6e2/third_party/httplib2/socks.py
[modify] https://crrev.com/3d7ef65eef5b7b61a053c666425f72e24684f6e2/third_party/httplib2/__init__.py
[modify] https://crrev.com/3d7ef65eef5b7b61a053c666425f72e24684f6e2/third_party/httplib2/README.chromium
[modify] https://crrev.com/3d7ef65eef5b7b61a053c666425f72e24684f6e2/third_party/httplib2/cacerts.txt

Project Member

Comment 8 by bugdroid1@chromium.org, Dec 12

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e0d3565780e2ee6a9706fdccc5e920864a4e2550

commit e0d3565780e2ee6a9706fdccc5e920864a4e2550
Author: chromium-autoroll <chromium-autoroll@skia-public.iam.gserviceaccount.com>
Date: Wed Dec 12 23:59:33 2018

Roll src/third_party/depot_tools e76041196062..3d7ef65eef5b (1 commits)

https://chromium.googlesource.com/chromium/tools/depot_tools.git/+log/e76041196062..3d7ef65eef5b


git log e76041196062..3d7ef65eef5b --date=short --no-merges --format='%ad %ae %s'
2018-12-12 mrunal.kapade@intel.com Revert "httplib: Update to 0.11.3"


Created with:
  gclient setdep -r src/third_party/depot_tools@3d7ef65eef5b

The AutoRoll server is located here: https://autoroll.skia.org/r/depot-tools-chromium-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.



BUG=chromium:891505
TBR=agable@chromium.org

Change-Id: Id8af6e42142d9afa2799ec48d998ee28b020304b
Reviewed-on: https://chromium-review.googlesource.com/c/1374532
Reviewed-by: chromium-autoroll <chromium-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: chromium-autoroll <chromium-autoroll@skia-public.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#616115}
[modify] https://crrev.com/e0d3565780e2ee6a9706fdccc5e920864a4e2550/DEPS

Comment 9 Deleted

I've started receiving "git cl upload" errors probably just after your change... Could you check it please or comment if this can be related?

https://bugs.chromium.org/p/chromium/issues/detail?id=914564
After opening the link to your issue I get an error that "You do not have permission to view the requested page." Can you elaborate more on what error you are seeing at your end?
[I unrestricted the bug, you should be able to see it now. It seems likely to be related.]
Since this "Revert "httplib: Update to 0.11.3" change, I can't upload CLs anymore to codereview, git cl upload fails always with a SSL: CERTIFICATE_VERIFY_FAILED error with the following trace, matching the one mentioned in crbug.com/914564:

    $ git cl upload && git cl try
    Traceback (most recent call last):
      File "/home/mario/work/chromium/depot_tools/metrics.py", line 262, in print_notice_and_exit
        yield
      File "/home/mario/work/chromium/depot_tools/git_cl.py", line 5538, in <module>
        sys.exit(main(sys.argv[1:]))
      File "/home/mario/work/chromium/depot_tools/git_cl.py", line 5520, in main
        return dispatcher.execute(OptionParser(), argv)
      File "/home/mario/work/chromium/depot_tools/subcommand.py", line 252, in execute
        return command(parser, args[1:])
      File "/home/mario/work/chromium/depot_tools/git_cl.py", line 4545, in CMDupload
        return cl.CMDUpload(options, args, orig_args)
      File "/home/mario/work/chromium/depot_tools/git_cl.py", line 1562, in CMDUpload
        self._codereview_impl.EnsureCanUploadPatchset(force=options.force)
      File "/home/mario/work/chromium/depot_tools/git_cl.py", line 1982, in EnsureCanUploadPatchset
        ['DETAILED_ACCOUNTS', 'CURRENT_REVISION', 'CURRENT_COMMIT', 'LABELS'])
      File "/home/mario/work/chromium/depot_tools/git_cl.py", line 2223, in _GetChangeDetail
        self._GetGerritHost(), self._GerritChangeIdentifier(), options)
      File "/home/mario/work/chromium/depot_tools/gerrit_util.py", line 649, in GetChangeDetail
        return ReadHttpJsonResponse(CreateHttpConn(host, path))
      File "/home/mario/work/chromium/depot_tools/gerrit_util.py", line 483, in ReadHttpJsonResponse
        fh = ReadHttpResponse(conn, accept_statuses)
      File "/home/mario/work/chromium/depot_tools/gerrit_util.py", line 415, in ReadHttpResponse
        response, contents = conn.request(**conn.req_params)
      File "/home/mario/work/chromium/depot_tools/third_party/httplib2/__init__.py", line 1609, in request
        (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
      File "/home/mario/work/chromium/depot_tools/third_party/httplib2/__init__.py", line 1351, in _request
        (response, content) = self._conn_request(conn, request_uri, method, body, headers)
      File "/home/mario/work/chromium/depot_tools/third_party/httplib2/__init__.py", line 1272, in _conn_request
        conn.connect()
      File "/home/mario/work/chromium/depot_tools/third_party/httplib2/__init__.py", line 1059, in connect
        raise SSLHandshakeError(e)
    SSLHandshakeError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:727)


I did bisect the changes in depot tools and found out that reverting that patch lets me work again
@mario, @marcin, what version of Linux are you using? I am still on Ubuntu 14.04 and I work behind proxies. My change/revert is ofcourse temporary as it was breaking git cl upload for me. Eventually httplib will have to be updated to latest but the change has to be backward compatible and should be able to handle proxies.
@mrunal I'm on Ubuntu 18.10 (Cosmic Cuttlefish) with httplib 0.11.3-1
Labels: -Pri-2 Pri-1
There is seven days since broken update and it's not reverted!

Please note, that update was changing one big/major version to another. I suspect, that we have also other potential regressions.

can we do it something with this please ? This is going to be annoyed.

Increasing to Pri 1, but it should be 0.

Comment 17 Deleted

Cc: ajp@chromium.org
Components: Infra>Git
I believe this library is mostly (only?) used by git_cl.py, so adding the Infra>Git component.

What versions of python are folks using here?
I have Python 2.7.6.
I have just hit the very same issue.

Debian Testing (buster) here with httplib 0.11.3-1 and Python 2.7.15+.
@rego, What issue. There are two issues people are seeing.
@mrunal.kapade, did you have any local changes? https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1173064 Looking at the patch and your stack trace it looks like the core is passing the correct number of arguments.
In my case I'm seeing the error:
SSLHandshakeError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:727)

Maybe I should report that in bug #914564 instead of in this one.

Comment 24 by ajp@chromium.org, Jan 18 (4 days ago)

Haven't seen any comments on this bug in a while... are people still having issues with git cl upload? Unfortunately it seems like there were problems with either state (rolled back or not) for some subset of people when first reported. But everyone's been quiet for a while so I wonder if this is still an issue.

Sign in to add a comment