Add trigger id owner to LiteralsToLaunchFormJsonRequest#7532
Open
katrogan wants to merge 2 commits into
Open
Conversation
Signed-off-by: Katrina Rogan <katroganGH@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the TranslatorService.LiteralsToLaunchFormJson API to support converting launch-form JSON directly from a trigger’s offloaded inputs, by introducing a new owner oneof on LiteralsToLaunchFormJsonRequest and adding dataproxy logic to fetch trigger details and read the referenced inputs from storage.
Changes:
- Updated
LiteralsToLaunchFormJsonRequestto use aoneof owner(eitheraction_idortrigger_id) and regenerated Go bindings/validation. - Added dataproxy support for
trigger_idby callingTriggerService.GetTriggerRevisionDetailsand readingoffloaded_input_data.urifrom storage. - Updated dataproxy setup wiring and added unit tests covering trigger-based translation and missing offloaded data.
Reviewed changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| gen/go/flyteidl2/workflow/translator_service.pb.validate.go | Regenerated validation to handle the new owner oneof and validate embedded identifiers. |
| gen/go/flyteidl2/workflow/translator_service.pb.go | Regenerated Go types/getters for the owner oneof (action_id / trigger_id). |
| flyteidl2/workflow/translator_service.proto | Introduced oneof owner with action_id and trigger_id and clarified literals_uri semantics. |
| dataproxy/translator.go | Added trigger-path logic and storage reads for trigger offloaded inputs. |
| dataproxy/translator_test.go | Added tests for trigger-based translation and missing offloaded input data; updated action-owner construction. |
| dataproxy/setup.go | Wired TriggerServiceClient into TranslatorService construction. |
Files not reviewed (2)
- gen/go/flyteidl2/workflow/translator_service.pb.go: Generated file
- gen/go/flyteidl2/workflow/translator_service.pb.validate.go: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
44
to
+48
| literals := req.Msg.GetLiterals() | ||
| if req.Msg.GetLiteralsUri() != "" { | ||
| switch { | ||
| case req.Msg.GetTriggerId() != nil: | ||
| var err error | ||
| literals, err = s.readTriggerLiterals(ctx, req.Msg.GetTriggerId()) |
Comment on lines
+103
to
+125
| func (s *TranslatorService) readTriggerLiterals( | ||
| ctx context.Context, | ||
| triggerID *common.TriggerIdentifier, | ||
| ) ([]*task.NamedLiteral, error) { | ||
| resp, err := s.triggerClient.GetTriggerRevisionDetails(ctx, connect.NewRequest(&trigger.GetTriggerRevisionDetailsRequest{ | ||
| Id: triggerID, | ||
| })) | ||
| if err != nil { | ||
| return nil, err | ||
| } | ||
|
|
||
| uri := resp.Msg.GetTrigger().GetSpec().GetOffloadedInputData().GetUri() | ||
| if uri == "" { | ||
| return nil, connect.NewError(connect.CodeInvalidArgument, | ||
| fmt.Errorf("trigger %s has no offloaded input data", triggerID.GetName().GetName())) | ||
| } | ||
|
|
||
| var inputs task.Inputs | ||
| if err := s.dataStore.ReadProtobuf(ctx, storage.DataReference(uri), &inputs); err != nil { | ||
| return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("failed to read trigger literals from %s: %w", uri, err)) | ||
| } | ||
| return inputs.GetLiterals(), nil | ||
| } |
pingsutw
approved these changes
Jun 16, 2026
Member
|
Could we update the PR description |
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.
Tracking issue
Why are the changes needed?
What changes were proposed in this pull request?
How was this patch tested?
Labels
Please add one or more of the following labels to categorize your PR:
This is important to improve the readability of release notes.
Setup process
Screenshots
Check all the applicable boxes
Related PRs
Stack
If you do use
git townto manage PR Stacks, the stack relevant to this PRwill show below. Otherwise, you can ignore this section.
Docs link