-
Notifications
You must be signed in to change notification settings - Fork 30
feat(artifacts): Object storage integration and artifacts key #1385
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
Open
KellyMerrick
wants to merge
195
commits into
main
Choose a base branch
from
feat_artifacts
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* refactor(pipeline): use server API types for pipeline and migrate compiler types * gci * feat: add sender rule for pipelines --------- Co-authored-by: David May <[email protected]>
* chore(lint): address existing linter issues * remove dupl from exclusion list
* enhance(build): add fork field for OIDC * fix test * integration test update
* enhance(yaml): allow for users to parse pipelines using old library * testing file for internal yaml * chore(compiler): convert unmarshaled buildkite to go-yaml * remove tests used in later PRs * lintfix * fix schema * gci
…1230) Co-authored-by: David May <[email protected]>
Co-authored-by: david may <[email protected]>
* init commit * feat(repo): add pending approval timeout * fix test * remove dead code --------- Co-authored-by: David May <[email protected]>
…r have dupl anchors in map (#1232)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Codecov Report❌ Patch coverage is
❌ Your project check has failed because the head coverage (57.80%) 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 #1385 +/- ##
==========================================
- Coverage 58.36% 57.80% -0.56%
==========================================
Files 645 688 +43
Lines 24864 25779 +915
==========================================
+ Hits 14511 14901 +390
- Misses 9681 10186 +505
- Partials 672 692 +20
🚀 New features to boost your workflow:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previous branch with discussions: #1294
Overview
artifactskey on steps.High‑Level Architecture
1. Storage subsystem
Packages & files (high level)
storage/context.go,setup.go,service.go,storage.go(+ tests)flags.go(+ tests) for CLI/env configurationstorage/minio/create_bucket.go,bucket_exists.go,list_bucket.go,get_bucket.goupload.go,list_objects.go,stat_object.go,presigned_get_object.goopts.go,storage_enable.go,minio.gotest_data/create_bucket.json,test_data/test.xmlconstants/driver.go,constants/filetypes.go,constants/table.goDesign
storage/service.go/storage/storage.go), following the sameService + Setup + Contextpattern as other Vela subsystems.storage/minio/.storage/flags.goandstorage/setup.go.storage-enableflag and a storage client into the Gin context.2. Artifact data model
Database layer
database/artifact/package:create.go,get.go,get_build.go,list.go,list_build.go,count.go,update.go,delete.go,index.go,opts.go,table.go*_test.go).database/types/:artifact.godatabase/database.go,database/interface.go, anddatabase/resource.goupdated to:database/testutils/api_resources.goupdated to provide helpers for the new resource.Conceptually
3. API + routing surface
API packages
api/admin/storage.go: admin handlers for bucket creation and presigned URLs for objects.api/storage/doc.go+api/storage/storage.go: public storage handlers (e.g., storage info / health).api/artifact/create.goapi/artifact/get.goapi/artifact/list.goapi/types/artifact.goapi/types/storage.goapi/types/storage_info.goapi/types/pipeline.go/ tests to incorporate the artifact‑related shape.Router & middleware
router/storage.go— routes for storage info and/or admin integration.router/artifact.go— routes for artifact create/list/get.router/admin.go— wires the new admin storage operations.router/build.go— extended to add build‑scoped artifact routes.router/middleware/storage.go(+ tests): constructs the storage service, setsstorage-enable, and injects it into Gin.router/middleware/artifact/context.go,artifact/artifact.go: helpers for binding artifact resources to requests.Swagger / HTTP endpoints
PUT /api/v1/admin/storage/bucket— create a bucket.GET /api/v1/admin/storage/presign— generate a presigned URL for a given bucket + object.artifacts(see router + API handlers).4. Compiler & pipeline types
compiler/types/pipeline/artifact.go(+ tests) andcompiler/types/yaml/artifacts.go:compiler/types/pipeline/container.go,compiler/types/yaml/step.go,compiler/types/yaml/step_test.go:artifactsconfiguration.compiler/native/validate.go(+ tests):artifactskey usage in the pipeline YAML.This sets up the server side so that pipelines can emit artifact metadata that is persisted and linked to stored objects in the configured bucket.
5. Configuration & local dev
cmd/vela-server/main.go,metadata.go,server.go:storage/flags.go,storage/setup.go:storage.Serviceand register it with the router via middleware.docker-compose.ymlandnginx.conf:miniois reachable from the server and UI.DOCS.md:minioto/etc/hosts) and reference storage + artifacts in the setup flow.Testing
storage/minio/*_test.go).storage/context_test.go,storage/setup_test.go,storage/storage_test.go,storage/flags_test.go).database/artifact/*_test.go).database/resource_test.go).mock/server/artifact.goadded to support API tests.Example