-
Notifications
You must be signed in to change notification settings - Fork 10
feat(test reports): test_report key functionality #634
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…nsitive information Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Codecov Report❌ Patch coverage is ❌ Your project check has failed because the head coverage (50.61%) is below the target coverage (90.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #634 +/- ##
==========================================
- Coverage 52.95% 50.61% -2.35%
==========================================
Files 124 127 +3
Lines 5342 5613 +271
==========================================
+ Hits 2829 2841 +12
- Misses 2300 2548 +248
- Partials 213 224 +11
🚀 New features to boost your workflow:
|
|
|
||
| // PollFileNames grabs test results and attachments from provided path within a container. | ||
| // This is a no-op for kubernetes. Pod environments cannot be dynamic. | ||
| func (c *client) PollFileNames(_ context.Context, ctn *pipeline.Container, paths []string) ([]string, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [golangci] reported by reviewdog 🐶
unused-parameter: parameter 'paths' seems to be unused, consider removing or renaming it as _ (revive)
|
|
||
| // PollFileContent captures the content and size of a file from the pipeline container. | ||
| // This is a no-op for kubernetes. Pod environments cannot be dynamic. | ||
| func (c *client) PollFileContent(_ context.Context, ctn *pipeline.Container, path string) (io.Reader, int64, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [golangci] reported by reviewdog 🐶
unused-parameter: parameter 'path' seems to be unused, consider removing or renaming it as _ (revive)
Overview
This branch wires the worker into the new test reports + object storage pipeline by:
test_reportkey.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 test reports
executor/linux/{build.go,stage.go,outputs.go,report.go,testattachments.go}executor/local/{build.go,stage.go}and related testsThese pieces:
test_reportkey, they:4. Runtime integration
runtime/docker/test_report.go(+test_report_test.go)runtime/engine.goruntime/kubernetes/container.goPollFileNamesas a no‑op for Kubernetes: test result 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 test‑report and storage APIs.