feat(ui): surface PromotionRequests when promoting to target-aware Stages - #6814
Draft
jsbroks wants to merge 2 commits into
Draft
feat(ui): surface PromotionRequests when promoting to target-aware Stages#6814jsbroks wants to merge 2 commits into
jsbroks wants to merge 2 commits into
Conversation
added 2 commits
August 13, 2026 16:15
Adds GET /projects/{project}/promotion-requests (list, optionally filtered
by stage, with watch support) and GET .../promotion-requests/{name},
modelled directly on the Promotion equivalents including the in-process
stage filtering that the uncached watch-seed reader forces.
Grants project users read-only access to PromotionRequests. They still
cannot create, edit, or delete one -- the Stage controller and the API
server own that -- but they can read one, because when a target-aware
Stage stops promoting, the PromotionRequest's status is the only place
the reason is recorded. Withholding reads made the resource inert at the
cost of making the failure invisible, which is the wrong trade for the
object a user's own promotion just produced.
Signed-off-by: Justin Brooks <justin.brooks@akuity.io>
Dragging Freight onto a target-aware Stage produced a PromotionRequest, and then the UI did two unhelpful things with it: the promote drawer navigated to the Promotion detail route using the PromotionRequest's name, landing on a page for an object that does not exist; and the Stage's Promotions tab, which lists only Promotions, stayed empty. The user was left with no evidence their promotion had happened at all. The promote drawer now sends the user to the Stage instead when the Stage is target-aware, and the Promotions tab lists that Stage's PromotionRequests above the Promotions table -- phase, Freight, and either the resolved Targets or a note that the selectors are still unresolved. When a request carries a Ready=False condition, its message is shown as a warning above the table, so "nothing happened" comes with its reason attached. isStageTargetAware mirrors api.IsTargetAware on the back end, testing for a present selector list rather than a non-empty one, so a Stage with an explicitly empty list is still treated as target-aware. Signed-off-by: Justin Brooks <justin.brooks@akuity.io>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## justin/create-promotion-requests #6814 +/- ##
====================================================================
- Coverage 30.96% 30.61% -0.35%
====================================================================
Files 829 838 +9
Lines 80900 81903 +1003
====================================================================
+ Hits 25048 25073 +25
- Misses 54390 55366 +976
- Partials 1462 1464 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
thomastaylor312
approved these changes
Aug 14, 2026
thomastaylor312
left a comment
Contributor
There was a problem hiding this comment.
The backend changes are good. Have a UI person take a look at this once you move out of draft and they can give final approval
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Stacked on #6805. Only the last two commits are new here. Because the repo squash-merges, this will need
git rebase --onto origin/main <#6805 tip> justin/promotion-request-uionce #6805 lands.Description
Makes drag-and-drop promotion onto a target-aware Stage work end to end in the UI, and shows what became of the resulting PromotionRequest.
Before this, dragging Freight onto a target-aware Stage left the user with nothing to look at:
onSuccessnavigated to the Promotion detail route using the returned PromotionRequest's name, landing on a page for an object that does not exist;Back end
GET /v1beta1/projects/{project}/promotion-requests— list, optional?stage=filter, watch support. Modelled onlistPromotions, including the in-process stage filtering that the uncached watch-seed reader requires.GET /v1beta1/projects/{project}/promotion-requests/{promotion-request}— get + watch.get/list/watch) to PromotionRequests. Still no create/update/delete for anyone — the Stage controller and API server own writes.Front end
Ready=Falsecondition is surfaced as a warning banner with its message, so "nothing happened" arrives with its reason.isStageTargetAwaremirrorsapi.IsTargetAware, testing for a present selector list rather than a non-empty one.A note on the RBAC change
#6789 deliberately gave users no access to PromotionRequests, so the resource would be inert. This PR softens that to read-only, on the grounds that "inert" should mean a user cannot drive the feature, not that they cannot see why their own promotion did nothing. Writes remain closed, and
kubectl edit promotionrequestis still denied.Validation
make lint-go,make test-chart,make typecheck-ui,pnpm --dir=ui lintgo test ./pkg/server/... ./pkg/controller/management/projects/...Manual: drag Freight onto a target-aware Stage in the pipeline view, confirm the drawer closes to the Stage and the Promotions tab shows the request with its status.
🤖 Generated with Claude Code