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

Reduce maptask transitions between WaitingForResources and CheckingSubtaskExecutions #4790

Merged
merged 3 commits into from
Jan 30, 2024

Conversation

hamersaw
Copy link
Contributor

Tracking issue

NA

Why are the changes needed?

In maptask, if any subtasks are in the PhaseWaitingForResources phase then the entire maptask task transitions to that phase. The issue is that the k8s-array plugin uses a transition through PhaseLaunch to get back to PhaseCheckingSubtaskExecutions here. This causes events to be sent to flyteadmin to satisfy the phase update. With this commit flyteadmin began processing phase reason updates in batches, which causes all reason updates to persist in a timeline. The continual transition between PhaseWaitingForResources and PhaseCheckingSubtaskExecutions causes a large amount of duplicated reasons in the time series.

What changes were proposed in this pull request?

This PR proposed to treat PhaseWaitingForResources and PhaseCheckingSubtaskExecutions the same so that events are only sent when subtask phases are updated rather than duplicate transitions between these maptask phases.

How was this patch tested?

Locally.

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

NA

Docs link

NA

@hamersaw hamersaw marked this pull request as ready for review January 30, 2024 02:50
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. enhancement New feature or request labels Jan 30, 2024
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 30, 2024
Copy link

codecov bot commented Jan 30, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (460f0f1) 58.64% compared to head (8592f12) 58.57%.

Files Patch % Lines
...lyteplugins/go/tasks/plugins/array/k8s/executor.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4790      +/-   ##
==========================================
- Coverage   58.64%   58.57%   -0.08%     
==========================================
  Files         590      624      +34     
  Lines       51473    53627    +2154     
==========================================
+ Hits        30187    31411    +1224     
- Misses      18861    19698     +837     
- Partials     2425     2518      +93     
Flag Coverage Δ
unittests 58.57% <50.00%> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@hamersaw hamersaw merged commit f8a1317 into master Jan 30, 2024
43 of 45 checks passed
@hamersaw hamersaw deleted the bug/maptask-waiting-for-resources branch January 30, 2024 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants