Skip to content

docs: Clarify task resolution in pipeline documentation#2815

Open
chmouel wants to merge 1 commit into
tektoncd:mainfrom
chmouel:docs/2814-git-clone-resolver-docs
Open

docs: Clarify task resolution in pipeline documentation#2815
chmouel wants to merge 1 commit into
tektoncd:mainfrom
chmouel:docs/2814-git-clone-resolver-docs

Conversation

@chmouel

@chmouel chmouel commented Jun 30, 2026

Copy link
Copy Markdown
Member

📝 Description of the Change

Clarify the difference between Pipelines-as-Code remote task annotations and
native Tekton resolver syntax. The documentation previously combined
taskRef.name with taskRef.resolver, which caused Tekton to interpret the task
name as a resolver URI and reject the PipelineRun.

This change documents both supported approaches, updates the git-clone
Artifact Hub links and generated templates, and refreshes the corresponding
golden files.

🔗 Linked GitHub Issue

Fixes #2814

🧪 Testing Strategy

  • Unit tests
  • Integration tests
  • End-to-end tests
  • Manual testing
  • Not Applicable

go test ./pkg/cmd/tknpac/create

The push-time unit tests, Go linting, generated-file checks, codespell, and
gitlint also passed.

🤖 AI Assistance

AI assistance can be used for various tasks, such as code generation,
documentation, or testing.

Please indicate whether you have used AI assistance
for this PR and provide details if applicable.

  • I have not used any AI assistance for this PR.
  • I have used AI assistance for this PR.

AI assistance was used to review the documentation changes, identify and update
the affected golden files, and draft the pull request description.

Important

Slop will be simply rejected, if you are using AI assistance you need to make sure you
understand the code generated and that it meets the project's standards. you
need at least know how to run the code and deploy it (if needed). See
startpaac to make it easy
to deploy and test your code changes.

If the majority of the code in this PR was generated by an AI, please add a Co-authored-by trailer to your commit message.
For example:

Co-authored-by: Claude noreply@anthropic.com

✅ Submitter Checklist

  • 📝 My commit messages are clear, informative, and follow the project's How to write a git commit message guide. The Gitlint linter ensures in CI it's properly validated
  • ✨ I have ensured my commit message prefix (e.g., fix:, feat:) matches the "Type of Change" I selected above.
  • ♽ I have run make test and make lint locally to check for and fix any
    issues. For an efficient workflow, I have considered installing
    pre-commit and running pre-commit install to
    automate these checks.
  • 📖 I have added or updated documentation for any user-facing changes.
  • 🧪 I have added sufficient unit tests for my code changes.
  • 🎁 I have added end-to-end tests where feasible. See README for more details.
  • 🔎 I have addressed any CI test flakiness or provided a clear reason to bypass it.
  • If adding a provider feature, I have filled in the following and updated the provider documentation:
    • GitHub App
    • GitHub Webhook
    • Gitea/Forgejo
    • GitLab
    • Bitbucket Cloud
    • Bitbucket Data Center

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request updates the documentation and template files to clarify the distinction between Pipelines-as-Code remote task resolution (using annotations to inline tasks) and native Tekton hub resolver syntax. It also updates links and references from the deprecated Tekton Catalog to Artifact Hub, and improves YAML examples to reflect these practices. There are no review comments, so I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@chmouel chmouel marked this pull request as ready for review June 30, 2026 18:07
@chmouel chmouel requested a review from Copilot June 30, 2026 18:08
@chmouel chmouel changed the title [codex] Clarify task resolution in pipeline documentation Clarify task resolution in pipeline documentation Jun 30, 2026
@chmouel chmouel changed the title Clarify task resolution in pipeline documentation docs: Clarify task resolution in pipeline documentation Jun 30, 2026
@chmouel chmouel added the documentation Improvements or additions to documentation label Jun 30, 2026

Copilot AI left a comment

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.

Pull request overview

This PR updates Pipelines-as-Code documentation and CLI-generated templates to clearly distinguish Pipelines-as-Code remote task annotations (which PaC fetches and inlines) from native Tekton resolver syntax (which Tekton resolves in-cluster), addressing the previously documented invalid taskRef.name + taskRef.resolver combination.

Changes:

  • Clarifies correct task resolution patterns in the pipeline resolution guide (PaC annotations vs Tekton hub resolver params).
  • Updates docs to point git-clone references to Artifact Hub links and fixes examples to avoid invalid resolver usage.
  • Refreshes tkn pac generate templates and corresponding golden testdata to match the updated guidance.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pkg/cmd/tknpac/generate/templates/python.yaml Updates template comments to describe PaC remote task annotations and Artifact Hub usage.
pkg/cmd/tknpac/generate/templates/nodejs.yaml Same comment clarifications for Node.js template.
pkg/cmd/tknpac/generate/templates/java.yaml Same comment clarifications for Java template; updates hub wording to Artifact Hub.
pkg/cmd/tknpac/generate/templates/go.yaml Same comment clarifications for Go template; updates hub wording to Artifact Hub.
pkg/cmd/tknpac/generate/templates/generic.yaml Same comment clarifications for generic template; updates hub wording to Artifact Hub.
pkg/cmd/tknpac/create/testdata/TestGenerateTemplate-WithoutGitInfo.golden Updates golden output to match the updated template comments.
pkg/cmd/tknpac/create/testdata/TestGenerateTemplate-WithGitInfo.golden Updates golden output to match the updated template comments.
docs/content/docs/guides/pipeline-resolution/_index.md Adds explicit guidance to avoid mixing PaC annotations with Tekton resolver syntax; documents both supported approaches.
docs/content/docs/guides/creating-pipelines/_index.md Updates git-clone references to Artifact Hub links.
docs/content/docs/dev/architecture.md Updates architecture description/examples to reflect PaC annotation-based inlining vs Tekton resolver pass-through.
docs/content/docs/concepts.md Updates conceptual description and example to reflect PaC annotation-based remote task fetching and avoid invalid resolver usage.
docs/content/docs/advanced/private-repositories.md Updates git-clone links and improves the workspace wiring example while using PaC remote task annotations.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Poundex

Poundex commented Jun 30, 2026

Copy link
Copy Markdown

Can confirm git-clone in the updated example in Concepts is now working. I also think the updated explanation of the PAC & native Tekton resolvers in Hub support for Pipelines, as well as the updated example in Architecture, makes things much clearer

name: git-clone
```

Do not add `resolver: hub` to this `taskRef`. `resolver: hub` is native Tekton resolver syntax; if you combine it with `name: git-clone`, Tekton treats the name as a resolver URI and rejects it because `git-clone` is not a URI.

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.

as it is malpractice by users, shouldn't be this in a "warning block". it is guidance doc showing how to use pac annotation so saying like this "Do not add..." or something looks like a side note

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I don't think we need it, it's not a common "shoot yourself in the foot" that would warrant a warning block (i rather use those sparingly)

Comment thread docs/content/docs/guides/pipeline-resolution/_index.md Outdated
Updated the documentation and scaffolding templates to clarify task
resolution behaviors. Explicitly distinguished annotation-based task
inlining from native Tekton Hub resolver syntax because combining them
caused configuration errors. Replaced outdated git-clone catalog URLs
with the correct Artifact Hub links to ensure accurate references.

Fixes tektoncd#2814
AI-assisted-by: OpenAI ChatGPT
Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
@chmouel chmouel force-pushed the docs/2814-git-clone-resolver-docs branch from 8934ded to 760bad2 Compare July 1, 2026 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs show invalid hub resolver syntax for git-clone

4 participants