Skip to content

CI: Output test coverprofile to Artifacts tab in Prow#257

Open
vitorfloriano wants to merge 1 commit into
kubernetes-sigs:mainfrom
vitorfloriano:ci-output-test-coverprofile-to-artifacts
Open

CI: Output test coverprofile to Artifacts tab in Prow#257
vitorfloriano wants to merge 1 commit into
kubernetes-sigs:mainfrom
vitorfloriano:ci-output-test-coverprofile-to-artifacts

Conversation

@vitorfloriano
Copy link
Copy Markdown
Contributor

When run in Prow, make test will output the coverprofile file to $ARTIFACTS, which is a directory already present and exported by Prow when using decorate: true in the job description, and will show up in the Artifacts tab in spyglass.

When run locally, make test will output the file to the root of the repo, as it is currently.

See: https://docs.prow.k8s.io/docs/components/pod-utilities/#what-the-test-container-can-expect

Follow-up to kubernetes/test-infra#37035

@netlify
Copy link
Copy Markdown

netlify Bot commented May 15, 2026

Deploy Preview for node-readiness-controller canceled.

Name Link
🔨 Latest commit ba713e9
🔍 Latest deploy log https://app.netlify.com/projects/node-readiness-controller/deploys/6a08a29f74037700085ed502

@k8s-ci-robot k8s-ci-robot requested a review from mrunalp May 15, 2026 12:37
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: vitorfloriano
Once this PR has been reviewed and has the lgtm label, please assign dchen1107 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels May 15, 2026
@vitorfloriano
Copy link
Copy Markdown
Contributor Author

/cc @Priyankasaggu11929

Comment thread Makefile
TOOLS_DIR := hack/tools
TOOLS_BIN_DIR := $(abspath $(TOOLS_DIR)/$(BIN_DIR))
GO_INSTALL := ./scripts/go_install.sh
ARTIFACTS ?= .
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i would put it under either hack/tools/artifacts or something similar

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

What about ./artifacts/ only?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

whatever we choose, let's make sure it is self-explanatory and added to .gitignore.

Within Kubernetes projects, I have seen a pattern of _output/* dir for collecting test artifacts, logs or binaries etc.

@AvineshTripathi
Copy link
Copy Markdown
Contributor

/rebase

When run in CI, the coverprofile output from the test will be sent to the artifacts tab in Prow.

When run locally, make test will output the file to
the root of the repo.
@vitorfloriano vitorfloriano force-pushed the ci-output-test-coverprofile-to-artifacts branch from 5c95242 to ba713e9 Compare May 16, 2026 17:00
@Priyankasaggu11929
Copy link
Copy Markdown
Member

I'm good with the changes as it is so far.

But if you want to improve the default ARTIFACTS dir, adding a hold. (feel free to unhold)
/hold

/lgtm

(@ajaysundark, for approve label. Thanks!)

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 18, 2026
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants