Erik Sipsma
bb09f3c032
Improve progress output for merge+diff ops.
...
Now, when a merge or diff ref is unlazied, the progress will show up
under the vertex for the merge/diff ref. Additionally, any ancestors of
the op that also need to be unlazied as part of unlazying the merge/diff
will show status updates under its vertex in the progress.
Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2022-02-08 11:26:05 -08:00
Tõnis Tiigi
edfc3f0d89
Merge pull request #2570 from alexcb/fix-git-clone-tag
...
Add support for annotated git tags
2022-01-29 10:14:23 -08:00
Alex Couture-Beil
9e1a9d24e8
Add support for git tags
...
This fixes errors such as:
error: cannot update ref 'refs/heads/v2.30.0': trying to write non-commit object 2d9685d47a7e516281aa093bf0cddc8aafa72448 to branch 'refs/heads/v2.30.0'
which occur when cloning a tag rather than branch.
Signed-off-by: Alex Couture-Beil <alex@earthly.dev>
2022-01-28 11:51:19 -08:00
Tonis Tiigi
ffce8218e3
keep buffer of logs to show on failure when regular logs are clipped
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-01-24 21:30:46 -08:00
Tonis Tiigi
28250bf74e
git: make fetch with keep-git-dir more deterministic
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-10-05 23:59:33 -07:00
CrazyMax
5fcc94454f
Generate and embed build sources
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-09-18 01:39:35 +02:00
CrazyMax
8bb242e7ac
Refactor url redacting util
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-09-14 17:39:07 +02:00
Erik Sipsma
a9f1980ebb
Refactor cache metadata interface.
...
There are a few goals with this refactor:
1. Remove external access to fields that no longer make sense and/or
won't make sense soon due to other potential changes. For example,
there can now be multiple blobs associated with a ref (for different
compression types), so the fact that you could access the "Blob"
field from the Info method on Ref incorrectly implied there was just
a single blob for the ref. This is on top of the fact that there is
no need for external access to blob digests.
2. Centralize use of cache metadata inside the cache package.
Previously, many parts of the code outside the cache package could
obtain the bolt storage item for any ref and read/write it directly.
This made it hard to understand what fields are used and when. Now,
the Metadata method has been removed from the Ref interface and
replaced with getters+setters for metadata fields we want to expose
outside the package, which makes it much easier to track and
understand. Similar changes have been made to the metadata search
interface.
3. Use a consistent getter+setter interface for metadata, replacing
the mix of interfaces like Metadata(), Size(), Info() and other
inconsistencies.
Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2021-08-25 19:15:09 +00:00
Morlay
18b49fd7dc
refactor to use util/bklog instead of using logurs directly
...
Signed-off-by: Morlay <morlay.null@gmail.com>
2021-07-13 11:42:31 +08:00
Tonis Tiigi
fb32dad95b
git: fix default branch detection
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-07-06 16:34:43 -07:00
Levi Harrison
ccc9f20895
Moved getDefaultBranch function to gitsource
...
It is my suspecion that the tests were failing on previous commits because of the lack of authentication and other stuff like that available in gitidentifier as compared to gitsource
Signed-off-by: Levi Harrison <levisamuelharrison@gmail.com>
2021-07-06 15:38:00 -07:00
Tonis Tiigi
3bdb6b5159
git: support subdir component
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-05-19 22:13:04 -07:00
Alex Couture-Beil
5d2fd7eb45
Redact credentials from URLs before returning errors
...
this is to prevent errors such as
failed to fetch remote https://user:password@github.com/user/private-repo-failure.git : exit status 128
from leaking the password; now it will be displayed like:
failed to fetch remote https://user:xxxxx@non-existant-host/user/private-repo.git : exit status 128
Signed-off-by: Alex Couture-Beil <alex@earthly.dev>
2021-04-28 10:39:15 -07:00
Pierre Fenoll
a471427331
Fix potential crash on nil value
...
Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com>
2021-04-15 15:01:02 +02:00
Tonis Tiigi
5bf64293f8
git: set token only for main remote access
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-02-19 00:25:35 -08:00
Alex Couture-Beil
985bd6e7fb
disable host key checking when none are given
...
Signed-off-by: Alex Couture-Beil <alex@earthly.dev>
2020-11-12 19:26:24 -08:00
Alex Couture-Beil
92e89a3374
Fixes related to the PR
...
- back out changes to changing the git url
- fix gid
- ignore global ssh config option when specifying known hosts
Signed-off-by: Alex Couture-Beil <alex@earthly.dev>
2020-11-12 17:32:29 -08:00
Alex Couture-Beil
486c5fd5c6
change ssh auth sock perms to 0700
...
Signed-off-by: Alex Couture-Beil <alex@earthly.dev>
2020-11-11 08:20:33 -08:00
Alex Couture-Beil
f2c8eb177c
Support cloning from non-standard git repos
...
- fixes assumption that ssh git clones must be via the `git` user.
- allows passing the SSH_AUTH_SOCK from the client to GitSource
- allows passing a known_host entry for ssh
Signed-off-by: Alex Couture-Beil <alex@earthly.dev>
2020-11-10 15:55:17 -08:00
Tonis Tiigi
e3b05289d8
add session injection to remote loading
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-11-02 22:20:44 -08:00
Sebastiaan van Stijn
fbe1346912
replace github.com/docker/docker/pkg/locker with moby/locker v1.0.1
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-30 09:25:05 +01:00
Erik Sipsma
55cbd19dec
Add support for lazily-pulled blobs in cache manager.
...
This allows the layers of images to only be pulled if/once they are actually
required.
Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2020-08-05 17:18:43 -07:00
Tonis Tiigi
2e9987ad16
session: track sessions with a group construct
...
Avoid hidden session passing and allow one session to drop when
multiple builds share a vertex.
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-05 00:15:25 -07:00
Tonis Tiigi
49de675234
git: support for token authentication
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-06-16 17:00:06 -07:00
Tonis Tiigi
37b8832d00
upgrade errors checks to Is()
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-18 22:53:38 -07:00
Vlad A. Ionescu
cd4a80c086
Add comment about the use of --force
...
Signed-off-by: Vlad A. Ionescu <vladaionescu@users.noreply.github.com>
2020-03-27 18:35:18 -07:00
Vlad A. Ionescu
4ce2075095
Add --force flag in git fetch command
...
Signed-off-by: Vlad A. Ionescu <vladaionescu@users.noreply.github.com>
2020-03-27 18:06:49 -07:00
Tonis Tiigi
f417bf2150
git: updates for keep git dir
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-08-14 13:28:42 -07:00
Tonis Tiigi
9f53ea3d78
userns support for sources and executor
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-02 18:26:04 -07:00
Akihiro Suda
26010a4864
decouple SessionManager from Worker
...
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2019-02-23 22:55:17 +09:00
Tonis Tiigi
e1c0729349
git: avoid leaking lock files on cancellation
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-01-22 14:04:54 -08:00
Akihiro Suda
a62e7cf1e0
worker/base: allow running without `git` installed
...
genuinetools/img#195
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-11-28 18:43:43 +09:00
John Howard
2de2c04c8e
Revendoring to move boltdb to bbolt
...
Signed-off-by: John Howard <jhoward@microsoft.com>
2018-09-18 11:18:08 -07:00
Tonis Tiigi
57b96a0ee5
cache: add record type field to usage record
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-26 22:54:39 -07:00
Tonis Tiigi
6ce604740f
vendor: replace locker pkg for legal
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-08 11:00:37 -07:00
Tonis Tiigi
6b23ab01ce
exec: make stdio debugging optional
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-05-25 11:15:32 -07:00
Tonis Tiigi
a2072e6a47
git: fix cachemap bug on sha identifier
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-05-14 09:53:34 -07:00
Tonis Tiigi
9c044db670
llbsolver: update pull for multiple cache keys
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-05-14 09:53:34 -07:00
Tonis Tiigi
641fdea51b
git: fix cancellation on blocking remotes
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-04-10 17:55:18 -07:00
Tonis Tiigi
6e40e83d35
Remove net/context dependencies
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-01-17 09:11:22 -08:00
Tonis Tiigi
367752bf1c
dockerfile: add test for building from git repo
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-12-17 21:09:20 -08:00
Tonis Tiigi
2ce418ae7b
git: fix checking out submodules
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-12-10 18:22:32 -08:00
Akihiro Suda
39b9dec52f
Merge pull request #87 from tonistiigi/snapshot-metadata
...
cache: add more metadata to snapshots
2017-07-27 09:36:10 +09:00
Tõnis Tiigi
5ecab5e142
Merge pull request #11 from dmcgowan/containerd-worker
...
Containerd worker
2017-07-26 14:36:51 -07:00
Tonis Tiigi
38ac00090c
cache: add more metadata values to snapshots
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-07-26 11:28:20 -07:00
Derek McGowan
9ce5053a8b
Update containerd version
...
Fix for logrus rename, use fork until fixed in moby.
Removed unused tar stream.
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-07-26 11:07:45 -07:00
Tonis Tiigi
93757aef7f
nested llb builds support
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-07-24 18:09:16 -07:00
Tonis Tiigi
8b09e89dbb
solver: avoid removing references required for future cache
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-07-20 17:05:37 -07:00
Tonis Tiigi
2ef0971822
cache: remove unused branches
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-07-19 19:02:58 -07:00
Tonis Tiigi
ff951eecd9
llb: add readonly mounts support
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-07-18 16:07:37 -07:00