Commit Graph

572 Commits

Author SHA1 Message Date
Kubernetes Prow Robot 2a297335f3
Merge pull request #782 from thockin/release-3.x
Handle errors from credential refresh (v3)
2023-07-28 13:01:43 -07:00
Karl Isenberg 93b8a38a92
Handle errors from credential refresh (v3)
Previously, errors from askpass and credential storage were being
ignored, causing git clone/fetch to later error with hard-to-read
errors.

Now the error indicates the credential refresh as the problem, and
either does not try to sync (if no creds) or tries to use previous creds
(if they were fetched at some point).
2023-07-28 12:58:16 -07:00
Tim Hockin dec45c3caa Don't block on hooks when already synced + one-time 2023-06-29 12:03:39 -07:00
Kubernetes Prow Robot a497b98c76
Merge pull request #732 from nan-yu/release-3.x
Update to go 1.20
2023-05-05 13:19:01 -07:00
Nan Yu 97cb402b34 Update to go 1.20 2023-05-05 17:19:30 +00:00
Kubernetes Prow Robot 880eb4fcd0
Merge pull request #726 from nan-yu/release-3.x
Update to golang 1.19 for vulnerability fixes
2023-05-04 17:45:13 -07:00
Nan Yu a88ac695e9 Update to golang 1.19 for vulnerability fixes
CVE-2023-24538
CVE-2022-41723
CVE-2022-41724
CVE-2022-41725
CVE-2023-24536
CVE-2023-24534
CVE-2023-24537
CVE-2023-24532
2023-05-04 20:06:31 +00:00
Kubernetes Prow Robot e1a98273f6
Merge pull request #700 from thockin/release-3.x
V3: prevent git's 'dubious ownership' error
2023-03-17 16:09:15 -07:00
Tim Hockin 9241b1061f
Exercise the git "dubious ownership" path
To do this, we run the e2e test as a different user.  To do that, we
need git-sync to make sure that everything is group accessible.  To
clean up after the test, we need everything to be group writable.  To do
that, we add a new flag: `--group-write`.
2023-03-17 15:51:25 -07:00
Tim Hockin c1564ce083
V3: prevent git's 'dubious ownership' error 2023-03-16 22:54:01 -07:00
Kubernetes Prow Robot d457decbdd
Merge pull request #672 from thockin/v3_deref_tags
v3: Fix cases of syncing different SHAs back to back
2023-02-14 13:31:52 -08:00
Kubernetes Prow Robot 05a43a5fd4
Merge pull request #671 from thockin/v3_log_command_depth
v3: Log commands we run with original caller
2023-02-11 00:59:30 -08:00
Tim Hockin 3eb34e058c
Fix cases of syncing different SHAs back to back
Prior to this, it would fail if the 2nd SHA wasn't in the local repo.
Now it doesn't care what the local SHA for rev is, it only cares what is
checked out at HEAD.

Also deref tags on ls-remote

The short story: `ls-remote` for a tag gets us the SHA of the tag, but
`rev-parse HEAD` gets us the SHA of the commit to which that tag is
attached.  Those are never equal, so we detect "update needed" every
loop.

Now we ask `ls-remote` for the rev and the dereferenced rev.  If that
rev is a branch, the deref does nothing.  If that rev is a tag it
produces both results.  ls-remote does its own sort, so the deref (if
found) comes after the non-deref.  This means that, in both cases, the
last line is the one we want.
2023-02-10 21:07:03 -08:00
Tim Hockin 2f1720cdaf
Log commands we run with original caller 2023-02-10 14:59:45 -08:00
Kubernetes Prow Robot 39ab896a08
Merge pull request #668 from thockin/v3-prom
v3: Update prometheus client (CVE)
2023-02-06 22:08:57 -08:00
Kubernetes Prow Robot 42dc6c3206
Merge pull request #667 from thockin/release-3.x
Fix e2e on 3.x
2023-02-06 22:06:58 -08:00
Tim Hockin 56b6ef1e7b
Update prometheus client
go get github.com/prometheus/client_golang@v1.14.0
go mod tidy
go mod vendor
2023-02-06 17:50:47 -08:00
Tim Hockin c5ec0558be
e2e: allow file:// repos (missing piece) 2023-02-06 17:40:14 -08:00
Tim Hockin 7a284454ea
e2e: fix test-tool image names 2023-02-06 17:39:36 -08:00
Kubernetes Prow Robot bfad1e047f
Merge pull request #648 from thockin/release-3.x
V3 e2e: fix git submodules for file://
2022-11-30 03:26:55 -08:00
Tim Hockin e712435cf0
e2e: fix git submodules for file://
I guess upstream git intentionally broke this because of a CVE.

