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

Add MetadataStore methods to PipedService #5469

Merged
merged 2 commits into from
Jan 8, 2025
Merged

Conversation

t-kikuc
Copy link
Member

@t-kikuc t-kikuc commented Jan 8, 2025

What this PR does:

Added the following MetadataStore methods to PipedService:

  • Get (of stage/deployment)
  • Put (of stage/deployment)
  • PutMulti (of stage/deployment)

Why we need it:

Plugins need to Read/Write metadata in Piped-side for the following use cases:

  • A. Some data need to be persisted for valid restarting (e.g. Wait beginning time in Wait Stage Plugin)
  • B. Some data need to be shared across stages (e.g. Canary resources)

Which issue(s) this PR fixes:

Part of #4980

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 Jan 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 26.19%. Comparing base (48be6ed) to head (f49df77).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5469   +/-   ##
=======================================
  Coverage   26.19%   26.19%           
=======================================
  Files         458      458           
  Lines       49169    49169           
=======================================
  Hits        12881    12881           
  Misses      35266    35266           
  Partials     1022     1022           

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

khanhtc1202
khanhtc1202 previously approved these changes Jan 8, 2025
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 👍

Copy link
Contributor

@Warashi Warashi 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!
LGTM except one nitpick.

Comment on lines 122 to 124
message PutStageMetadataResponse {
bool success = 1;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't need success field because we can return error as gRPC error.

Copy link
Member Author

Choose a reason for hiding this comment

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

@Warashi
Thank you! I fixed it f49df77

Signed-off-by: t-kikuc <[email protected]>
@t-kikuc
Copy link
Member Author

t-kikuc commented Jan 8, 2025

@khanhtc1202 Would you please approve again?

Copy link
Contributor

@Warashi Warashi left a comment

Choose a reason for hiding this comment

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

LGTM

@t-kikuc t-kikuc merged commit 5bb4790 into master Jan 8, 2025
18 checks passed
@t-kikuc t-kikuc deleted the plugin/metadatastore-proto branch January 8, 2025 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants