Skip to content

[fix][fn] Fix function update error#19895

Merged
Technoboy- merged 4 commits into
apache:masterfrom
jiangpengcheng:fix_function_update
May 31, 2023
Merged

[fix][fn] Fix function update error#19895
Technoboy- merged 4 commits into
apache:masterfrom
jiangpengcheng:fix_function_update

Conversation

@jiangpengcheng

@jiangpengcheng jiangpengcheng commented Mar 22, 2023

Copy link
Copy Markdown
Contributor

Fixes #19721

Master Issue: #xyz

PIP: #xyz

Motivation

functions are failed to update when --py|--go|--jar is specified

Modifications

add 1 to functions' version when uploading package while updating functions

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

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

(or)

  • This change added tests and can be verified as follows:

    • Added integration tests for updating function code file

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#8

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

Copy link
Copy Markdown
Contributor Author

/pulsarbot rerun-failure-checks

@nlu90

nlu90 commented Mar 27, 2023

Copy link
Copy Markdown
Member

Without this fix, when users update a function with the new jar, py or go binary, they will get the following error:

➜  apache-pulsar-2.11.0 ./bin/pulsar-admin functions update \
--py examples/python-examples/exclamation_function.py \
--classname python-examples.ExclamationFunction \
--inputs public/default/test \
--output public/default/test-output2 \
--name ExPy2 \

Package 'function://public/default/ExPy2@0' metadata already exists

@jiangpengcheng

Copy link
Copy Markdown
Contributor Author

/pulsarbot rerun-failure-checks

2 similar comments
@jiangpengcheng

Copy link
Copy Markdown
Contributor Author

/pulsarbot rerun-failure-checks

@jiangpengcheng

Copy link
Copy Markdown
Contributor Author

/pulsarbot rerun-failure-checks

@codecov-commenter

codecov-commenter commented Apr 3, 2023

Copy link
Copy Markdown

Codecov Report

Merging #19895 (efe0969) into master (a22700d) will increase coverage by 35.21%.
The diff coverage is 100.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##             master   #19895       +/-   ##
=============================================
+ Coverage     37.66%   72.88%   +35.21%     
- Complexity      345    31942    +31597     
=============================================
  Files          1691     1868      +177     
  Lines        129004   138548     +9544     
  Branches      14071    15246     +1175     
=============================================
+ Hits          48592   100978    +52386     
+ Misses        74114    29521    -44593     
- Partials       6298     8049     +1751     
Flag Coverage Δ
inttests 24.18% <0.00%> (-0.04%) ⬇️
systests 24.78% <66.66%> (-0.09%) ⬇️
unittests 72.16% <100.00%> (+39.00%) ⬆️

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

Impacted Files Coverage Δ
...ulsar/functions/worker/rest/api/FunctionsImpl.java 56.88% <100.00%> (+20.38%) ⬆️
...he/pulsar/functions/worker/rest/api/SinksImpl.java 56.77% <100.00%> (+21.33%) ⬆️
.../pulsar/functions/worker/rest/api/SourcesImpl.java 57.82% <100.00%> (+20.63%) ⬆️

... and 1425 files with indirect coverage changes

@github-actions

github-actions Bot commented May 3, 2023

Copy link
Copy Markdown

The pr had no activity for 30 days, mark with Stale label.

@github-actions github-actions Bot added the Stale label May 3, 2023
@jiangpengcheng jiangpengcheng force-pushed the fix_function_update branch from aff1693 to efe0969 Compare May 4, 2023 01:56
@jiangpengcheng

Copy link
Copy Markdown
Contributor Author

/pulsarbot rerun-failure-checks

@github-actions github-actions Bot removed the Stale label May 5, 2023
@nlu90 nlu90 requested review from freeznet and nlu90 May 15, 2023 17:36
@Technoboy- Technoboy- added this to the 3.1.0 milestone May 18, 2023
@Technoboy-

Copy link
Copy Markdown
Contributor

@nlu90 Do we need to cherry-pick to other branches for this patch ?

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.

[Bug] Cannot update Pulsar function in Pulsar standalone

6 participants