<#4116 [Housekeeping] Remove storage as a task res...
# flyte-github
a
#4116 [Housekeeping] Remove storage as a task resource option Pull request opened by Kota-Karthik Tracking issue closes #3955 Describe your changes I made changes to the
ApplyResourceOverrides
function to ensure that user-specified resource requests and limits are respected without being overridden by default values, except when explicitly requested. Here are the key changes I made: 1. Introduced a new flag
assignIfUnset
to control whether default values should be assigned. This flag is used to determine whether the code should apply default values for resources. 2. Modified the behavior inside the function to check the
assignIfUnset
flag before applying default values. When
assignIfUnset
is set to
true
, default values will be assigned only if the user hasn't already specified resource requests and limits. 3. Added conditional checks for each resource type (e.g., CPU, memory, ephemeral storage, GPU) to ensure that the default values are applied only if the user has not already set resource requirements. 4. Removed the assignment of default values for storage resources (
v1.ResourceStorage
) based on the flag
assignIfUnset
. This allows users to set their own storage requirements without being overridden by defaults. 5. Introduced the
shouldAdjustGPU
flag to determine whether GPU resource adjustments are necessary. GPU resources are now adjusted based on user-specified values, and the
gpuResourceName
is used for customization. 6. Updated the comments to reflect the changes made and provide context for the
assignIfUnset
flag and resource adjustments. These changes ensure that users can set their desired resource requirements, and the code will respect their choices without applying default values unless explicitly requested by setting
assignIfUnset
to
true
. This provides greater flexibility and control to users when specifying resource requirements for their tasks. Check all the applicable boxes ☐ I updated the documentation accordingly. ☑︎ All new and existing tests passed. ☑︎ All commits are signed-off. Note to reviewers @samhita-alla As per your instruction, I have created the Pull Request. I kindly request you to review it at your earliest convenience. flyteorg/flyte GitHub Actions: Build & Push Image GitHub Actions: Bump git tags Codecov: 57.68% (-1.30%) compared to b35cc95 GitHub Actions: Unit Tests (flyteplugins) / Run Unit Test GitHub Actions: Lint (flyteplugins) / Run Lint ✅ 25 other checks have passed 25/30 successful checks