Skip to content

ci: only run catlin validate on the resource version directory#1387

Merged
tekton-robot merged 1 commit into
tektoncd:mainfrom
vdemeester:ci-catlin-skip-tests
Jul 1, 2026
Merged

ci: only run catlin validate on the resource version directory#1387
tekton-robot merged 1 commit into
tektoncd:mainfrom
vdemeester:ci-catlin-skip-tests

Conversation

@vdemeester

Copy link
Copy Markdown
Member

Changes

The catlin validate gate (introduced in #the Prow→GHA migration, commit 51a8540f) reduces every changed file to its containing directory with dirname and passes the result to catlin validate. For a new task version the changed set includes the tests/ and tests/fixtures/ subdirectories, so catlin validates the test manifests (a TaskRun or Pipeline) as if they were catalog resources:

FILE: task/<name>/<version>/tests/run.yaml
ERROR: Resource path is invalid; expected path: pipeline/<name>/<name>.yaml
ERROR: Pipeline "<name>" must have a label "app.kubernetes.io/version" ...

catlin also errors with unknown kind TaskRun for TaskRun-based tests, so any new task version that ships a tests/run.yaml fails the gate. Because no new task version has been added since the gate landed, this went unnoticed until now (surfaced by #1386).

Fix

Reduce each changed path to its task/<name>/<version> version directory (grep -oE '^task/[^/]+/[^/]+' | sort -u) instead of dirname on every file. catlin then validates only the catalog resource in that directory and does not descend into tests/ or samples/, which are not catalog resources. The existing [[ -d ]] filter still drops removed directories and non-directory matches such as task/<name>/OWNERS. The same detection is applied to the informational "catlin lint scripts" step.

Verified locally with the pinned catlin version CI installs: validating task/<name>/<version> only checks the resource .yaml and ignores tests/.

Submitter Checklist

/kind bug

See the contribution guide for more details.

The catlin validate gate (added when catlin lint moved from Prow to
GitHub Actions) reduced every changed file to its containing directory
via `dirname` and passed the result to `catlin validate`. For a new task
version this includes the `tests/` and `tests/fixtures/` subdirectories,
so catlin ends up validating the test manifests (a `TaskRun` or
`Pipeline`) as if they were catalog resources:

  FILE: task/<name>/<version>/tests/run.yaml
  ERROR: Resource path is invalid; expected path: pipeline/...
  ERROR: Pipeline "..." must have a label "app.kubernetes.io/version" ...

catlin also errors with "unknown kind TaskRun" for TaskRun-based tests,
so any new task version that ships a tests/run.yaml fails the gate. No
new task version had been added since the gate landed, so this went
unnoticed.

Reduce each changed path to its `task/<name>/<version>` version
directory instead. catlin validates only the catalog resource in that
directory and does not descend into tests/ or samples/, which are not
catalog resources. The existing `[[ -d ]]` filter still drops removed
directories and non-directory matches such as task/<name>/OWNERS.

Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
@tekton-robot tekton-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jul 1, 2026
@tekton-robot
tekton-robot requested a review from vinamra28 July 1, 2026 14:45
@tekton-robot tekton-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jul 1, 2026
@vdemeester vdemeester added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jul 1, 2026
@tekton-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

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

The pull request process is described 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

@tekton-robot
tekton-robot merged commit d99a8d4 into tektoncd:main Jul 1, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants