Skip to content

Conversation

pratap0007
Copy link
Contributor

@pratap0007 pratap0007 commented Sep 25, 2025

This PR implements following

  • Add --resolvertype flag supporting hub, git, http, cluster, bundle and remote resolver type
  • Implement special remote resolver that finds latest PipelineRun with any resolver type and rerun it
  • If --resolvertype flag value is except remote, filters pipelinerun by that resolver type
  • Integrate --resolvertype with existing --last flag functionality
  • With --resolvertype and --last` flags pipeline name is optional
  • With --last flag pipeline name is optional
  • Add validation: resolvertype requires pipeline name except for remote type
  • Support all flag combinations: --resolvertype only, --last only, both together
  • Include the unit tests

closes: #2422

Changes

Submitter Checklist

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

  • Includes tests (if functionality changed/added)
  • Run the code checkers with make check
  • Regenerate the manpages, docs and go formatting with make generated
  • Commit messages follow commit message best practices

See the contribution guide
for more details.

Release Notes

@tekton-robot tekton-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Sep 25, 2025
@tekton-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please ask for approval from pratap0007 after the PR has been reviewed.

The full list of commands accepted by this bot can be found 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 size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Sep 25, 2025
- Add --resolvertype flag supporting hub, git, http, cluster, bundle and remote resolver type
- Implement special remote resolver that finds latest PipelineRun with any resolver type and rerun it
- If --resolvertype flag value is except remote, filters pipelinerun by that resolver type
- Integrate --resolvertype with existing --last flag functionality
- With --resolvertype and --last flags pipeline name is optional
- With --last flag pipeline name is optional
- Add validation: resolvertype requires pipeline name except for remote type
- Support all flag combinations: --resolvertype only, --last only, both together
- Include the unit tests

closes: tektoncd#2422

Signed-off-by: Shiv Verma <[email protected]>
@pratap0007
Copy link
Contributor Author

/assign @chmouel @divyansh42

return opt.runWithResolverOnly(cs, pipelineName)
}

func (opt *startOptions) runWithResolverOnly(_ *cli.Clients, pipelineName string) error {
Copy link
Member

Choose a reason for hiding this comment

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

all those methods have a lot of duplications.. any way to streamline this ? by extracting it to a helper method like createObjectMeta(lastPipelineRun, prefixName)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, I update it by extracting those in a helper function

@waveywaves
Copy link
Member

/retest

@waveywaves
Copy link
Member

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add tkn cli support to rerun an existing resolver based pipelinerun
5 participants