-
Notifications
You must be signed in to change notification settings - Fork 125
feat(api): Introduce BuildExecutor for multiple runner kinds #1956
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(api): Introduce BuildExecutor for multiple runner kinds #1956
Conversation
There was a problem hiding this 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.
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]>
2a63909
to
50b9dac
Compare
f8a0ab6
to
40c205b
Compare
/release-note |
@hasanawad94: the
In response to this:
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. |
40c205b
to
d4bdf5d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
/lgtm
[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 |
feat(api): Introduce BuildExecutor for multiple runner kinds
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]>
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]>
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]>
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:
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
See the contributor guide
for details on coding conventions, github and prow interactions, and the code review process.
Release Notes