Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Only create copilot sidecars if interface requires #314

Merged
merged 2 commits into from
Feb 9, 2023

Conversation

hamersaw
Copy link
Contributor

TL;DR

Currently, Flyte injects a copilot init container to download inputs and a sidecar container to upload outputs of a task. This process only checks if the interface has inputs / outputs defined as nil, rather then checking if the variable list exists and is empty as well. This means, depending on the definition, Flyte may inject a container to, for example, upload the outputs of a task when that task does not have any outputs. This PR validates variable existence to ensure copilot sidcars are not unnecessarily created.

Type

  • Bug Fix
  • Feature
  • Plugin

Are all requirements met?

  • Code completed
  • Smoke tested
  • Unit tests added
  • Code documentation added
  • Any pending items have an associated Issue

Complete description

^^^

Tracking Issue

fixes flyteorg/flyte#3254

Follow-up issue

NA

Signed-off-by: Daniel Rammer <[email protected]>
@codecov
Copy link

codecov bot commented Feb 9, 2023

Codecov Report

Merging #314 (4385b32) into master (109224c) will decrease coverage by 0.12%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #314      +/-   ##
==========================================
- Coverage   63.02%   62.90%   -0.12%     
==========================================
  Files         148      146       -2     
  Lines       12148    12162      +14     
==========================================
- Hits         7656     7651       -5     
- Misses       3912     3934      +22     
+ Partials      580      577       -3     
Flag Coverage Δ
unittests 62.90% <100.00%> (-0.12%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
go/tasks/pluginmachinery/flytek8s/copilot.go 90.23% <100.00%> (ø)
go/tasks/pluginmachinery/flytek8s/pod_helper.go 75.27% <0.00%> (-8.79%) ⬇️
...tasks/pluginmachinery/flytek8s/container_helper.go 87.17% <0.00%> (-2.54%) ⬇️
go/tasks/plugins/k8s/pod/plugin.go 80.39% <0.00%> (-2.50%) ⬇️
go/tasks/plugins/array/catalog.go 45.04% <0.00%> (-2.11%) ⬇️
go/tasks/plugins/array/core/state.go 71.34% <0.00%> (-0.63%) ⬇️
go/tasks/plugins/array/k8s/subtask.go 30.49% <0.00%> (ø)
go/tasks/pluginmachinery/tasklog/template.go 96.96% <0.00%> (ø)
...sks/pluginmachinery/flytek8s/pod_template_store.go 100.00% <0.00%> (ø)
go/tasks/plugins/k8s/pod/container.go
... and 9 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@hamersaw hamersaw merged commit 5e75228 into master Feb 9, 2023
@hamersaw hamersaw deleted the bug/fix-sidecar-creation branch February 9, 2023 15:47
eapolinario pushed a commit that referenced this pull request Sep 6, 2023
* not creating sidecar uploader or downloader unnecessarily

Signed-off-by: Daniel Rammer <[email protected]>

* check on nil map is unnecessary

Signed-off-by: Daniel Rammer <[email protected]>

---------

Signed-off-by: Daniel Rammer <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] copilot uploader sidecar is started even if no outputs are defined
2 participants