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

[SDK] Refine StageLogPersister handling in SDK #5588

Merged
merged 2 commits into from
Feb 20, 2025
Merged

Conversation

Warashi
Copy link
Contributor

@Warashi Warashi commented Feb 19, 2025

What this PR does:

  • define type sdk.StageLogPersister and replace logpersister.StageLogPersister with it.
  • Add graceful shutdown handling in ExecuteStage

Why we need it:

  • The Complete method of StageLogPersister is called only in SDK, so hide it from SDK users.
  • We have to handle graceful shutdown to implement plugins correctly, but it's difficult for users who don't know the piped behavior. So, I want to do it in SDK.

Which issue(s) this PR fixes:

Part of #5530

Does this PR introduce a user-facing change?:

  • How are users affected by this change:
  • Is this breaking change:
  • How to migrate (if breaking change):

Copy link

codecov bot commented Feb 19, 2025

Codecov Report

Attention: Patch coverage is 3.84615% with 25 lines in your changes missing coverage. Please review.

Project coverage is 26.27%. Comparing base (75dedd4) to head (6e93735).
Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
pkg/plugin/sdk/deployment.go 0.00% 21 Missing ⚠️
pkg/app/pipedv1/plugin/wait/wait.go 33.33% 2 Missing ⚠️
pkg/plugin/sdk/client.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5588      +/-   ##
==========================================
- Coverage   26.28%   26.27%   -0.01%     
==========================================
  Files         470      470              
  Lines       50353    50372      +19     
==========================================
  Hits        13234    13234              
- Misses      36059    36078      +19     
  Partials     1060     1060              

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

@Warashi Warashi marked this pull request as ready for review February 19, 2025 08:32
Copy link
Member

@khanhtc1202 khanhtc1202 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@Warashi Warashi enabled auto-merge (squash) February 19, 2025 23:42
Copy link
Member

@t-kikuc t-kikuc left a comment

Choose a reason for hiding this comment

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

Thank you!

@Warashi Warashi merged commit 7d9c00c into master Feb 20, 2025
16 of 18 checks passed
@Warashi Warashi deleted the sdk-logpersister branch February 20, 2025 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants