Skip to content

Conversation

@adambkaplan
Copy link
Member

Changes

Initial effort to abstract concrete usage of Tekton TaskRuns out of the BuildRun controller. This includes the creation of new a new interface (ImageBuildRunner), factories for converting TaskRuns to ImageBuildRunners, and updates to controller code.

/kind cleanup

Submitter Checklist

  • Includes tests if functionality changed/was added
  • Includes docs if changes are user-facing
  • Set a kind label on this PR
  • Release notes block has been filled in, or marked NONE

See the contributor guide
for details on coding conventions, github and prow interactions, and the code review process.

Release Notes

NONE

@openshift-ci openshift-ci bot added the release-note-none Label for when a PR does not need a release note label Jul 1, 2025
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 1, 2025
@openshift-ci openshift-ci bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Jul 1, 2025
@openshift-ci openshift-ci bot requested review from SaschaSchwarze0 and dorzel July 1, 2025 14:04
@adambkaplan
Copy link
Member Author

This is a "take two" of my attempt to refactor TaskRuns out of the BuildRun contrller (see #1866). This time I am narrowing the scope a bit and using AI assistance.

Initial effort to abstract concrete usage of Tekton TaskRuns out of the
BuildRun controller. This includes the creation of new a new interface
(ImageBuildRunner), factories for converting TaskRuns to
ImageBuildRunners, and updates to controller code. Existing "patch"
logic for TaskRuns was encapsulated in a formal cancellation method.

Assisted-by: Cursor
Signed-off-by: Adam Kaplan <[email protected]>
@adambkaplan adambkaplan force-pushed the taskrun-refactor-cursor branch from 8bf0434 to 66af0cd Compare July 7, 2025 21:45
@adambkaplan adambkaplan changed the title WIP: Refactor TaskRuns out of BuildRun Controller Refactor TaskRuns out of BuildRun Controller Jul 7, 2025
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 7, 2025
@adambkaplan
Copy link
Member Author

Taking WIP off this PR (hopefully the full suite passes 🤞 )

@dorzel
Copy link
Contributor

dorzel commented Jul 16, 2025

@adambkaplan Is the eventual aim to have TaskRuns be a completely "optional" or modular component to Shipwright, such that if another imagebuildrunner (in this framework) were to come along that can implement the interfaces in this PR, it would use that instead?

@adambkaplan
Copy link
Member Author

@adambkaplan Is the eventual aim to have TaskRuns be a completely "optional" or modular component to Shipwright, such that if another imagebuildrunner (in this framework) were to come along that can implement the interfaces in this PR, it would use that instead?

More the "modular" idea. For multi-arch image builds, orchestrating with a PipelineRun is needed to run parallel builds on native infrastructure/nodes. We have also discussed a distant future state where Shipwright could orchestrate other Kubernetes workload types, such as Jobs or Argo Workflows. This PR would be the first of many baby steps down that path.

Copy link
Contributor

@dorzel dorzel left a comment

Choose a reason for hiding this comment

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

This seems like a good first step to me given what the intended scope currently is. ImageBuildRunner seems like a reasonable interface and I would expect it would get more generic over time as additional implementations come in.

Copy link
Member

@SaschaSchwarze0 SaschaSchwarze0 left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 3, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 3, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: SaschaSchwarze0

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 3, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit bfe399b into shipwright-io:main Aug 3, 2025
15 checks passed
@adambkaplan adambkaplan linked an issue Aug 14, 2025 that may be closed by this pull request
1 task
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/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. release-note-none Label for when a PR does not need a release note size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[FEATURE] Use PipelineRuns for Builds (experimental)

3 participants