You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/06/23 18:34:04 UTC
[GitHub] [beam] nlu90 opened a new pull request, #22028: pulsar connector accepts auth params
nlu90 opened a new pull request, #22028:
URL: https://github.com/apache/beam/pull/22028
**Please** add a meaningful description for your change here
------------------------
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
- [ ] [**Choose reviewer(s)**](https://beam.apache.org/contribute/#make-your-change) and mention them in a comment (`R: @username`).
- [ ] Mention the appropriate issue in your description (for example: `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, comment `fixes #<ISSUE NUMBER>` instead.
- [ ] Update `CHANGES.md` with noteworthy changes.
- [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
See the [Contributor Guide](https://beam.apache.org/contribute) for more tips on [how to make review process smoother](https://beam.apache.org/contribute/#make-reviewers-job-easier).
To check the build health, please visit [https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md](https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md)
GitHub Actions Tests Status (on master branch)
------------------------------------------------------------------------------------------------
[![Build python source distribution and wheels](https://github.com/apache/beam/workflows/Build%20python%20source%20distribution%20and%20wheels/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Build+python+source+distribution+and+wheels%22+branch%3Amaster+event%3Aschedule)
[![Python tests](https://github.com/apache/beam/workflows/Python%20tests/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Python+Tests%22+branch%3Amaster+event%3Aschedule)
[![Java tests](https://github.com/apache/beam/workflows/Java%20Tests/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Java+Tests%22+branch%3Amaster+event%3Aschedule)
See [CI.md](https://github.com/apache/beam/blob/master/CI.md) for more information about GitHub Actions CI.
--
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.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] robertwb commented on pull request #22028: pulsar connector accepts auth params
Posted by GitBox <gi...@apache.org>.
robertwb commented on PR #22028:
URL: https://github.com/apache/beam/pull/22028#issuecomment-1185842003
What is the status of this PR?
--
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.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] asf-ci commented on pull request #22028: pulsar connector accepts auth params
Posted by GitBox <gi...@apache.org>.
asf-ci commented on PR #22028:
URL: https://github.com/apache/beam/pull/22028#issuecomment-1164741200
Can one of the admins verify this patch?
--
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.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] asf-ci commented on pull request #22028: pulsar connector accepts auth params
Posted by GitBox <gi...@apache.org>.
asf-ci commented on PR #22028:
URL: https://github.com/apache/beam/pull/22028#issuecomment-1164741199
Can one of the admins verify this patch?
--
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.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] pulsar connector accepts auth params [beam]
Posted by "hpvd (via GitHub)" <gi...@apache.org>.
hpvd commented on PR #22028:
URL: https://github.com/apache/beam/pull/22028#issuecomment-2074761178
added this to [Parent issue] Support for Apache Pulsar #31078
--
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.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] asf-ci commented on pull request #22028: pulsar connector accepts auth params
Posted by GitBox <gi...@apache.org>.
asf-ci commented on PR #22028:
URL: https://github.com/apache/beam/pull/22028#issuecomment-1164741204
Can one of the admins verify this patch?
--
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.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] johnjcasey commented on a diff in pull request #22028: pulsar connector accepts auth params
Posted by GitBox <gi...@apache.org>.
johnjcasey commented on code in PR #22028:
URL: https://github.com/apache/beam/pull/22028#discussion_r906363738
##########
sdks/java/io/pulsar/src/main/java/org/apache/beam/sdk/io/pulsar/ReadFromPulsarDoFn.java:
##########
@@ -53,18 +53,23 @@ public class ReadFromPulsarDoFn extends DoFn<PulsarSourceDescriptor, PulsarMessa
private PulsarAdmin admin;
private String clientUrl;
private String adminUrl;
+ private String authPluginClassName;
+ private String authParameters;
private final SerializableFunction<Message<byte[]>, Instant> extractOutputTimestampFn;
public ReadFromPulsarDoFn(PulsarIO.Read transform) {
this.extractOutputTimestampFn = transform.getExtractOutputTimestampFn();
this.clientUrl = transform.getClientUrl();
this.adminUrl = transform.getAdminUrl();
+ this.authPluginClassName = transform.getAuthPluginClassName();
+ this.authParameters = transform.getAuthParameters();
this.pulsarClientSerializableFunction = transform.getPulsarClient();
}
// Open connection to Pulsar clients
@Setup
+ // TODO add auth related
Review Comment:
What is TODO here?
--
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.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] github-actions[bot] commented on pull request #22028: pulsar connector accepts auth params
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #22028:
URL: https://github.com/apache/beam/pull/22028#issuecomment-1451814911
This pull request has been closed due to lack of activity. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.
--
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.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] asf-ci commented on pull request #22028: pulsar connector accepts auth params
Posted by GitBox <gi...@apache.org>.
asf-ci commented on PR #22028:
URL: https://github.com/apache/beam/pull/22028#issuecomment-1164741205
Can one of the admins verify this patch?
--
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.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] asf-ci commented on pull request #22028: pulsar connector accepts auth params
Posted by GitBox <gi...@apache.org>.
asf-ci commented on PR #22028:
URL: https://github.com/apache/beam/pull/22028#issuecomment-1164741198
Can one of the admins verify this patch?
--
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.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] MarcoRob commented on pull request #22028: pulsar connector accepts auth params
Posted by GitBox <gi...@apache.org>.
MarcoRob commented on PR #22028:
URL: https://github.com/apache/beam/pull/22028#issuecomment-1165901436
> Do we handle bad auth in pulsar correctly? i.e. if we pass nulls to a pulsar that requires auth, or pass auth to a pulsar that doesn't?
I don't think it is being handled the bad auth scenario but we could add a pre-validation for the auth like in [SpannerIO](https://github.com/apache/beam/blob/610323d1e6211f528805c3a6f47bcca0968a206d/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/spanner/SpannerIO.java#L807) to validate if contains the correct parameters.
--
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.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] aromanenko-dev commented on a diff in pull request #22028: pulsar connector accepts auth params
Posted by GitBox <gi...@apache.org>.
aromanenko-dev commented on code in PR #22028:
URL: https://github.com/apache/beam/pull/22028#discussion_r906429881
##########
sdks/java/io/pulsar/src/main/java/org/apache/beam/sdk/io/pulsar/PulsarSourceDescriptor.java:
##########
@@ -50,14 +50,25 @@ public abstract class PulsarSourceDescriptor implements Serializable {
@SchemaFieldName("admin_url")
abstract String getAdminUrl();
+ @SchemaFieldName("authPluginClassName")
+ @Nullable
+ abstract String getAuthPluginClassName();
+
+ @SchemaFieldName("authParams")
+ @Nullable
+ abstract String getAuthParams();
+
public static PulsarSourceDescriptor of(
String topic,
Long startOffsetTimestamp,
Long endOffsetTimestamp,
MessageId endMessageId,
String clientUrl,
- String adminUrl) {
+ String adminUrl,
Review Comment:
Since this is a public method then it would be better to provide another an overloaded method with the same name and additional arguments.
If this class and method are not supposed to be used by user then it should be private or package private to avoid potential breaking changes like this.
##########
sdks/java/io/pulsar/src/test/java/org/apache/beam/sdk/io/pulsar/ReadFromPulsarDoFnTest.java:
##########
@@ -77,7 +77,7 @@ public void testInitialRestrictionWhenHasStartOffset() throws Exception {
OffsetRange result =
dofnInstance.getInitialRestriction(
PulsarSourceDescriptor.of(
- TOPIC, expectedStartOffset, null, null, SERVICE_URL, ADMIN_URL));
+ TOPIC, expectedStartOffset, null, null, SERVICE_URL, ADMIN_URL, null, null));
Review Comment:
Please, add the tests with non-null auth values.
--
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.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] github-actions[bot] closed pull request #22028: pulsar connector accepts auth params
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #22028: pulsar connector accepts auth params
URL: https://github.com/apache/beam/pull/22028
--
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.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org