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

Make array_node_map_task the default map_task #2242

Merged
merged 12 commits into from
Mar 14, 2024
Merged

Conversation

eapolinario
Copy link
Collaborator

@eapolinario eapolinario commented Mar 6, 2024

Tracking issue

NA

Why are the changes needed?

Array node map tasks have been present in the SDK for a long time. Time to rip off the bandaid and make them the default map_task.

What changes were proposed in this pull request?

A few changes:

  1. Modify the exported symbol map_task to point to array_node_map_task.
  2. Remove array_node_map_task from the experimental module.
  3. Move legacy map task to a module named legacy_map_task
  4. Modify how the map_task resolvers are loaded, instead of relying on flags to instantiate specific resolvers, we use the resolver name to produce a valid reference.

How was this patch tested?

Unit tests and local runs using sandbox.

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

Signed-off-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Eduardo Apolinario <[email protected]>
… map task module to `legacy_map_task`

Signed-off-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Eduardo Apolinario <[email protected]>
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Mar 6, 2024
@eapolinario eapolinario changed the title Swap map task Make array_node_map_task the default map_task Mar 6, 2024
Copy link

codecov bot commented Mar 6, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 85.98%. Comparing base (eb20459) to head (cc9db4c).
Report is 25 commits behind head on master.

Files Patch % Lines
flytekit/core/array_node_map_task.py 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2242      +/-   ##
==========================================
+ Coverage   84.74%   85.98%   +1.24%     
==========================================
  Files         315      320       +5     
  Lines       24142    24250     +108     
  Branches     3666     3667       +1     
==========================================
+ Hits        20458    20852     +394     
+ Misses       3025     2746     -279     
+ Partials      659      652       -7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Mar 6, 2024
@@ -19,6 +19,7 @@ google-cloud-bigquery-storage
IPython
keyrings.alt
setuptools_scm
pytest-icdiff
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This gives better diffs in case of failures: https://github.com/hjwp/pytest-icdiff

Signed-off-by: Eduardo Apolinario <[email protected]>
@dosubot dosubot bot added the lgtm This PR has been approved by maintainer label Mar 6, 2024
@eapolinario eapolinario merged commit 4767fd8 into master Mar 14, 2024
88 of 92 checks passed
austin362667 pushed a commit to austin362667/flytekit that referenced this pull request Mar 16, 2024
* Swap arraynode map_task

Signed-off-by: Eduardo Apolinario <[email protected]>

* Fix unit tests

Signed-off-by: Eduardo Apolinario <[email protected]>

* Add pytest-icdiff to dev-requirements.in

Signed-off-by: Eduardo Apolinario <[email protected]>

* Fix test_node_creation.py tests

Signed-off-by: Eduardo Apolinario <[email protected]>

* Remove array_node_map_task from experimental module and rename legacy map task module to `legacy_map_task`

Signed-off-by: Eduardo Apolinario <[email protected]>

* Lint

Signed-off-by: Eduardo Apolinario <[email protected]>

* Fix one more mention to legacy map task code

Signed-off-by: Eduardo Apolinario <[email protected]>

* Remove `--experimental` and include `--legacy`

Signed-off-by: Eduardo Apolinario <[email protected]>

* Fix flytekit-k8s-pod/tests/test_pod.py test

Signed-off-by: Eduardo Apolinario <[email protected]>

* Remove the `--legacy` flag and rearrange how the map task resolvers are loaded

Signed-off-by: Eduardo Apolinario <[email protected]>

* Remove map task resolver imports from entrypoint

Signed-off-by: Eduardo Apolinario <[email protected]>

* Fix name in k8s-pod plugin

Signed-off-by: Eduardo Apolinario <[email protected]>

---------

Signed-off-by: Eduardo Apolinario <[email protected]>
Co-authored-by: Eduardo Apolinario <[email protected]>
fiedlerNr9 pushed a commit that referenced this pull request Jul 25, 2024
* Swap arraynode map_task

Signed-off-by: Eduardo Apolinario <[email protected]>

* Fix unit tests

Signed-off-by: Eduardo Apolinario <[email protected]>

* Add pytest-icdiff to dev-requirements.in

Signed-off-by: Eduardo Apolinario <[email protected]>

* Fix test_node_creation.py tests

Signed-off-by: Eduardo Apolinario <[email protected]>

* Remove array_node_map_task from experimental module and rename legacy map task module to `legacy_map_task`

Signed-off-by: Eduardo Apolinario <[email protected]>

* Lint

Signed-off-by: Eduardo Apolinario <[email protected]>

* Fix one more mention to legacy map task code

Signed-off-by: Eduardo Apolinario <[email protected]>

* Remove `--experimental` and include `--legacy`

Signed-off-by: Eduardo Apolinario <[email protected]>

* Fix flytekit-k8s-pod/tests/test_pod.py test

Signed-off-by: Eduardo Apolinario <[email protected]>

* Remove the `--legacy` flag and rearrange how the map task resolvers are loaded

Signed-off-by: Eduardo Apolinario <[email protected]>

* Remove map task resolver imports from entrypoint

Signed-off-by: Eduardo Apolinario <[email protected]>

* Fix name in k8s-pod plugin

Signed-off-by: Eduardo Apolinario <[email protected]>

---------

Signed-off-by: Eduardo Apolinario <[email protected]>
Co-authored-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Jan Fiedler <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by maintainer size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants