Skip to content

[improve][pip] PIP-312: Use StateStoreProvider to manage state in Pulsar Functions endpoints#21597

Merged
Technoboy- merged 4 commits into
apache:masterfrom
jiangpengcheng:implement_pip_312
Dec 4, 2023
Merged

[improve][pip] PIP-312: Use StateStoreProvider to manage state in Pulsar Functions endpoints#21597
Technoboy- merged 4 commits into
apache:masterfrom
jiangpengcheng:implement_pip_312

Conversation

@jiangpengcheng

Copy link
Copy Markdown
Contributor

PIP: #21438

Motivation

Modifications

Verifying this change

  • Make sure that the change passes the CI checks.

This change is already covered by existing tests, such as (please describe tests).

  • org.apache.pulsar.tests.integration.functions.PulsarStateTest

And this pr enhanced the tests, cover the putstate and state cleanup cases

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository: jiangpengcheng#17

@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Nov 20, 2023
@jiangpengcheng

Copy link
Copy Markdown
Contributor Author

/pulsarbot rerun-failure-checks

@codecov-commenter

codecov-commenter commented Nov 27, 2023

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 57.62712% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.38%. Comparing base (cbdb19c) to head (eb4eaa2).
⚠️ Report is 1476 commits behind head on master.

Files with missing lines Patch % Lines
...ulsar/functions/worker/rest/api/ComponentImpl.java 58.62% 7 Missing and 5 partials ⚠️
...tions/instance/state/BKStateStoreProviderImpl.java 69.23% 3 Missing and 1 partial ⚠️
...ce/state/PulsarMetadataStateStoreProviderImpl.java 0.00% 4 Missing ⚠️
...r/functions/instance/state/StateStoreProvider.java 0.00% 2 Missing ⚠️
...e/pulsar/functions/worker/PulsarWorkerService.java 80.00% 1 Missing and 1 partial ⚠️
...ulsar/functions/instance/JavaInstanceRunnable.java 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #21597      +/-   ##
============================================
+ Coverage     73.27%   73.38%   +0.11%     
- Complexity    32694    32732      +38     
============================================
  Files          1892     1892              
  Lines        140707   140659      -48     
  Branches      15483    15489       +6     
============================================
+ Hits         103098   103227     +129     
+ Misses        29496    29328     -168     
+ Partials       8113     8104       -9     
Flag Coverage Δ
inttests 24.12% <11.86%> (-0.03%) ⬇️
systests 24.70% <57.62%> (+0.05%) ⬆️
unittests 72.68% <1.69%> (+0.11%) ⬆️

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

Files with missing lines Coverage Δ
...ulsar/functions/instance/JavaInstanceRunnable.java 73.05% <0.00%> (+1.44%) ⬆️
...r/functions/instance/state/StateStoreProvider.java 33.33% <0.00%> (-16.67%) ⬇️
...e/pulsar/functions/worker/PulsarWorkerService.java 70.14% <80.00%> (+0.08%) ⬆️
...tions/instance/state/BKStateStoreProviderImpl.java 52.57% <69.23%> (+52.57%) ⬆️
...ce/state/PulsarMetadataStateStoreProviderImpl.java 0.00% <0.00%> (ø)
...ulsar/functions/worker/rest/api/ComponentImpl.java 47.59% <58.62%> (+0.95%) ⬆️

... and 80 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nlu90 nlu90 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@freeznet could you also help take a look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-not-needed Your PR changes do not impact docs ready-to-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants