flytekit icon indicating copy to clipboard operation
flytekit copied to clipboard

Rename ephemeral_storage to disk for simplicity

Open JiangJiaWei1103 opened this issue 11 months ago • 6 comments

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:

  1. Both disk and ephemeral_storage are specified: Raise an error
  2. ephemeral_storage is used: Warn users about the future deprecation
  3. disk is used: Use disk directly and allow ephemeral_storage to mirror disk value

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

JiangJiaWei1103 avatar Jan 25 '25 15:01 JiangJiaWei1103