Commit Graph

751 Commits

Author SHA1 Message Date
Tim Hockin 139352ecee
Deref tags on ls-remote
A previous commit (2f7335868e) introduced
a quiet bug which results in the "update needed" condition triggering
every loop.  e2e passed for me by sheer luck of winning races.  Until it
didn't.  Walking thru with the debugger to figure it out, I realized
this issue.

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:18:34 -08:00
Tim Hockin f5057b7fa8
Log commands we run with original caller 2023-02-10 21:18:28 -08:00
Tim Hockin 8abd849e2c
Require --http-bind when using other http flags
Also use the word "set" for bool flags, rather than "specified" (easier
to read.
2023-02-10 21:18:21 -08:00
Tim Hockin bbd0f56d11
e2e: assert metrics in tests 2023-02-10 21:12:56 -08:00
Tim Hockin 14422f8bac
e2e: set MAXWAIT to change wait times 2023-02-10 16:05:52 -08:00
Tim Hockin 759b8ebdfe
e2e: print path to logs on failure 2023-02-10 15:45:55 -08:00
Tim Hockin 950e391018
e2e: set RUNS to repeat tests 2023-02-10 15:45:54 -08:00
Kubernetes Prow Robot 1253f82cd9
Merge pull request #670 from thockin/master
Fix e2e on v4
2023-02-10 02:13:29 -08:00
Kubernetes Prow Robot 4501732a72
Merge pull request #669 from thockin/v4-prom
v4: Update prometheus client (CVE)
2023-02-10 02:11:30 -08:00
Tim Hockin b3ee55446e
e2e: allow file:// repos (missing piece) 2023-02-06 17:51:04 -08:00
Tim Hockin 75ba836f80
e2e: fix test-tool image names 2023-02-06 17:51:03 -08:00
Tim Hockin 6e68266403
Update prometheus client
go get github.com/prometheus/client_golang@v1.14.0
go mod tidy
go mod vendor
2023-02-06 17:49:03 -08:00
Tim Hockin 3ce1ec617d Update README on master to point to v3 2023-01-25 10:17:22 -08:00
Kubernetes Prow Robot d9120f7a40
Merge pull request #656 from thockin/fix-back-to-back-rev-syncs
Fix cases of syncing different SHAs back to back
2023-01-08 02:43:27 -08:00
yoyehan 2f7335868e
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.
2022-12-25 14:02:12 -08:00
Kubernetes Prow Robot 503b9dae45
Merge pull request #653 from thockin/dockerfile-volume-cleanup
Update Dockerfile docs and default for volumes
2022-12-22 22:53:26 -08:00
Tim Hockin bbb58ad858
Update Dockerfile docs and default for volumes 2022-12-22 10:51:22 -08:00
Kubernetes Prow Robot a761413d81
Merge pull request #649 from thockin/e2e_fix_broken
e2e: fix 2 broken tests
2022-11-30 03:28:54 -08:00
Kubernetes Prow Robot e5de8a3a25
Merge pull request #647 from thockin/fix_git_submod_protocol_file
V4 e2e: fix git submodules for file://
2022-11-30 03:26:55 -08:00
Tim Hockin 59e2d9e97c
e2e: fix exechook_fail_retry
Previous e2e perf changes caused this to fail.
2022-11-24 17:50:03 -08:00
Tim Hockin 7f8aad23e6
e2e: fix sync_fetch_skip_depth_1
e2e: fix sync_fetch_skip_depth_1

The improvements in e2e perf broke this test case.  Make it more
explicit - this is not a success (triggering touch), but not really a
failure either.  Now it will not touch the touch-file.
2022-11-24 17:50:02 -08:00
Tim Hockin a492289ebf
e2e: fix git submodules for file://
I guess upstream git intentionally broke this because of a CVE.

Also fix wait_for_sync to actually exit early when possible.
2022-11-23 23:43:27 -08:00
Kubernetes Prow Robot 713d460bee
Merge pull request #643 from thockin/master
V4: Allow quoted keys for --git-config
2022-11-22 13:30:14 -08:00
Tim Hockin 8081a6e1c3
Allow quoted keys for --git-config
This allows keys to contain literal ':' which would previously confuse
the parser.
2022-11-19 17:28:06 -08:00
Tim Hockin a05f6c0745
Updated gofmt style 2022-11-19 16:32:41 -08:00
Kubernetes Prow Robot eaa5ed23d2
Merge pull request #640 from Juneezee/refactor/deprecate-ioutil
refactor: move from io/ioutil to io and os packages
2022-11-04 08:38:15 -07:00
Eng Zer Jun 91113aa314
refactor: move from io/ioutil to io and os packages
The io/ioutil package has been deprecated as of Go 1.16 [1]. This commit
replaces the existing io/ioutil functions with their new definitions in
io and os packages.

[1]: https://golang.org/doc/go1.16#ioutil
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-11-04 20:34:57 +08:00
Kubernetes Prow Robot bc5db09fe2
Merge pull request #639 from thockin/v4_touch_file
Add --touch-file flag and use it in tests
2022-10-31 07:18:43 -07:00
Kubernetes Prow Robot 7ca48f8f14
Merge pull request #638 from thockin/v4-print-exit-flags-before-logs
Do print-and-exit flags before logging
2022-10-31 07:16:45 -07:00
Tim Hockin bda1f84614
Add --touch-file flag and use it in tests
This is mostly designed to make testing easier instead of sleep.
2022-10-30 17:01:55 -07:00
Tim Hockin 428169b87e
Do print-and-exit flags before logging 2022-10-30 16:50:42 -07:00
Kubernetes Prow Robot 34c33c724a
Merge pull request #633 from thockin/use-makeAbsPath
use makeAbsPath for link
2022-09-11 08:49:23 -07:00
Kubernetes Prow Robot 2edd4e5d9e
Merge pull request #632 from thockin/error-file-abs-path
Make --error-file allow abs paths
2022-09-11 08:47:23 -07:00
Kubernetes Prow Robot 73267a77f8
Merge pull request #631 from thockin/sync_loop_full_sync
Change the sync loop to do a full sync
2022-09-11 08:35:25 -07:00
Kubernetes Prow Robot d0b7661c58
Merge pull request #630 from thockin/e2e_bad_branch
e2e: move err tests and add bad-branch
2022-09-11 07:45:23 -07:00
Tim Hockin 87cbd3a691
use makeAbsPath for link 2022-09-05 14:54:25 -07:00
Tim Hockin c32a042213
Make --error-file allow abs paths
This also enforces th previously unenforced "must not start with a
period" rule.
2022-09-05 14:54:10 -07:00
Tim Hockin 3bff6b3cf8
Change the sync loop to do a full sync
No longer distinguish the first sync from the rest. This will make later
changes easier.
2022-09-05 14:53:39 -07:00
Kubernetes Prow Robot 77edb67ecf
Merge pull request #627 from thockin/manual_text
Fix some of the manual help text
2022-09-04 05:42:35 -07:00
Tim Hockin f78dc35bf2
Fix some of the manual help text 2022-09-03 10:37:39 -07:00
Kubernetes Prow Robot cbf034f87b
Merge pull request #629 from thockin/silence_e2e_noise
e2e: Silence noise from git init
2022-09-03 03:16:27 -07:00
Kubernetes Prow Robot a3498fc8ee
Merge pull request #628 from thockin/disable_local_gitconfig
Disable local git configs
2022-09-03 03:14:27 -07:00
Kubernetes Prow Robot 734cc197cc
Merge pull request #626 from thockin/fix_typo
typo
2022-09-03 03:06:27 -07:00
Kubernetes Prow Robot 9faa5e5b69
Merge pull request #625 from thockin/bump_baseimage
Bump base image to 1.4.2
2022-09-03 03:04:27 -07:00
Tim Hockin fcb577b9fb
e2e: move err tests and add bad-branch 2022-09-02 13:45:43 -07:00
Tim Hockin 8e28337f3c
e2e: Silence noise from git init 2022-09-02 13:45:29 -07:00
Tim Hockin bcd4629159
Disable local git configs 2022-09-02 13:45:19 -07:00
Tim Hockin 21d331ca7d
typo 2022-09-02 13:45:04 -07:00
Tim Hockin f932a17dca
Bump base image to 1.4.2 2022-09-01 10:51:58 -07:00
Kubernetes Prow Robot e1774e223c
Merge pull request #613 from thockin/e2e-errexit-if
e2e: Allow N tests to fail and catch errexit
2022-08-31 06:01:01 -07:00