-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Pipelines 1.20.3
-
False
-
-
False
-
-
Story (Required)
As a DevOps Engineer trying to reference local tasks using relative paths within a pipeline I want the pipeline to resolve these references correctly as it did in previous versions
This story addresses a regression where Pipelines-as-Code (PaC) fails to resolve relative task references (e.g., ./task.yaml) within a .tekton directory. This currently breaks CI/CD workflows for users who modularize their pipeline definitions, forcing them to use absolute URLs or inline tasks, which significantly degrades the developer experience and maintainability of the repository.
Background (Required)
In OpenShift Pipelines 1.20.3, a regression was introduced that prevents the PaC resolver from correctly locating tasks defined via relative paths. Previously, a pipeline could reference a task in the same directory using {{{}taskRef: { resolver: git, params: [
{ name: path, value: "./my-task.yaml" }] }{}}}. Since the update, this results in a resolution error, causing pipeline runs to fail before execution.
Out of scope
- Fixing issues related to external remote task resolution (e.g., Tekton Hub or remote HTTPS URLs) unless they share the same root cause.
- Implementing new resolution features beyond restoring the broken relative path functionality.
Approach (Required)
- Identify Root Cause: Investigate the internal/resolve package to determine where the path normalization logic is failing in version 1.20.3.
- Fix Path Resolution: Ensure the Git resolver correctly identifies the base directory of the triggering event and appends the relative path correctly.
- Validation Logic: Update the resolver to handle ./ and ../ prefixes specifically when fetching blobs from the Git provider.
- Code Location: Likely requires changes in pkg/resolver/resolver.go and the associated Git provider logic.
Dependencies
- This is a regression in OpenShift Pipelines 1.20.3 / PaC v0.37.7.
- Blocks any user migrating to the latest version who relies on modular .tekton directory structures.
- Refer upstream issue: https://github.com/openshift-pipelines/pipelines-as-code/issues/2549
Acceptance Criteria (Mandatory)
- Pipelines containing taskRef with a relative path (e.g., ./task-name.yaml) must resolve and execute successfully.
- Support for relative paths must work across different Git providers (GitHub, GitLab, Bitbucket).
- Regression tests should be added to the E2E suite that specifically use a multi-file .tekton directory setup.
- Error messages for truly missing files should remain clear and not be swallowed by the fix.
INVEST Checklist
Dependencies identified
Blockers noted and expected delivery timelines set
Design is implementable
Acceptance criteria agreed upon
( ) Story estimated
Legend
( ) Unknown
Verified
Unsatisfied
Done Checklist
- Code is completed, reviewed, documented and checked in
- Unit and integration test automation have been delivered and running cleanly in continuous integration/staging/canary environment
- Continuous Delivery pipeline(s) is able to proceed with new code included
- Customer facing documentation, API docs etc. are produced/updated, reviewed and published
- Acceptance criteria are met