mirror of
https://github.com/dsx-ai-factory/nvke.git
synced 2026-12-07 04:35:58 +08:00
* feat(release): triage failed qualification jobs and reply in the tag's thread A rule table names why a qualification job failed, and a workflow replies with the diagnosis in the tag's Slack thread. Diagnosis only: nothing is re-run, deleted or taken from Forge. An automatic run posts only when QUALIFY_TRIAGE_POST is true. Signed-off-by: Byron McAdams <bmcadams@nvidia.com> * fix(release): triage the attempt that finished, not the latest An automatic run read the latest attempt from the API, so a re-run started before the step ran made it classify the new attempt, which has no failed jobs yet. Use the attempt in the workflow_run event; a manual dispatch keeps its input and the API fallback. Signed-off-by: Byron McAdams <bmcadams@nvidia.com> * fix(release): restore the saved thread for a dry run too A dry run reply is only rendered when there is a thread to reply in, so without the artifact it printed nothing. Downloading it needs no secret. Signed-off-by: Byron McAdams <bmcadams@nvidia.com> * fix(release): keep triaging past a bad log, skip step source by its group, tighten two rules A job log with a line over 1 MiB failed its extraction, and the script stopped at that job, so no other job was classified or posted. An overlong line is now cut, and a job that still cannot be classified is listed like an expired log. The workflow's own source is now skipped by the runner's own markers (the ##[group]Run block of each step, up to its ##[endgroup]) in place of the here-document and echo heuristics, which a quoted phrase or an unterminated here-document could defeat. The failure block is kept to ten lines, so a clusterctl error that follows its progress is not cut. The cert-manager rule matches the error after the progress line, which every successful clusterctl init prints. Evidence is the line where a match ends, so a multi-line rule quotes the line that says why. Signed-off-by: Byron McAdams <bmcadams@nvidia.com> * fix(release): keep a job's name when it has no failed step, and a step's own output A failed job with no failed step listed its name in the step column, and read collapses adjacent tabs, so the name moved into the step field and the name was empty. The step is now the last column, where an empty value cannot shift another. The context before a failure kept what an earlier, successful step printed, so a handled diagnostic could name the wrong class for the next step's failure. The pending output is cleared when a new step's source block opens. The triage-run test stub runs the script's own jq query over JSON jobs, so a dropped attempt filter now fails a test. Signed-off-by: Byron McAdams <bmcadams@nvidia.com> --------- Signed-off-by: Byron McAdams <bmcadams@nvidia.com>
33 lines
1.2 KiB
Makefile
33 lines
1.2 KiB
Makefile
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
GO ?= go
|
|
GO_TEST_FLAGS ?=
|
|
GOBIN ?= $(shell $(GO) env GOPATH)/bin
|
|
# GOLANGCI_LINT_GOWORK is left at its default of `off`. This module has no
|
|
# internal dependency and needs nothing from the root vendor/ tree, so it
|
|
# lints against its own go.mod and never reaches cluster-api-provider-nico.
|
|
include ../make/golangci.mk
|
|
include ../make/coverage.mk
|
|
|
|
.DEFAULT_GOAL := help
|
|
.PHONY: help build test lint fmt
|
|
|
|
help: ## List the release tooling targets.
|
|
@awk 'BEGIN { FS = ":.*## " } /^[a-z][a-z0-9-]*:.*## / { printf " %-18s %s\n", $$1, $$2 }' $(MAKEFILE_LIST)
|
|
|
|
build: ## Compile the qualify command.
|
|
$(GO) build ./...
|
|
|
|
test: ## Run this module's tests. (run by the merge gate)
|
|
@$(COVERAGE_MKDIR)
|
|
$(GO) test $(GO_TEST_FLAGS) $(GO_COVER_FLAGS) ./...
|
|
|
|
lint: ## Run the repository-pinned Go linter, and check notify.yml and triage.yaml. (run by the merge gate)
|
|
@$(GOLANGCI_LINT_RUN) run --timeout 10m --max-same-issues 0 --max-issues-per-linter 0 ./...
|
|
@$(GO) run ./cmd/notify validate --config notify.yml
|
|
@$(GO) run ./cmd/triage validate --rules triage.yaml
|
|
|
|
fmt: ## Format this module's sources.
|
|
$(GO) fmt ./...
|