[Flyteconnector] Construct pod spec and render arguments#7270
Merged
Sovietaced merged 2 commits intoApr 27, 2026
Merged
Conversation
Contributor
|
thanks @madiyar-wayve. Could you fix the DCO test? |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #7270 +/- ##
=======================================
Coverage 56.96% 56.96%
=======================================
Files 931 931
Lines 58247 58277 +30
=======================================
+ Hits 33179 33198 +19
- Misses 22014 22019 +5
- Partials 3054 3060 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
pingsutw
reviewed
Apr 24, 2026
Member
pingsutw
left a comment
There was a problem hiding this comment.
Thanks, looks good to me. there are some unit tests are failing, could you take a look
Signed-off-by: madiyar-wayve <[email protected]>
e15a430 to
fe0faa4
Compare
Author
|
@pingsutw thanks for taking a look! I fixed lint and DCO tests, can you re-run the tests please? |
Sovietaced
approved these changes
Apr 27, 2026
|
Congrats on merging your first pull request! 🎉 |
nuthalapativarun
pushed a commit
to nuthalapativarun/flyte
that referenced
this pull request
May 1, 2026
Signed-off-by: madiyar-wayve <[email protected]> Co-authored-by: Jason Parraga <[email protected]> Signed-off-by: Varun Nuthalapati <[email protected]>
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
Closes: #7227.
Why are the changes needed?
The Flyte connector (and agent) webapi plugins don't build a K8s pod spec and render command arguments when the task template target is
K8sPodinstead ofContainer. As a result, agents executingk8s_pod_taskworkloads receive literal template placeholders like{{.input}}and{{.outputPrefix}}instead of resolved values, causing the task to fail. The plugin should construct the pod spec and render arguments forK8sPodtargets, just like it already does forContainertargets.What changes were proposed in this pull request?
In the
Createmethod of bothflyteplugins/go/tasks/plugins/webapi/agent/plugin.goand.../connector/plugin.go, handle theK8sPodtarget in addition toContainer:webapi.TaskExecutionContexttocore.TaskExecutionContextand callflytek8s.ToK8sPodSpec(...)to build a fully rendered pod spec.PodSpecinto astructpb.Struct, temporarily swap it ontotaskTemplate.GetK8SPod().PodSpecfor theCreateTaskRequest, and restore the original viadefer(mirroring the existing container-args pattern).How was this patch tested?
Added an end-to-end test
run a k8s_pod task with rendered template argsin bothagent/integration_test.goandconnector/integration_test.go. The test submits aK8sPodtemplate with{{.input}}/{{.outputPrefix}}in container args and uses amock.MatchedBymatcher onCreateTaskto assert the received pod spec contains no{{placeholders; a fallback expectation fails the test if an unrendered request slips through.Labels
Setup process
N/A
Screenshots
N/A
Check all the applicable boxes