-
Notifications
You must be signed in to change notification settings - Fork 333
added node index to current_context #2812
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
base: master
Are you sure you want to change the base?
Conversation
Thank you for opening this pull request! 🙌 These tips will help get your PR across the finish line:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mind adding a small unit test in this file?
https://github.com/flyteorg/flytekit/blob/f394bc95b94798e856649a2b07e2d87528ebd2cb/tests/flytekit/unit/bin/test_python_entrypoint.py#L342-L341
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2812 +/- ##
==========================================
+ Coverage 48.40% 50.59% +2.18%
==========================================
Files 228 216 -12
Lines 23329 22677 -652
Branches 2970 2970
==========================================
+ Hits 11292 11473 +181
+ Misses 11459 10672 -787
+ Partials 578 532 -46 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you run make fmt
locally to fix the lint error?
Will write an unit test and will run formatter too |
i have run make fmt |
f0068b6
to
d0f23d9
Compare
Bito Automatic Review Skipped - Large PR |
Signed-off-by: Atharva <[email protected]>
Signed-off-by: Atharva <[email protected]>
d0f23d9
to
6f06ad8
Compare
Tracking issue
Closes flyteorg/flyte#5534
Why are the changes needed?
In Flyte, when working with map tasks, outputs often risk being overwritten if they share the same static name. For example, if multiple nodes generate output files with the same name, only the last file would remain, as previous ones would be overwritten. By adding the array node index, it becomes possible to uniquely name these outputs, avoiding conflicts.
What changes were proposed in this pull request?
The key goal of this PR is to include the index of an array node in map_tasks within the current_context() returned value. This feature is especially useful when multiple nodes within a map task could potentially overwrite outputs
Summary by Bito
This pull request introduces a new feature that adds the index of an array node to the current context in Flyte, preventing output file overwrites in map tasks. Unit tests have been added to ensure the functionality of this enhancement.