Dissuade users from removing their .gitcookies manually.
Just to create a single UX path and prevent possible issues.
Bug: 408225524
Change-Id: Ief48806dccf759ead8d145424c854561e09d43ea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6440131
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Third time's the charm. The issue is still the "multi-valued boolean"
logic. I introduce a new "switched on" concept to clarify things.
If new auth is "switched off", then all new auth related things are
off. Simple enough.
There are two ways for new auth to be "switched on". Either it is
explicitly enabled in the user's config, or we rolled out the default
to on.
When it is "switched on", we still rely on the presence of .gitcookies
to determine whether we enable new auth for depot_tools. HOWEVER, we
must use the new git cl creds-check, because that is the intended way
for users to remove their .gitcookies file.
| auth logic | creds-check |
switched off | old | old |
switched on +cookies | old | new |
switched on -cookies | new | new |
Change-Id: I311089960d78d8be2cdffd00e4515bfebf0f8f58
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6439385
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
This reverts commit 2e9d2d7ebe.
Reason for revert: this is the possible culprit for b/408427309
Original change's description:
> [newauth] Enable by default
>
> Bug: 404613530
> Change-Id: If0a214fe074d7e7591b5d37417ca447525c983b6
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6418563
> Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
> Commit-Queue: Allen Li <ayatane@chromium.org>
Bug: 404613530, 408427309
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: Ib919b2f3d852709c0e80622b4ad97327ac2ea5bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6434729
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Ben Pastene <bpastene@chromium.org>
Reviewed-by: Scott Lee <ddoman@chromium.org>
Commit-Queue: Scott Lee <ddoman@chromium.org>
This will print a warning and disable new auth if .gitcookies file
exists.
This ensures we don't break bots once we default new auth on while
pushing human users away from .gitcookies.
Bug: b/404613530
Change-Id: Ia2d05bb7e5d2bf11e5605a26ef492954acbd9833
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6367723
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
Gated this behind new auth flag explicitly being set (so people who
haven't set anything = default off don't run this, just in case)
Bug: b/351024645
Change-Id: I8498b98404ad89d3ca390d3baa798daee0b4b53b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5698379
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
These checks will be needed in git_cl.py and probably other places.
Make it easy to change the default to opt-in as some point (and for
deletion later).
Bug: b/348024314
Change-Id: I768986e47ec2e86604268d74ca2b632458263bba
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5641084
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>