Add --runtime-class flag to buildrun create#366
Add --runtime-class flag to buildrun create#366IrvingMg wants to merge 1 commit intoshipwright-io:mainfrom
Conversation
Signed-off-by: Irving Mondragón <mirvingr@gmail.com>
|
Note: The shipwright-io/build dependency is currently pointing to the main branch since the RuntimeClassName field was added in shipwright-io/build#2079 but not yet included in a release. This can be updated to a proper release version once available. |
adambkaplan
left a comment
There was a problem hiding this comment.
/approve
Looks good to me, needs a 2nd set of eyes for lgtm
| github.com/schollz/progressbar/v3 v3.18.0 | ||
| github.com/shipwright-io/build v0.18.0 | ||
| github.com/spf13/cobra v1.10.1 | ||
| github.com/shipwright-io/build v0.18.2-0.20260112084729-e48a9ff9aa57 |
There was a problem hiding this comment.
👍 - necessary to get the new API. We will update to v0.19.0 when we get ready to release next month.
| ) | ||
| } | ||
|
|
||
| // buildRuntimeClassNameFlag registers flags for adding BuildRunSpec.RuntimeClassName |
| t.Run(".spec.runtimeClassName", func(_ *testing.T) { | ||
| err := flags.Set(RuntimeClassNameFlag, *expected.RuntimeClassName) | ||
| g.Expect(err).To(o.BeNil()) | ||
|
|
||
| g.Expect(expected.RuntimeClassName).To(o.Equal(spec.RuntimeClassName), "spec.runtimeClassName") | ||
| }) | ||
|
|
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adambkaplan The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/assign @hasanawad94 /cc @rxinui For review and |
|
Hi @HeavyWombat @qu1queee @rxinui, Just checking in on this, it’s approved and ready for LGTM. Could you take a quick look so we can merge and close #363? Thanks! |
There was a problem hiding this comment.
Pull request overview
This pull request adds support for the --runtime-class flag to BuildRun-related commands in the Shipwright CLI (shp). The feature allows users to specify a RuntimeClass for build pods, implementing the functionality described in SHIP-0040. The PR includes comprehensive test coverage and documentation updates.
Changes:
- Added
--runtime-classflag to BuildRun creation commands (shp buildrun create,shp build run,shp build upload) - Updated vendored dependencies to include the RuntimeClassName field in BuildRunSpec from shipwright-io/build
- Added test coverage for the new flag functionality
Reviewed changes
Copilot reviewed 7 out of 22 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/shp/flags/flags.go | Added RuntimeClassNameFlag constant and buildRuntimeClassNameFlag registration function |
| pkg/shp/flags/buildrun.go | Integrated RuntimeClassName into BuildRunSpecFromFlags and added sanitization logic |
| pkg/shp/flags/buildrun_test.go | Added test cases for RuntimeClassName flag handling and sanitization |
| docs/shp_buildrun_create.md | Updated documentation to include the --runtime-class flag |
| docs/shp_build_run.md | Updated documentation to include the --runtime-class flag |
| docs/shp_build_upload.md | Updated documentation to include the --runtime-class flag |
| go.mod | Updated shipwright-io/build dependency to include RuntimeClassName API support |
| go.sum | Updated checksums for dependency changes |
| vendor/github.com/shipwright-io/build/pkg/apis/build/v1beta1/buildrun_types.go | Added RuntimeClassName field to BuildRunSpec |
| vendor/github.com/shipwright-io/build/pkg/apis/build/v1beta1/build_types.go | Added RuntimeClassName field to BuildSpec and RuntimeClassNameNotValid reason |
| vendor/modules.txt | Updated dependency versions |
| vendor/github.com/spf13/cobra/* | Updated cobra library to v1.10.2 |
| vendor/github.com/onsi/gomega/* | Updated gomega library to v1.39.0 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Changes
Adds support for the
--runtime-classflag.Fixes #363
/kind feature
Submitter Checklist
See the contributor guide
for details on coding conventions, github and prow interactions, and the code review process.
Release Notes