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

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

Merged
merged 4 commits into from May 31, 2023

Conversation

jiangpengcheng
Copy link
Contributor

@jiangpengcheng jiangpengcheng commented Mar 22, 2023

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
Contributor Author

/pulsarbot rerun-failure-checks

@nlu90
Copy link
Member

nlu90 commented Mar 27, 2023

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
Contributor Author

/pulsarbot rerun-failure-checks

2 similar comments
@jiangpengcheng
Copy link
Contributor Author

/pulsarbot rerun-failure-checks

@jiangpengcheng
Copy link
Contributor Author

/pulsarbot rerun-failure-checks

@codecov-commenter
Copy link

codecov-commenter commented Apr 3, 2023

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
Copy link

github-actions bot commented May 3, 2023

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
Copy link
Contributor Author

/pulsarbot rerun-failure-checks

@Technoboy- Technoboy- added this to the 3.1.0 milestone May 18, 2023
@Technoboy-
Copy link
Contributor

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

@Technoboy- Technoboy- merged commit 563a573 into apache:master May 31, 2023
41 checks passed
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