Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add requests and limits parameter to ContainerTask #438

Merged
merged 3 commits into from
Mar 29, 2021

Conversation

migueltol22
Copy link
Contributor

@migueltol22 migueltol22 commented Mar 29, 2021

TL;DR

This allows a user to be able to set Resources limits and requests for containerTasks.

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

How did you fix the bug, make the feature etc. Link to any design docs etc

Tracking Issue

flyteorg/flyte#877

Follow-up issue

NA

Signed-off-by: Miguel Toledo <[email protected]>
@codecov
Copy link

codecov bot commented Mar 29, 2021

Codecov Report

Merging #438 (7dcc1b9) into master (12cae6a) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #438      +/-   ##
==========================================
+ Coverage   84.25%   84.26%   +0.01%     
==========================================
  Files         338      338              
  Lines       25528    25533       +5     
  Branches     2095     2095              
==========================================
+ Hits        21509    21516       +7     
+ Misses       3449     3448       -1     
+ Partials      570      569       -1     
Impacted Files Coverage Δ
flytekit/core/container_task.py 86.04% <100.00%> (+1.83%) ⬆️
...ests/flytekit/unit/common_tests/test_translator.py 91.52% <100.00%> (ø)
flytekit/common/tasks/raw_container.py 87.69% <0.00%> (+3.07%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 12cae6a...7dcc1b9. Read the comment docs.

@@ -92,6 +92,7 @@ def t1(a: int) -> (int, str):
output_data_dir="/tmp",
command=["cat"],
arguments=["/tmp/a"],
requests=Resources(mem="400Mi", cpu="1"),
Copy link
Contributor

Choose a reason for hiding this comment

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

lets add an example without the resources specified. (I know you have the defaulting behavior, but just a gate)

@kumare3
Copy link
Contributor

kumare3 commented Mar 29, 2021

LGTM, one comment. and please sign the DCO

Signed-off-by: Miguel Toledo <[email protected]>
@kumare3 kumare3 self-requested a review March 29, 2021 20:41
kumare3
kumare3 previously approved these changes Mar 29, 2021
@migueltol22 migueltol22 force-pushed the mtoledo/containerTask-resources branch 2 times, most recently from 0d73743 to 7dcc1b9 Compare March 29, 2021 21:04
@kumare3 kumare3 self-requested a review March 29, 2021 21:25
@migueltol22 migueltol22 merged commit 36536b8 into master Mar 29, 2021
@migueltol22 migueltol22 deleted the mtoledo/containerTask-resources branch March 29, 2021 21:28
max-hoffman pushed a commit to dolthub/flytekit that referenced this pull request Apr 29, 2021
* add requests and limits parameter

Signed-off-by: Miguel Toledo <[email protected]>

* fix typo

Signed-off-by: Miguel Toledo <[email protected]>

* signoff

Signed-off-by: Miguel Toledo <[email protected]>
Signed-off-by: Max Hoffman <[email protected]>
max-hoffman pushed a commit to dolthub/flytekit that referenced this pull request May 11, 2021
* add requests and limits parameter

Signed-off-by: Miguel Toledo <[email protected]>

* fix typo

Signed-off-by: Miguel Toledo <[email protected]>

* signoff

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

Successfully merging this pull request may close these issues.

2 participants