fix: add topic existing validation#32465
Conversation
|
Assigning reviewers. If you would like to opt out of this review, comment R: @m-trieu for label java. Available commands:
The PR bot will only process comments in the main thread (not review comments). |
ahmedabu98
left a comment
There was a problem hiding this comment.
This looks great! can you add a comment on CHANGES.md calling out this new addition?
|
@ahmedabu98 can you review again? because i notice that |
ahmedabu98
left a comment
There was a problem hiding this comment.
Thanks! left some comments
...a/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/pubsub/PubsubIOTest.java
Outdated
Show resolved
Hide resolved
.../java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.java
Show resolved
Hide resolved
.../java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.java
Show resolved
Hide resolved
|
Reminder, please take a look at this pr: @m-trieu @ahmedabu98 |
ahmedabu98
left a comment
There was a problem hiding this comment.
Looks great! thanks for adding this
Will merge when that last workflow passes
|
This is breaking Java presubmit: #18027 was a very old Issue. Is it still needed here? |
| return false; | ||
| } | ||
|
|
||
| throw e; |
There was a problem hiding this comment.
This is a breaking change. Pipeline construction environment may not have access to the PubSub. Here it should either be fail safe or not enabled by default.
There was a problem hiding this comment.
@Abacn
Oh, I missed that point. How about disabled as default? Checking topic existence is needed.
There was a problem hiding this comment.
How about disabled as default?
sounds good
|
Well, I am going to revert the change for now, as introducing a required field in IO connector specification would generally breaks upgrade compatibility of pipelines (unless tested not to be the case). |
* feat: add topic existing validation * feat: add validation to write * docs: add changes * docs: change docs * refactor: change validate to primitive type * test: change test more clearly * style: follow lint * docs: fix CHANGES * docs: follow changes
) This reverts commit 380ed7b.
Please add a meaningful description for your change here
fix: #18027
adding validation to check topic exist or not for PubsubIO
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, commentfixes #<ISSUE NUMBER>instead.CHANGES.mdwith noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.