Skip to content

feat(test reports): storage addition #1271

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

Draft
wants to merge 100 commits into
base: main
Choose a base branch
from

Conversation

timhuynh94
Copy link
Contributor

@timhuynh94 timhuynh94 commented Mar 12, 2025

This PR introduces a new feature for the Vela server that adds test report storage capabilities. The setup of S3 compatible storage follows the current structure of queue and scm setup.

  • Feature flag for enable/disable storage.
  • Admins storage endpoints
    • PUT /api/v1/admin/storage/bucket admin CreateBucket (require Admin token)
    • GET /api/v1/admin/storage/presign admin GetPresignedURL (require Admin token)
      • Currently will give back an URL but won't work due to proxy issue with local setup (docker)
  • Storage endpoints
    • POST /api/v1/storage/info storage StorageInfo (requires Worker Registration token)
    • GET /api/v1/storage/{bucket}/objects storage ListObjects

TimHuynh and others added 30 commits December 12, 2024 09:41
* 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
* init commit

* feat(repo): add pending approval timeout

* fix test

* remove dead code

---------

Co-authored-by: David May <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@timhuynh94
Copy link
Contributor Author

This PR introduces a new feature for the Vela server that adds test report storage capabilities. The setup of S3 compatible storage follows the current structure of queue and scm setup.

  • Feature flag for enable/disable storage.

  • Admins storage endpoints

    • PUT /api/v1/admin/storage/bucket admin CreateBucket (require Admin token)

    • GET /api/v1/admin/storage/presign admin GetPresignedURL (require Admin token)

      • Currently will give back an URL of minio:9000/ but changing to minio:9002/ will display object content (docker)
  • Storage endpoints

    • POST /api/v1/storage/info storage StorageInfo (requires Worker Registration token)
    • GET /api/v1/storage/{bucket}/objects storage ListObjects

import (
"context"
"fmt"
"github.com/urfave/cli/v3"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
File is not properly formatted (gci)

@@ -59,6 +59,7 @@ func New(ctx context.Context, address, token string) (*Client, error) {
// overwrite the github client
c.githubClient = gitClient

//nolint:revive // ignore returning unexported engine
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
directive //nolint:revive // ignore returning unexported engine is unused for linter "revive" (nolintlint)

@@ -77,5 +77,6 @@
return nil, fmt.Errorf("unable to create indexes for %s table: %w", constants.TableHook, err)
}

//nolint:revive // ignore returning unexported engine

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
directive //nolint:revive // ignore returning unexported engine is unused for linter "revive" (nolintlint)

@@ -77,5 +77,6 @@ func New(opts ...EngineOpt) (*Engine, error) {
return nil, fmt.Errorf("unable to create indexes for %s table: %w", constants.TableRepo, err)
}

//nolint:revive // ignore returning unexported engine

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
directive //nolint:revive // ignore returning unexported engine is unused for linter "revive" (nolintlint)

)

// FromCLICommand helper function to setup Minio Client from the CLI arguments.
func FromCLICommand(ctx context.Context, c *cli.Command) (Storage, error) {

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 'ctx' seems to be unused, consider removing or renaming it as _ (revive)

@KellyMerrick KellyMerrick marked this pull request as draft April 14, 2025 18:57
@KellyMerrick KellyMerrick changed the title feat(server): test report storage addition feat(test reports): storage addition Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants