Skip to content

Conversation

@anithapriyanatarajan
Copy link
Contributor

Changes

This pull request is to correct an unintended directory overwrite issue introduced by PR #3057 resulting in the config files required for old job based pruner being completely removed from the Operator manifests.

To correct the naming conflict between two types of pruner components (event-based and job-based) directory references in both the shell script and Go code are updated with this PR. The main change ensures that the event-based pruner uses the pruner directory instead of tekton-pruner, preventing potential clashes with the job-based pruner.

  • In hack/fetch-releases.sh, updated the logic so that the event-based pruner component uses the pruner directory instead of tekton-pruner, with comments explaining the reason for this change.
  • In pkg/reconciler/common/releases.go, modified the ComponentDir function to return the pruner directory for event-based pruner components, with explanatory comments to clarify the distinction.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

See the contribution guide for more details.

Release Notes

NONE

@tekton-robot tekton-robot added release-note-none Denotes a PR that doesnt merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Dec 9, 2025
@tekton-robot tekton-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Dec 9, 2025
@anithapriyanatarajan
Copy link
Contributor Author

/hold cancel

@anithapriyanatarajan anithapriyanatarajan changed the title WIP fix: prevent unintended directory overwrite from PR #3057 fix: prevent unintended directory overwrite from PR #3057 Dec 9, 2025
@tekton-robot tekton-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 9, 2025
@anithapriyanatarajan
Copy link
Contributor Author

/kind bug

@tekton-robot tekton-robot added the kind/bug Categorizes issue or PR as related to a bug. label Dec 9, 2025
@anithapriyanatarajan
Copy link
Contributor Author

anithapriyanatarajan commented Dec 9, 2025

/assign @pramodbindal

# pruner (event-based) should not use tekton- prefix
# to avoid conflicts with tekton-pruner (job-based) directory
if [[ $comp == "pruner" ]]; then
dir="pruner"
Copy link
Member

@pramodbindal pramodbindal Dec 10, 2025

Choose a reason for hiding this comment

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

dir you already passing as pruner so i think we don't need this condition

Copy link
Contributor Author

Choose a reason for hiding this comment

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

🥹 Thankyou for pointing out. Removed the redundant lines.

Copy link
Member

Choose a reason for hiding this comment

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

what is the purpose of renaming this file ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This has to match the filepath in the release_test.go. (This is how it was in previous versions.) https://github.com/tektoncd/operator/blob/release-v0.77.x/pkg/reconciler/common/testdata/kodata/pruner/0.1.0/release-v0.1.0.yaml

Copy link
Member

Choose a reason for hiding this comment

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

what is the purpose of renaming this file ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is added newly to the tests since this operator version consumes the latest version(0.3.3) of pruner. Ideally every component should have this updated for every new version adopted in Operator

@pramodbindal
Copy link
Member

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 10, 2025
@pramodbindal
Copy link
Member

/approved

@pramodbindal
Copy link
Member

/approve

@pratap0007
Copy link
Contributor

@anithapriyanatarajan Here pruner yaml manifest dir should be pruner instead if tekton-pruner, right?

@mbpavan
Copy link
Contributor

mbpavan commented Dec 10, 2025

/approve

@tekton-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mbpavan, pramodbindal

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

The pull request process is described here

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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 10, 2025
@tekton-robot tekton-robot merged commit 1cca78d into tektoncd:main Dec 10, 2025
13 checks passed
@anithapriyanatarajan
Copy link
Contributor Author

/cherry-pick release-v0.78.x

@tekton-robot
Copy link
Contributor

Cherry-pick to release-v0.78.x successful!

A new pull request has been created to cherry-pick this change to release-v0.78.x.

Please review and merge the cherry-pick PR.

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. release-note-none Denotes a PR that doesnt merit a release note. 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.

5 participants