Skip to content

Issue #9123 Go Functions - #9124

Merged
sijie merged 1 commit into
apache:masterfrom
flowchartsman:fix-go-func-nil-producerspec
Jan 8, 2021
Merged

Issue #9123 Go Functions#9124
sijie merged 1 commit into
apache:masterfrom
flowchartsman:fix-go-func-nil-producerspec

Conversation

@flowchartsman

Copy link
Copy Markdown
Contributor

Fixes #9123

Modifications

Check for nil ProducerSpec first

Verifying this change

as in #9123

@sijie

sijie commented Jan 6, 2021

Copy link
Copy Markdown
Member

@flowchartsman Can you rebase to the latest master to include recent changes that fix the broken master?

@sijie

sijie commented Jan 6, 2021

Copy link
Copy Markdown
Member

@freeznet Can you review this change?

@freeznet

freeznet commented Jan 6, 2021

Copy link
Copy Markdown
Contributor

@flowchartsman @sijie I have some findings related to #8761.

Currently go functions get KeyBasedBatchBuilder support with #8761, but the batchBuilderType is not exposed as an individual argument in pulsar-function-go/conf/conf.go https://github.com/apache/pulsar/blob/master/pulsar-function-go/conf/conf.go, so user cannot pass batchBuilderType to function, and batchBuilder is not usable. Additional, ProducerSpec from SinkSpec are not initialized properly here: https://github.com/apache/pulsar/blob/master/pulsar-function-go/pf/instanceConf.go#L87-L90, and this will lead to #9123, user will get nil exception when access to instanceConf.funcDetails.Sink.ProducerSpec.

@flowchartsman

flowchartsman commented Jan 6, 2021

Copy link
Copy Markdown
Contributor Author

@freeznet, it seems like what you're saying is that my fix is a band-aid at a lower level, and that the other changes would fix this the right way, is that correct? If so, I think I should close this PR and we should make a new one that correctly fixes all of the issues you mention.

@freeznet

freeznet commented Jan 7, 2021

Copy link
Copy Markdown
Contributor

@flowchartsman I think this PR is great and LGTM since it add nil check for pointer, and the nil check is always welcome. But as you said, we should work on another PR to make BatchBuilder exposed to user properly.

@flowchartsman
flowchartsman force-pushed the fix-go-func-nil-producerspec branch from 84bc333 to b78807e Compare January 8, 2021 00:55
@flowchartsman

Copy link
Copy Markdown
Contributor Author

@sijie should be rebased now, I believe

@sijie

sijie commented Jan 8, 2021

Copy link
Copy Markdown
Member

@flowchartsman Thank you!

@sijie

sijie commented Jan 8, 2021

Copy link
Copy Markdown
Member

/pulsarbot run-failure-checks

@sijie
sijie merged commit 3b6fa26 into apache:master Jan 8, 2021
codelipenghui pushed a commit that referenced this pull request Jan 14, 2021
Fixes #9123

Check for nil ProducerSpec first

as in #9123

(cherry picked from commit 3b6fa26)
@codelipenghui codelipenghui added the cherry-picked/branch-2.7 Archived: 2.7 is end of life label Jan 14, 2021
freeznet pushed a commit to streamnative/pulsar-archived that referenced this pull request Jan 14, 2021
Fixes apache#9123

Check for nil ProducerSpec first

as in apache#9123

(cherry picked from commit 3b6fa26)
eolivelli added a commit to datastax/pulsar that referenced this pull request May 18, 2021
gaoran10 added a commit to gaoran10/pulsar that referenced this pull request Sep 13, 2021
codelipenghui pushed a commit that referenced this pull request Sep 14, 2021
### Motivation

Currently, the docker is from `openjdk:8-jdk-slim `, it has a new release a few days ago and the Linux version was changed to `Impish`, it didn't support install `python3.7` by apt-get tool, the minimum Python version is 3.9, so we need to change the python version or use a different Linux release, I cherry-pick some commits from branch master to build docker image from the `ubuntu:20.04`.

Mainly related PRs:

1. #11026
2. #11623
3. #11862

### Modifications

Build docker image from the `ubuntu:20.04`.

upgrade pulsar-go-client from `0.2.0` to `0.6.0` and rever #9124 from branch-2.7
nicoloboschi pushed a commit to datastax/pulsar that referenced this pull request Jul 22, 2022
Currently, the docker is from `openjdk:8-jdk-slim `, it has a new release a few days ago and the Linux version was changed to `Impish`, it didn't support install `python3.7` by apt-get tool, the minimum Python version is 3.9, so we need to change the python version or use a different Linux release, I cherry-pick some commits from branch master to build docker image from the `ubuntu:20.04`.

Mainly related PRs:

1. apache#11026
2. apache#11623
3. apache#11862

Build docker image from the `ubuntu:20.04`.

upgrade pulsar-go-client from `0.2.0` to `0.6.0` and rever apache#9124 from branch-2.7

(cherry picked from commit 259c698)
nicoloboschi pushed a commit to datastax/pulsar that referenced this pull request Jul 22, 2022
Currently, the docker is from `openjdk:8-jdk-slim `, it has a new release a few days ago and the Linux version was changed to `Impish`, it didn't support install `python3.7` by apt-get tool, the minimum Python version is 3.9, so we need to change the python version or use a different Linux release, I cherry-pick some commits from branch master to build docker image from the `ubuntu:20.04`.

Mainly related PRs:

1. apache#11026
2. apache#11623
3. apache#11862

Build docker image from the `ubuntu:20.04`.

upgrade pulsar-go-client from `0.2.0` to `0.6.0` and rever apache#9124 from branch-2.7

(cherry picked from commit 259c698)
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.

[Go Functions] publishfunc example is broken

4 participants