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

proof of concept refactor of FlyteRemote._version_from_hash (todo: needs tests, linting) #2688

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ddl-rliu
Copy link
Contributor

Tracking issue

Why are the changes needed?

What changes were proposed in this pull request?

How was this patch tested?

Setup process

Screenshots

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

Docs link

@ddl-rliu ddl-rliu changed the title proof of concept (todo: needs tests, linting) proof of concept refactor of FlyteRemote._version_from_hash (todo: needs tests, linting) Aug 16, 2024
Comment on lines 942 to 946
def _version_from_hash(
md5_bytes: bytes,
serialization_settings: SerializationSettings,
default_inputs: typing.Optional[Dict[str, typing.Any]] = None,
*additional_context: str,
entity: typing.Union[PythonAutoContainerTask, WorkflowBase],
) -> str:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

A plugin can implement a subclass of FlyteRemote which overrides _version_from_hash to control the version hash calculation (idea from here)

A concern with this idea is that if future PRs modify the behavior of FlyteRemote._version_from_hash, it may become out-of-sync with the custom subclass of FlyteRemote. On the other hand, such an occurrence may be very rare in practice.

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.

1 participant