Also fix tag tests to pass -m
2022-11-23 23:56:50 -08:00
Kubernetes Prow Robot 482bf07d57
Merge pull request #642 from thockin/release-3.x
V3: Allow quoted keys for --git-config
2022-11-22 13:30:14 -08:00
Tim Hockin 25295dd0de
Allow quoted keys for --git-config
This allows keys to contain literal ':' which would previously confuse
the parser.
2022-11-19 13:50:34 -08:00
Tim Hockin b07dba4026 Bump base image to 1.4.2 2022-08-24 19:35:45 -07:00
Kubernetes Prow Robot 025a1c0e39
Merge pull request #585 from thockin/v3_known_hosts_not_dev_null
v3: Don't set known_hosts to /dev/null
2022-07-14 10:16:57 -07:00
Tim Hockin e0b39d2250 Don't set known_hosts to /dev/null
This causes git to log, repeatedly, that it is "adding to known hosts".
2022-07-14 10:11:10 -07:00
Kubernetes Prow Robot d01fc42dce
Merge pull request #583 from thockin/v3_cred_helper_cache
v3: Change from "store" to "cache" for credentials
2022-07-14 10:10:59 -07:00
Tim Hockin 395b29dbf4 Change from "store" to "cache" for credentials
This means they need to be refreshed every so often, so we'll just do it
every sync loop.
2022-07-14 10:07:58 -07:00
Kubernetes Prow Robot 2fdab7789a
Merge pull request #581 from thockin/v3_log_creds_md5
v3: log.V(9) md5sums of credentials
2022-07-14 10:04:57 -07:00
Tim Hockin 28232b584a log.V(9) md5sums of credentials 2022-07-14 09:53:09 -07:00
Kubernetes Prow Robot 023985958c
Merge pull request #579 from thockin/v3_logging_cleanup
v3: Logging and error handling cleanup
2022-07-14 09:50:57 -07:00
Tim Hockin a5905288c4 logging cleanup 2022-07-14 08:29:33 -07:00
Kubernetes Prow Robot 9fb74bf62e
Merge pull request #577 from thockin/v3_simpler_credential_init
v3: Clean up credential init
2022-07-14 03:42:57 -07:00
Kubernetes Prow Robot f8a94697a3
Merge pull request #575 from thockin/v3_e2e_password_not_one_time
v3: e2e: Make password test not use --one-time
2022-07-07 23:33:49 -07:00
Tim Hockin a514b55da9 Clean up credential init
Set the credential.helper early and just once.
2022-07-07 08:50:40 -07:00
Kubernetes Prow Robot 97b22dd214
Merge pull request #573 from thockin/v3_no_XDG_CONFIG_HOME
v3: e2e: don't set XDG_CONFIG_HOME
2022-07-07 05:19:35 -07:00
Kubernetes Prow Robot 7f8cfa7746
Merge pull request #571 from thockin/v3_askpass_helper_simpler
v3: Clean up askpass_URL
2022-07-07 05:05:35 -07:00
Kubernetes Prow Robot 25b93107c5
Merge pull request #569 from thockin/v3_e2e_CLEANUP_docker_rm
v3: e2e: $CLEANUP decides whether to rm containers
2022-07-07 04:45:35 -07:00
Tim Hockin 506314904a e2e: Fix ncsvr to wait for input on HTTP
This caused occasional e2e flakes when the server responded before the
client request had been sent.
2022-07-06 12:22:21 -07:00
Kubernetes Prow Robot c2d0a9d900
Merge pull request #589 from Liujingfang1/patch-1
Fix CVE-2022-2068
2022-07-06 11:53:34 -07:00
Jingfang Liu 8c1630a774
Fix CVE-2022-2068 2022-07-06 11:49:56 -07:00
Kubernetes Prow Robot 1f6d24f0f7
Merge pull request #565 from thockin/v3_makefile_dbg
v3: Bring some Makefile cleanups from k/k
2022-07-04 01:59:24 -07:00
Tim Hockin 4b75fbce48 e2e: don't set XDG_CONFIG_HOME 2022-07-03 16:52:55 -07:00
Tim Hockin 518b0d9baf Bring some Makefile cleanups from k/k 2022-07-03 16:51:20 -07:00
Kubernetes Prow Robot d4b880c6b6
Merge pull request #563 from thockin/v3_e2e_rebuild_less
v3: e2e: rebuild the container less often
2022-07-03 14:31:22 -07:00
Kubernetes Prow Robot d87f4d9e05
Merge pull request #551 from thockin/v3-e2e_names
V3: Rename e2e tests for easier partial runs
2022-07-03 11:59:24 -07:00
Tim Hockin 7763f7c115 e2e: Make password test not use --one-time 2022-07-03 11:27:03 -07:00
Tim Hockin 81c8b2f39e Clean up askpass_URL
* Tighten git e2e shim
  - exit on errors'
  - simpler
  - don't set XDG_CONFIG_HOME

* Reword help strings and logs
2022-07-03 11:25:47 -07:00
Tim Hockin 6d5902196a e2e: $CLEANUP decides whether to rm containers 2022-07-03 11:25:14 -07:00
Tim Hockin 28951b5b2f Don't run apt-get in e2e build if we can avoid 2022-07-03 11:16:34 -07:00