Skip to content
This repository was archived by the owner on Nov 11, 2022. It is now read-only.

Conversation

@rculbertson
Copy link
Contributor

PubsubIO would create subscriptions in the same project as the topic. This fails for users who have permissions to subscribe to that topic, but do not have permissions to create subscriptions in that project. Instead create the subscription in the project specified in dataflow options. If no project is specified, then fallback to the topic project.

This is to address #220.

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@rculbertson
Copy link
Contributor Author

As requested, I signed the CLA.

@googlebot
Copy link

CLAs look good, thanks!

@dhalperi
Copy link
Contributor

dhalperi commented Apr 26, 2016

R: @mshields822 @dpmills

Mark, can you look at this w.r.t. your Beam work updating PubSubIO?

@mshields822
Copy link
Contributor

LGTM
There are a few other places where we have assumes subscription project = topic project. I'll try to track those down.

@rculbertson
Copy link
Contributor Author

@dhalperi Is this PR good to merge? It would be great to get this in the next release so we can remove the workarounds we currently have in place.

@dpmills
Copy link
Contributor

dpmills commented Apr 29, 2016

LGTM

This looks fine to merge. One note, however: it won't fix streaming pipelines reading from Pubsub, since those don't use this code. This is just a default implementation that the batch and direct runners use. Fixing this for streaming pipelines will require changes to the Dataflow backend.

@davorbonaci
Copy link
Contributor

@dpmills, this should currently be working as expected on the DataflowPipelineRunner, so no changes should be required. Am I missing something?

@rculbertson, would you be willing to add a unit test to make sure this scenario doesn't regress?

The change itself is fine. Two things worth noting:

  • We should forward port this change to Apache Beam.
  • This introduces a dependency of PubsubIO (core SDK) on DataflowPipelineOptions (Dataflow runner). We are separately trying to untangle these types of dependencies. We can figure out separately what's the right way of solving this.

We'll try to get this integrated early next week, and make sure it is part of the next release (1.6.0).

@rculbertson
Copy link
Contributor Author

@davorbonaci Sure I can add a test sometime this week. Thanks!

@rculbertson rculbertson force-pushed the pubsub-subscription-project branch 3 times, most recently from a6cee4a to 0cea0ef Compare May 2, 2016 18:57
@rculbertson
Copy link
Contributor Author

@davorbonaci I've added a test to PubsubIOTest.java

PubsubIO would create subscriptions in the same project as the topic. This
fails for users who have permissions to subscribe to that topic, but do not
have permissions to create subscriptions in that project. Instead create
the subscription in the project specified in dataflow options. If no project
is specified, then fallback to the topic project.
@rculbertson rculbertson force-pushed the pubsub-subscription-project branch from 0cea0ef to 71ad410 Compare May 18, 2016 15:11
@rculbertson
Copy link
Contributor Author

@dhalperi @davorbonaci: Any update on getting this PR merged? Thanks!

@rculbertson
Copy link
Contributor Author

Looks like this functionality was added in #278. Closing PR.

@dhalperi
Copy link
Contributor

Ryan,

Thanks for the update. Is the new test you added still useful and relevant? If so, please rebase and reopen and I'll take a look!

Thanks!
Dan

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants