Skip to content

Conversation

hasanawad94
Copy link
Contributor

@hasanawad94 hasanawad94 commented Jul 31, 2025

This commit introduces a new BuildExecutor field to the BuildRunStatus to define the resource responsible for executing a build. This change allows for supporting different kinds of runners, such as TaskRun and PipelineRun.

Relevant to #1924

Changes

BuildExecutor struct contains two fields:

  • Name: The name of the runner resource (e.g., the TaskRun or PipelineRun name).
  • Kind: The kind of the runner resource (e.g., "TaskRun", "PipelineRun").

Added Deprecated to the TaskRunName field.

Conversion Logic:

v1beta1 → v1alpha1:
The ImageBuildRun.Name is mapped to the LatestTaskRunRef field in v1alpha1. If ImageBuildRun is not present, it falls back to the deprecated TaskRunName field. The Kind information is not passed, as v1alpha1 only supports TaskRuns. v1alpha1 → v1beta1:
The LatestTaskRunRef from v1alpha1 is mapped to ImageBuildRun.Name. ImageBuildRun.Kind is defaulted to "TaskRun" for compatibility.

Added // nolint:staticcheck a directive to disable a specific linter check for a particular line or block of code.

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

Added `BuildExecutor` field to `Buildrun` which will describe the the kind that is executing the build and also references the resource it self.

@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 31, 2025
@openshift-ci openshift-ci bot requested review from dorzel and rxinui July 31, 2025 10:13
@openshift-ci openshift-ci bot added the do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. label Jul 31, 2025
Copy link
Member

@adambkaplan adambkaplan left a comment

Choose a reason for hiding this comment

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

General 👍 to the sprit of this PR. I agree with @SaschaSchwarze0 that we probably should get agreement field name in status before merging this.

Note that because this PR marks a field as deprecated, we probably need to add comments that instruct the linter to skip specific lines that reference the "old" status fields.

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 5, 2025
feat(api): Introduce BuildExecutor for multiple runner kinds
This commit introduces a new BuildExecutor field to the BuildRunStatus to define the resource responsible for executing a build. This change allows for supporting different kinds of runners, such as TaskRun and PipelineRun.

The new BuildExecutor struct contains two fields:
Name: The name of the runner resource (e.g., the TaskRun or PipelineRun name).
Kind: The kind of the runner resource (e.g., "TaskRun", "PipelineRun").
With this change, the TaskRunName field is now deprecated.

Conversion Logic:
v1beta1 → v1alpha1:
The ImageBuildRun.Name is mapped to the LatestTaskRunRef field in v1alpha1. If ImageBuildRun is not present, it falls back to the deprecated TaskRunName field.
The Kind information is not passed, as v1alpha1 only supports TaskRuns.
v1alpha1 → v1beta1:
The LatestTaskRunRef from v1alpha1 is mapped to ImageBuildRun.Name.
ImageBuildRun.Kind is defaulted to "TaskRun" for compatibility.

Added `// nolint:staticcheck` a directive to disable a specific linter check for a particular line or block of code.
:staticcheck: This specifies the name of the linter to disable. staticcheck is a popular Go linter that performs a wide variety of static analysis checks.

Signed-off-by: Hasan Awad <[email protected]>
@hasanawad94 hasanawad94 changed the title feat(api): Introduce ImageBuildRun for multiple runner kinds feat(api): Introduce BuildExecutor for multiple runner kinds Aug 5, 2025
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 5, 2025
@hasanawad94
Copy link
Contributor Author

/release-note

Copy link
Contributor

openshift-ci bot commented Aug 5, 2025

@hasanawad94: the /release-note and /release-note-action-required commands have been deprecated.
Please edit the release-note block in the PR body text to include the release note. If the release note requires additional action include the string action required in the release note. For example:

```release-note
Some release note with action required.
```

In response to this:

/release-note

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-ci openshift-ci bot added release-note Label for when a PR has specified a release note and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Aug 5, 2025
@hasanawad94 hasanawad94 requested a review from adambkaplan August 9, 2025 09:57
@SaschaSchwarze0 SaschaSchwarze0 added the kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API label Aug 11, 2025
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 11, 2025
@SaschaSchwarze0 SaschaSchwarze0 added this to the release-v0.17.0 milestone Aug 11, 2025
Copy link
Contributor

openshift-ci bot commented Aug 11, 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 11, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit c5d9d84 into shipwright-io:main Aug 11, 2025
15 checks passed
@adambkaplan adambkaplan linked an issue Aug 14, 2025 that may be closed by this pull request
1 task
hasanawad94 pushed a commit to hasanawad94/build that referenced this pull request Aug 19, 2025
feat(api): Introduce BuildExecutor for multiple runner kinds
hasanawad94 added a commit to hasanawad94/community that referenced this pull request Sep 11, 2025
Explination of the Executor field which was added in shipwright-io/build#1956.
Executor field defines the resource responsible for executing a build.

Signed-off-by: Hasan Awad <[email protected]>
hasanawad94 added a commit to hasanawad94/community that referenced this pull request Sep 14, 2025
Explination of the Executor field which was added in shipwright-io/build#1956.
Executor field defines the resource responsible for executing a build.

Signed-off-by: Hasan Awad <[email protected]>
hasanawad94 added a commit to hasanawad94/community that referenced this pull request Sep 14, 2025
Explination of the Executor field which was added in shipwright-io/build#1956.
Executor field defines the resource responsible for executing a build.

Signed-off-by: Hasan Awad <[email protected]>
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/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API lgtm Indicates that a PR is ready to be merged. release-note Label for when a PR has specified a release note size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[FEATURE] Use PipelineRuns for Builds (experimental)
4 participants