Skip to content

feat(test reports): development branch #1294

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 140 commits into
base: main
Choose a base branch
from
Draft

Conversation

timhuynh94
Copy link
Contributor

@timhuynh94 timhuynh94 commented Apr 9, 2025

This branch is the combined working branch for development purposes, but will be closed in lieu of separate pr's (currently in draft) when ready, to allow for smaller pr's:

  • storage addition
  • test_report key functionality
  • database functionality

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>
@@ -0,0 +1,54 @@
package pipeline

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
Missed header for check (goheader)

@@ -0,0 +1,29 @@
package pipeline

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
Missed header for check (goheader)

//
// swagger:model PipelineTestReport
TestReport struct {
Results []string `yaml:"results,omitempty" json:"results,omitempty"`

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
tag is not aligned, should be: yaml:"results,omitempty" json:"results,omitempty" (tagalign)

@KellyMerrick KellyMerrick changed the title feat(test reports): storage addition and pipeline test_report key feat(test reports): development branch Apr 14, 2025
ErrEmptyFileType = errors.New("empty file_type provided")
// ErrEmptyPresignedUrl defines the error type when a
// TestReportAttachment type has an empty PresignedUrl field provided.
ErrEmptyPresignedUrl = errors.New("empty presigned_url provided")

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
var-naming: var ErrEmptyPresignedUrl should be ErrEmptyPresignedURL (revive)

ObjectPath sql.NullString `sql:"object_path"`
FileSize sql.NullInt64 `sql:"file_size"`
FileType sql.NullString `sql:"file_type"`
PresignedUrl sql.NullString `sql:"presigned_url"`

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
var-naming: struct field PresignedUrl should be PresignedURL (revive)

@@ -0,0 +1,50 @@
package buildkite

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
Missed header for check (goheader)

ObjectPath *string `json:"object_path,omitempty"`
FileSize *int64 `json:"file_size,omitempty"`
FileType *string `json:"file_type,omitempty"`
PresignedUrl *string `json:"presigned_url,omitempty"`

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
var-naming: struct field PresignedUrl should be PresignedURL (revive)

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)

//
// When the provided TestAttachment type is nil, or the field within
// the type is nil, it returns the zero value for the field.
func (r *TestAttachment) GetPresignedUrl() string {
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 🐶
var-naming: method GetPresignedUrl should be GetPresignedURL (revive)

}

// SetPresignedUrl sets the PresignedUrl field.
func (r *TestAttachment) SetPresignedUrl(v string) {
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 🐶
var-naming: method SetPresignedUrl should be SetPresignedURL (revive)

@@ -108,7 +108,9 @@

if len(step.Commands) == 0 && len(step.Environment) == 0 &&
len(step.Parameters) == 0 && len(step.Secrets) == 0 &&
len(step.Template.Name) == 0 && !step.Detach {
len(step.Template.Name) == 0 && len(step.TestReport.Results) == 0 &&
len(step.TestReport.Attachments) == 0 && !step.Detach {
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 🐶
unnecessary leading newline (whitespace)

@@ -77,5 +77,6 @@
return nil, fmt.Errorf("unable to create indexes for %s table: %w", constants.TableBuild, 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.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)

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