flytekit
flytekit copied to clipboard
Rename ephemeral_storage to disk for simplicity
Tracking issue
Closes https://github.com/flyteorg/flyte/issues/6142.
Why are the changes needed?
The attribute ephemeral_storage of Resources (i.e., K8s pod resources) is too complicated and should be simplified.
What changes were proposed in this pull request?
At this stage, we propose to support both disk and ephemeral_storage for backward compatibility.
The behavior of different configurations is summarized as follows:
- Both
diskandephemeral_storageare specified: Raise an error ephemeral_storageis used: Warn users about the future deprecationdiskis used: Usediskdirectly and allowephemeral_storageto mirrordiskvalue
How was this patch tested?
Setup process
Screenshots
Check all the applicable boxes
- [ ] I updated the documentation accordingly.
- [ ] All new and existing tests passed.
- [x] All commits are signed-off.
Related PRs
Docs link
Summary by Bito
This PR renames 'ephemeral_storage' to 'disk' in the Resources class while maintaining backward compatibility through deprecation warnings. The implementation allows both attributes to function, with 'ephemeral_storage' mirroring the 'disk' value. The changes include comprehensive test coverage and improved parameter handling for better code clarity.Unit tests added: True
Estimated effort to review (1-5, lower is better): 1