mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-05 22:27:03 +02:00
* VAULT-33074: add `github` sub-command to `pipeline` Investigating test workflow failures is common task that engineers on the sustaining rotation perform. This task often requires quite a bit of manual labor by manually inspecting all failed/cancelled workflows in the Github UI on per repo/branch/workflow basis and performing root cause analysis. As we work to improve our pipeline discoverability this PR adds a new `github` sub-command to the `pipeline` utility that allows querying for such workflows and returning either machine readable or human readable summaries in a single place. Eventually we plan to automate sending a summary of this data to an OTEL collector automatically but for now sustaining engineers can utilize it to query for workflows with lots of various criteria. A common pattern for investigating build/enos test failure workflows would be: ```shell export GITHUB_TOKEN="YOUR_TOKEN" go run -race ./tools/pipeline/... github list-workflow-runs -o hashicorp -r vault -d '2025-01-13..2025-01-23' --branch main --status failure build ``` This will list `build` workflow runs in `hashicorp/vault` repo for the `main` branch with the `status` or `conclusion` of `failure` within the date range of `2025-01-13..2025-01-23`. A sustaining engineer will likely do this for both `vault` and `vault-enterprise` repositories along with `enos-release-testing-oss` and `enos-release-testing-ent` workflows in addition to `build` in order to get a full picture of the last weeks failures. You can also use this utility to summarize workflows based on other statuses, branches, HEAD SHA's, event triggers, github actors, etc. For a full list of filter arguments you can pass `-h` to the sub-command. > [!CAUTION] > Be careful not to run this without setting strict filter arguments. > Failing to do so could result in trying to summarize way too many > workflows resulting in your API token being disabled for an hour. Signed-off-by: Ryan Cragun <me@ryan.ec>
68 lines
2.8 KiB
Modula-2
68 lines
2.8 KiB
Modula-2
module github.com/hashicorp/vault/tools/pipeline
|
|
|
|
go 1.23.2
|
|
|
|
require (
|
|
github.com/Masterminds/semver v1.5.0
|
|
github.com/google/go-github/v68 v68.0.0
|
|
github.com/hashicorp/hcl/v2 v2.23.0
|
|
github.com/hashicorp/releases-api v0.1.23
|
|
github.com/spf13/cobra v1.8.1
|
|
github.com/stretchr/testify v1.10.0
|
|
github.com/veqryn/slog-context v0.7.0
|
|
)
|
|
|
|
require (
|
|
github.com/agext/levenshtein v1.2.3 // indirect
|
|
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
|
|
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
|
|
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
|
|
github.com/docker/go-units v0.5.0 // indirect
|
|
github.com/fatih/color v1.18.0 // indirect
|
|
github.com/go-logr/logr v1.4.2 // indirect
|
|
github.com/go-logr/stdr v1.2.2 // indirect
|
|
github.com/go-openapi/analysis v0.23.0 // indirect
|
|
github.com/go-openapi/errors v0.22.0 // indirect
|
|
github.com/go-openapi/jsonpointer v0.21.0 // indirect
|
|
github.com/go-openapi/jsonreference v0.21.0 // indirect
|
|
github.com/go-openapi/loads v0.22.0 // indirect
|
|
github.com/go-openapi/runtime v0.28.0 // indirect
|
|
github.com/go-openapi/spec v0.21.0 // indirect
|
|
github.com/go-openapi/strfmt v0.23.0 // indirect
|
|
github.com/go-openapi/swag v0.23.0 // indirect
|
|
github.com/go-openapi/validate v0.24.0 // indirect
|
|
github.com/google/go-cmp v0.6.0 // indirect
|
|
github.com/google/go-querystring v1.1.0 // indirect
|
|
github.com/google/uuid v1.6.0 // indirect
|
|
github.com/hashicorp/go-hclog v1.6.3 // indirect
|
|
github.com/hashicorp/go-version v1.7.0 // indirect
|
|
github.com/imdario/mergo v0.3.16 // indirect
|
|
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
|
github.com/jessevdk/go-flags v1.6.1 // indirect
|
|
github.com/josharian/intern v1.0.0 // indirect
|
|
github.com/mailru/easyjson v0.9.0 // indirect
|
|
github.com/mattn/go-colorable v0.1.14 // indirect
|
|
github.com/mattn/go-isatty v0.0.20 // indirect
|
|
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
|
|
github.com/mitchellh/hashstructure v1.1.0 // indirect
|
|
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
|
github.com/mitchellh/pointerstructure v1.2.1 // indirect
|
|
github.com/oklog/ulid v1.3.1 // indirect
|
|
github.com/opentracing/opentracing-go v1.2.0 // indirect
|
|
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
|
|
github.com/spf13/pflag v1.0.5 // indirect
|
|
github.com/zclconf/go-cty v1.16.2 // indirect
|
|
go.mongodb.org/mongo-driver v1.17.2 // indirect
|
|
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
|
|
go.opentelemetry.io/otel v1.34.0 // indirect
|
|
go.opentelemetry.io/otel/metric v1.34.0 // indirect
|
|
go.opentelemetry.io/otel/trace v1.34.0 // indirect
|
|
golang.org/x/mod v0.22.0 // indirect
|
|
golang.org/x/net v0.34.0 // indirect
|
|
golang.org/x/sync v0.10.0 // indirect
|
|
golang.org/x/sys v0.29.0 // indirect
|
|
golang.org/x/text v0.21.0 // indirect
|
|
golang.org/x/tools v0.29.0 // indirect
|
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
|
)
|