feat(artifacts): add support for artifacts key#672
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #672 +/- ##
==========================================
- Coverage 53.21% 51.95% -1.26%
==========================================
Files 124 125 +1
Lines 5420 5551 +131
==========================================
Hits 2884 2884
- Misses 2323 2453 +130
- Partials 213 214 +1
🚀 New features to boost your workflow:
|
…to feat_artifacts
…tract' into feat_artifacts
| // | ||
| //nolint:revive // ignore unexported type as it is intentional | ||
|
|
||
| func New(opts ...Opt) (*client, error) { |
There was a problem hiding this comment.
🚫 [golangci] reported by reviewdog 🐶
unexported-return: exported func New returns unexported type *linux.client, which can be annoying to use (revive)
| // | ||
| //nolint:revive // ignore unexported type as it is intentional | ||
|
|
||
| func New(opts ...Opt) (*client, error) { |
There was a problem hiding this comment.
🚫 [golangci] reported by reviewdog 🐶
unexported-return: exported func New returns unexported type *local.client, which can be annoying to use (revive)
| // | ||
| //nolint:revive // ignore unexported type as it is intentional | ||
|
|
||
| func New() (*mock, error) { |
There was a problem hiding this comment.
🚫 [golangci] reported by reviewdog 🐶
unexported-return: exported func New returns unexported type *docker.mock, which can be annoying to use (revive)
| // | ||
| //nolint:revive // ignore returning unexported client | ||
|
|
||
| func New(opts ...ClientOpt) (*client, error) { |
There was a problem hiding this comment.
🚫 [golangci] reported by reviewdog 🐶
unexported-return: exported func New returns unexported type *docker.client, which can be annoying to use (revive)
| // | ||
| //nolint:revive // ignore returning unexported client | ||
|
|
||
| func NewMock(opts ...ClientOpt) (*client, error) { |
There was a problem hiding this comment.
🚫 [golangci] reported by reviewdog 🐶
unexported-return: exported func NewMock returns unexported type *docker.client, which can be annoying to use (revive)
| // | ||
| //nolint:revive // ignore returning unexported client | ||
|
|
||
| func New(opts ...ClientOpt) (*client, error) { |
There was a problem hiding this comment.
🚫 [golangci] reported by reviewdog 🐶
unexported-return: exported func New returns unexported type *kubernetes.client, which can be annoying to use (revive)
| // | ||
| //nolint:revive // ignore returning unexported client | ||
|
|
||
| func NewMock(_pod *v1.Pod, opts ...ClientOpt) (*client, error) { |
There was a problem hiding this comment.
🚫 [golangci] reported by reviewdog 🐶
unexported-return: exported func NewMock returns unexported type *kubernetes.client, which can be annoying to use (revive)
Overview
This branch wires the worker into the new artifacts + object storage pipeline by:
artifactskey.Architecture
1. Worker config + storage hookup
cmd/vela-worker/flags.go,run.go,worker.gostorage.Setup.Workergains fields forStorage *storage.Setup(config) andStorage storage.Storage(runtime client).cmd/vela-worker/operate.goVelaClient.Storage.GetInfo()to fetch storage configuration from the server.storage.New(...).w.Storageand logs driver/bucket/endpoint.w.Storage = nil.2. Executor setup (linux/local)
executor.Setupnow includes aStorage storage.Storagefield.cmd/vela-worker/exec.gow.Storagewas successfully initialized, it is passed into the executor setup.executor.Setupstruct instead of an inline literal.executor/executor_test.goStoragefield inexecutor.Setup.3. Linux / local executor behavior for artifacts
executor/linux/{build.go,stage.go,outputs.go,report.go,artifacts.go}executor/local/{build.go,stage.go}and related testsThese pieces:
artifactskey, they:4. Runtime integration
runtime/docker/artifacts.go(+artifacts_test.go)runtime/engine.goruntime/kubernetes/container.goPollFileNamesas a no‑op for Kubernetes: artifacts file polling is not supported for dynamic pod environments yet.5. Step skipping, middleware, and wiring
internal/step/skip.go(+ tests)router/middleware/executor/executor_test.goStoragefield inexecutor.Setup.6. Dependencies
go.mod,go.sumsdk-go, server storage packages, and Docker) to versions that include the new artifacts and storage APIs.