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

chore: rename and respect pipeline.deletionGracePeriodSeconds #2226

Merged
merged 2 commits into from
Nov 18, 2024

Conversation

whynowy
Copy link
Member

@whynowy whynowy commented Nov 18, 2024

  1. It should be called deletionGracePeriodSeconds as a common practice in spec.lifecycle and fix the doc.
  2. Respect pipeline.deletionGracePeriodSeconds as well.

@whynowy whynowy requested a review from vigith as a code owner November 18, 2024 22:03
@whynowy whynowy changed the title chore: change deleteGracePeriodSeconds to deletionGracePeriodSeconds chore: rename and respect pipeline.deletionGracePeriodSeconds Nov 18, 2024
@whynowy whynowy requested a review from kohlisid November 18, 2024 22:28
Copy link

codecov bot commented Nov 18, 2024

Codecov Report

Attention: Patch coverage is 59.25926% with 11 lines in your changes missing coverage. Please review.

Project coverage is 63.87%. Comparing base (8f7132d) to head (41a52b8).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
pkg/apis/numaflow/v1alpha1/pipeline_types.go 80.00% 2 Missing and 1 partial ⚠️
server/apis/v1/handler.go 0.00% 3 Missing ⚠️
pkg/reconciler/pipeline/controller.go 66.66% 2 Missing ⚠️
server/apis/v1/health.go 0.00% 2 Missing ⚠️
pkg/reconciler/vertex/scaling/scaling.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2226      +/-   ##
==========================================
- Coverage   64.07%   63.87%   -0.21%     
==========================================
  Files         338      338              
  Lines       41136    41142       +6     
==========================================
- Hits        26358    26279      -79     
- Misses      13712    13795      +83     
- Partials     1066     1068       +2     

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


🚨 Try these New Features:

@kohlisid
Copy link
Contributor

@whynowy When we are doing a rolling update to a pipeline, we do a phase paused and then deletion right?
Will the expectation from the users perspective be to honor the pausetimeout first if pausetimeout > deletiontimeout

@whynowy
Copy link
Member Author

whynowy commented Nov 18, 2024

@whynowy When we are doing a rolling update to a pipeline, we do a phase paused and then deletion right? Will the expectation from the users perspective be to honor the pausetimeout first if pausetimeout > deletiontimeout

Let's not make it complicated, but let the upper layer make the decision about how to utilize those timeout settings.

return *p.Spec.Lifecycle.DeprecatedDeleteGracePeriodSeconds
}
if p.DeletionGracePeriodSeconds != nil {
return *p.DeletionGracePeriodSeconds
}
return 30
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we make this as a constant

return *lc.PauseGracePeriodSeconds
func (p Pipeline) GetPauseGracePeriodSeconds() int64 {
if p.Spec.Lifecycle.PauseGracePeriodSeconds != nil {
return *p.Spec.Lifecycle.PauseGracePeriodSeconds
}
return 30
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we make this as a constant

Copy link
Member Author

Choose a reason for hiding this comment

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

Not a big fan of making it as a constant if it's only used in one place - considering there's some other things need to be updated (but could not use the constant, // +kubebuilder:default=30) when we want to make a change. In that case, prefer to keep them as close as possible. No strong opinion though.

Copy link
Contributor

@kohlisid kohlisid left a comment

Choose a reason for hiding this comment

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

LGTM!
Small nits

@kohlisid
Copy link
Contributor

@whynowy +1 for not adding the complexity layer of checking here.
I wanted to confirm our expectation

@whynowy whynowy merged commit 4924046 into numaproj:main Nov 18, 2024
25 checks passed
@whynowy whynowy deleted the termi branch November 18, 2024 23:29
yhl25 pushed a commit that referenced this pull request Dec 5, 2024
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.

3 participants