You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/01/21 03:11:41 UTC
[GitHub] [pulsar] devinbost opened a new pull request #6104: [Issue 4175]
[pulsar-function-go] (WIP) Create integration tests for Go Functions for
production-readiness
devinbost opened a new pull request #6104: [Issue 4175] [pulsar-function-go] (WIP) Create integration tests for Go Functions for production-readiness
URL: https://github.com/apache/pulsar/pull/6104
This PR depends upon the changes here: https://github.com/apache/pulsar/pull/6031
This PR is to provide integration tests that test execution of Go functions that are managed by the Java FunctionManager. This will allow us to test things like behavior during function timeouts, heartbeat failures, and other situations that can only be effectively tested in an integration test.
Master issue: #4175
This PR also depends on the code in #6031 .
### Modifications
We must add Go to the integration testing logic. We must also build the Go dependencies into the test Dockerfile to ensure the Go binaries are available at runtime for the integration tests.
### Does this pull request potentially affect one of the following parts:
*If `yes` was chosen, please highlight the changes*
- Dependencies (does it add or upgrade a dependency): (yes)
- The public API: (no)
- The schema: (no)
- The default values of configurations: (no)
- The wire protocol: (no)
- The rest endpoints: (no)
- The admin cli options: (no)
- Anything that affects deployment: (yes, as explained above)
### Documentation
- Does this pull request introduce a new feature? (sort of)
- If yes, how is the feature documented? (not documented)
- If a feature is not applicable for documentation, explain why?
Documentation is part of Go functions. We will need to enhance the documentation of Go functions as we get closer to being production-ready with them.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar] devinbost commented on issue #6104: [Issue 4175]
[pulsar-function-go] Create integration tests for Go Functions for
production-readiness
Posted by GitBox <gi...@apache.org>.
devinbost commented on issue #6104: [Issue 4175] [pulsar-function-go] Create integration tests for Go Functions for production-readiness
URL: https://github.com/apache/pulsar/pull/6104#issuecomment-586028968
@sijie I moved the core module back to its parent and kept the example function instances in their own module (and subdirectories). The example instances must be separated (there is no way around this) to allow the code to build into a docker container for integration testing.
If that is not acceptable, then the only other solution would be to keep the existing go-functions untouched and create go-functions2 as a new directory and put all the new code changes in there and recommend that people move to the new module.
Please let me know what you'd prefer.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar] devinbost edited a comment on issue #6104: [Issue 4175]
[pulsar-function-go] Create integration tests for Go Functions for
production-readiness
Posted by GitBox <gi...@apache.org>.
devinbost edited a comment on issue #6104: [Issue 4175] [pulsar-function-go] Create integration tests for Go Functions for production-readiness
URL: https://github.com/apache/pulsar/pull/6104#issuecomment-586028968
@sijie I moved the core module back to its parent and kept the example function instances in their own module (and subdirectories). The example instances must be separated (there is no way around this) to allow the code to build into a docker container for integration testing.
If that is not acceptable, then the only other solution would be to keep the existing go-functions untouched and create go-functions2 (perhaps with a different name) as a new directory and put all the new code changes in there and recommend that people move to the new module.
Please let me know what you'd prefer.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar] devinbost commented on issue #6104: [Issue 4175]
[pulsar-function-go] Create integration tests for Go Functions for
production-readiness
Posted by GitBox <gi...@apache.org>.
devinbost commented on issue #6104: [Issue 4175] [pulsar-function-go] Create integration tests for Go Functions for production-readiness
URL: https://github.com/apache/pulsar/pull/6104#issuecomment-578256722
@sijie This is ready now for code review.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar] sijie commented on issue #6104: [Issue 4175]
[pulsar-function-go] Create integration tests for Go Functions for
production-readiness
Posted by GitBox <gi...@apache.org>.
sijie commented on issue #6104: [Issue 4175] [pulsar-function-go] Create integration tests for Go Functions for production-readiness
URL: https://github.com/apache/pulsar/pull/6104#issuecomment-586012961
> Since Go functions were not able to run in production due to the missing heartbeat, is backward compatibility really a concern?
There are already people running Go functions on production. They don't use the cluster-run mode. They use the "local-run" mode and deploy the function using their deployment methods. Any changes to the code structure are a "breaking change" concern.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar] devinbost commented on issue #6104: [Issue 4175]
[pulsar-function-go] Create integration tests for Go Functions for
production-readiness
Posted by GitBox <gi...@apache.org>.
devinbost commented on issue #6104: [Issue 4175] [pulsar-function-go] Create integration tests for Go Functions for production-readiness
URL: https://github.com/apache/pulsar/pull/6104#issuecomment-578271972
CI - Go Functions Tests / cpp-tests (pull_request)
and
CI - Go Functions style check / Build (pull_request)
need to be adjusted to reference the correct path because I moved the pf module into ./core
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar] devinbost commented on issue #6104: [Issue 4175]
[pulsar-function-go] Create integration tests for Go Functions for
production-readiness
Posted by GitBox <gi...@apache.org>.
devinbost commented on issue #6104: [Issue 4175] [pulsar-function-go] Create integration tests for Go Functions for production-readiness
URL: https://github.com/apache/pulsar/pull/6104#issuecomment-581766079
@wolfstudy I rebased the PR, so the master code should be merged.
Is there something else I still need to do?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar] devinbost edited a comment on issue #6104: [Issue 4175]
[pulsar-function-go] Create integration tests for Go Functions for
production-readiness
Posted by GitBox <gi...@apache.org>.
devinbost edited a comment on issue #6104: [Issue 4175] [pulsar-function-go] Create integration tests for Go Functions for production-readiness
URL: https://github.com/apache/pulsar/pull/6104#issuecomment-581704329
@wolfstudy This PR requires the Github CI Actions to be updated, as per my comment above. (Otherwise, those tests will always fail.)
Other than that (which I can't do anything about since I don't have permission to make that change), this PR is rebased and ready for review.
Edit: I mistakenly thought there was something that needed to be modified that I didn't have access to.
@sijie and @tuteng FYI.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar] devinbost edited a comment on issue #6104: [Issue 4175]
[pulsar-function-go] (WIP) Create integration tests for Go Functions for
production-readiness
Posted by GitBox <gi...@apache.org>.
devinbost edited a comment on issue #6104: [Issue 4175] [pulsar-function-go] (WIP) Create integration tests for Go Functions for production-readiness
URL: https://github.com/apache/pulsar/pull/6104#issuecomment-578175037
@sijie @wolfstudy
This change will probably break the Github CI Action to run the Go tests because I moved the location of the Go code (as well as the golangci.yml file) into a subdirectory to enable the Dockerfile to build it properly for the integration tests.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar] devinbost commented on issue #6104: [Issue 4175]
[pulsar-function-go] Create integration tests for Go Functions for
production-readiness
Posted by GitBox <gi...@apache.org>.
devinbost commented on issue #6104: [Issue 4175] [pulsar-function-go] Create integration tests for Go Functions for production-readiness
URL: https://github.com/apache/pulsar/pull/6104#issuecomment-581704490
After this one is merged, I can rebase and merge https://github.com/apache/pulsar/pull/6105
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar] sijie merged pull request #6104: [Issue 4175]
[pulsar-function-go] Create integration tests for Go Functions for
production-readiness
Posted by GitBox <gi...@apache.org>.
sijie merged pull request #6104: [Issue 4175] [pulsar-function-go] Create integration tests for Go Functions for production-readiness
URL: https://github.com/apache/pulsar/pull/6104
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar] wolfstudy commented on issue #6104: [Issue 4175]
[pulsar-function-go] Create integration tests for Go Functions for
production-readiness
Posted by GitBox <gi...@apache.org>.
wolfstudy commented on issue #6104: [Issue 4175] [pulsar-function-go] Create integration tests for Go Functions for production-readiness
URL: https://github.com/apache/pulsar/pull/6104#issuecomment-581765514
> @wolfstudy Looks like my changes got the Go tests to pass.
Cool, can you merge the master code?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar] wolfstudy commented on issue #6104: [Issue 4175]
[pulsar-function-go] Create integration tests for Go Functions for
production-readiness
Posted by GitBox <gi...@apache.org>.
wolfstudy commented on issue #6104: [Issue 4175] [pulsar-function-go] Create integration tests for Go Functions for production-readiness
URL: https://github.com/apache/pulsar/pull/6104#issuecomment-581713048
About this provides two solutions:
- Do not modify the original file path
- If you want to modify, please also modify the `ci-go-functions-style.yml` file
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar] devinbost commented on issue #6104: [Issue 4175]
[pulsar-function-go] Create integration tests for Go Functions for
production-readiness
Posted by GitBox <gi...@apache.org>.
devinbost commented on issue #6104: [Issue 4175] [pulsar-function-go] Create integration tests for Go Functions for production-readiness
URL: https://github.com/apache/pulsar/pull/6104#issuecomment-581704329
@wolfstudy This PR requires the Github CI Actions to be updated, as per my comment above. (Otherwise, those tests will always fail.)
Other than that (which I can't do anything about since I don't have permission to make that change), this PR is rebased and ready for review.
@sijie and @tuteng FYI.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar] devinbost commented on issue #6104: [Issue 4175]
[pulsar-function-go] Create integration tests for Go Functions for
production-readiness
Posted by GitBox <gi...@apache.org>.
devinbost commented on issue #6104: [Issue 4175] [pulsar-function-go] Create integration tests for Go Functions for production-readiness
URL: https://github.com/apache/pulsar/pull/6104#issuecomment-581734068
@wolfstudy Looks like my changes got the Go tests to pass.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar] devinbost commented on issue #6104: [Issue 4175]
[pulsar-function-go] Create integration tests for Go Functions for
production-readiness
Posted by GitBox <gi...@apache.org>.
devinbost commented on issue #6104: [Issue 4175] [pulsar-function-go] Create integration tests for Go Functions for production-readiness
URL: https://github.com/apache/pulsar/pull/6104#issuecomment-586007428
@sijie Since Go functions were not able to run in production due to the missing heartbeat, is backward compatibility really a concern?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar] devinbost commented on issue #6104: [Issue 4175]
[pulsar-function-go] Create integration tests for Go Functions for
production-readiness
Posted by GitBox <gi...@apache.org>.
devinbost commented on issue #6104: [Issue 4175] [pulsar-function-go] Create integration tests for Go Functions for production-readiness
URL: https://github.com/apache/pulsar/pull/6104#issuecomment-586006831
@sijie Because the Go functions code was not properly organized into modules, I could not find another way to build the code into the docker image used for running the Java integration test.
It is possible that if I only move the example functions into their own directories that I'll be able to get this code to build...
However, using the new module structure is a lot cleaner.
I'll need to investigate if there are additional options.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar] wolfstudy commented on issue #6104: [Issue 4175]
[pulsar-function-go] Create integration tests for Go Functions for
production-readiness
Posted by GitBox <gi...@apache.org>.
wolfstudy commented on issue #6104: [Issue 4175] [pulsar-function-go] Create integration tests for Go Functions for production-readiness
URL: https://github.com/apache/pulsar/pull/6104#issuecomment-581712092
> CI - Go Functions Tests / cpp-tests (pull_request)
> and
> CI - Go Functions style check / Build (pull_request)
> need to be adjusted to reference the correct path because I moved the pf module into ./core
In fact, we just need to ensure the test case in the `pf` directory. Because in [ci-go-functions-style.yml](https://github.com/apache/pulsar/blob/master/.github/workflows/ci-go-functions-style.yaml), The path of the go style check is as follows:
```
- name: Build
if: steps.docs.outputs.changed_only == 'no'
run: |
cd pulsar-function-go
go build ./pf
```
So, when you modified the original path, will result in the following error:
```
can't load package: package ./pf: cannot find package "./pf" in:
/home/runner/work/pulsar/pulsar/pulsar-function-go/pf
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar] devinbost commented on issue #6104: [Issue 4175]
[pulsar-function-go] (WIP) Create integration tests for Go Functions for
production-readiness
Posted by GitBox <gi...@apache.org>.
devinbost commented on issue #6104: [Issue 4175] [pulsar-function-go] (WIP) Create integration tests for Go Functions for production-readiness
URL: https://github.com/apache/pulsar/pull/6104#issuecomment-578175037
@sijie @wolfstudy
This change will probably break the Github CI Action to run the Go tests because I moved the location of the Go code (as well as the golangci.yml file) into a subdirectory.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar] devinbost commented on issue #6104: [Issue 4175]
[pulsar-function-go] Create integration tests for Go Functions for
production-readiness
Posted by GitBox <gi...@apache.org>.
devinbost commented on issue #6104: [Issue 4175] [pulsar-function-go] Create integration tests for Go Functions for production-readiness
URL: https://github.com/apache/pulsar/pull/6104#issuecomment-581715982
@wolfstudy Thanks! I didn't realize that I could make the change. I'll get that fixed right away.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services