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

[refactor] serdes pack/deserialize APIs #12524

Merged
merged 1 commit into from
Mar 10, 2023
Merged

Conversation

smackesey
Copy link
Collaborator

@smackesey smackesey commented Feb 24, 2023

Summary & Motivation

Consolidate APIs of dagster._serdes and update all callsites to use the new (typed) APIs.

Major change is the consolidation of the various deserialize/serialize/pack/unpack functions used throughout the codebase into just 4 module-public functions, which incorporate typing:

  • deserialize_value
  • serialize_value
  • unpack_value
  • pack_value

*_value was used as opposed to bare e.g. deserialize because serialize_value and deserialize_value are part of our public API. This PR does not break the existing contract of those functions but does add some optional args to them.

There is a significant companion PR for internal here: https://github.com/dagster-io/internal/pull/4974

How I Tested These Changes

BK

@vercel
Copy link

vercel bot commented Feb 24, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Comments Updated
dagit-storybook ⬜️ Ignored (Inspect) Mar 9, 2023 at 11:18PM (UTC)
dagster ⬜️ Ignored (Inspect) Mar 9, 2023 at 11:18PM (UTC)

This was referenced Feb 24, 2023
@smackesey smackesey force-pushed the sean/typing-runtime-serdes branch 2 times, most recently from f005375 to 5dd6dfe Compare February 24, 2023 17:02
@smackesey smackesey force-pushed the sean/refactor-serdes branch 2 times, most recently from b403d5e to 0430200 Compare February 26, 2023 15:41
@smackesey smackesey force-pushed the sean/refactor-serdes branch 2 times, most recently from 7924750 to 378dbbc Compare March 4, 2023 20:26
@smackesey smackesey force-pushed the sean/refactor-serdes branch 2 times, most recently from 5bcadd0 to ebb24e3 Compare March 8, 2023 11:38
@smackesey smackesey changed the title [refactor] serdes [refactor] serdes pack/deserialize APIs Mar 8, 2023
Copy link
Member

@alangenfeld alangenfeld left a comment

Choose a reason for hiding this comment

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

this PR seems to be in a weird stacked state where it contains additional changes - but i think i covered it well enough to believe this is good. Good tidying up on the API.

@@ -497,28 +496,6 @@ def _get_output_asset_materializations(
tags[BACKFILL_ID_TAG] = backfill_id

if asset_partitions:
metadata_mapping: Dict[
Copy link
Member

Choose a reason for hiding this comment

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

are these metadata changes supposed to be in this PR or is this a stacking artifact?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Stacking artifact, this happens in between time when downstack PR lands and target branch gets rebased.

Base automatically changed from sean/typing-runtime-serdes to master March 8, 2023 21:40
@smackesey smackesey force-pushed the sean/refactor-serdes branch 3 times, most recently from 3eb8585 to a8ac04b Compare March 9, 2023 22:55
[INTERNAL_BRANCH=sean/refactor-serdes]
@smackesey smackesey merged commit b04cb79 into master Mar 10, 2023
@smackesey smackesey deleted the sean/refactor-serdes branch March 10, 2023 00:42
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