Skip to content

feat(cmd): add 'update' subcommand for build resources - #414

Open
mohit-bhandari45 wants to merge 4 commits into
shipwright-io:mainfrom
mohit-bhandari45:feat/add-build-update-subcommand
Open

feat(cmd): add 'update' subcommand for build resources#414
mohit-bhandari45 wants to merge 4 commits into
shipwright-io:mainfrom
mohit-bhandari45:feat/add-build-update-subcommand

Conversation

@mohit-bhandari45

Copy link
Copy Markdown

Changes

Introduced the missing update subcommand for build resource manager (shp build update):

  • shp build update <name> [flags]: Allows updating existing Build object specifications (e.g. --source-git-url, --source-git-revision, --output-image, --strategy-name, --source-context-dir, --dockerfile, --builder-image, etc.) directly from the CLI.
  • Selective Field Updates: Inspects which CLI flags were explicitly provided by the user using Cobra's Flags().Changed(...) to only modify specified fields without overwriting un-flagged spec fields.
  • Error Handling: Gracefully handles missing builds with a user-friendly Build 'xyz' not found in namespace 'default'. error message.
  • Unit Tests: Added comprehensive unit test suite in pkg/shp/cmd/build/update_test.go covering success and NotFound cases (100% passing).

Related Issue

Fixes #411

Type of PR

/kind feature

Submitter Checklist

  • Includes tests if functionality changed/was added
  • Includes docs if changes are user-facing
  • Kind label has been set
  • Release notes block has been filled in, or marked NONE

Release Notes

Added `shp build update <name>` subcommand allowing users to modify existing Build resource specifications directly from the CLI.

Signed-off-by: mohit-bhandari45 <mohitbhandari852@gmail.com>
Signed-off-by: mohit-bhandari45 <mohitbhandari852@gmail.com>
Signed-off-by: mohit-bhandari45 <mohitbhandari852@gmail.com>
Signed-off-by: mohit-bhandari45 <mohitbhandari852@gmail.com>
Copilot AI balanced review requested due to automatic review settings September 11, 2026 07:09
@openshift-ci

openshift-ci Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Details

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.

@pull-request-size pull-request-size Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 11, 2026
@openshift-ci openshift-ci Bot added kind/feature Categorizes issue or PR as related to a new feature. 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 Sep 11, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@openshift-ci

openshift-ci Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign heavywombat for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details 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

@mohit-bhandari45

Copy link
Copy Markdown
Author

@kaizakin Please do request a review, once you get time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. kind/feature Categorizes issue or PR as related to a new feature. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add missing get and update subcommands for build and buildrun

3 participants