Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(pubsub): Add ingestion from GCS samples #27434

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

michaelpri10
Copy link

This adds samples for Pub/Sub ingestion from GCS topics.

@product-auto-label product-auto-label bot added api: pubsub Issues related to the Pub/Sub API. samples Issues that are directly related to samples. labels Oct 11, 2024
Copy link

snippet-bot bot commented Oct 11, 2024

Here is the summary of changes.

You are about to add 1 region tag.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@michaelpri10
Copy link
Author

The test is failing because the GCS ingestion feature is not enabled for the integration test project. It looks like the project is helical-zone-771, so this will need to be allowlisted for the feature flag.

@michaelpri10 michaelpri10 added the kokoro:run Add this label to force Kokoro to re-run the tests. label Oct 14, 2024
@michaelpri10 michaelpri10 removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Oct 14, 2024
@michaelpri10
Copy link
Author

The GCS bucket gs://pubsub-ruby-sample-bucket has been created in the helical-zone-771 project, and the Pub/Sub P4SA for that project has been granted Storage Admin permissions on the bucket. This is required for the GCS ingestion sample to pass.

@michaelpri10
Copy link
Author

Gentle bump on this @dazuma

Copy link
Member

@dazuma dazuma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, sorry this fell through the cracks. Need just a couple of items.

let(:subscription_id) { random_subscription_id }
let(:dead_letter_topic_id) { random_topic_id }

after do
@subscription.delete if @subscription
@topic.delete if @topic
@cloud_storage_ingestion_topic.delete if @cloud_storage_ingestion_topic
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see where this instance variable gets set. Did you intend to set it in the test below (i.e. instead of just setting a local variable in line 74)?

@@ -392,14 +409,14 @@

# Pub/Sub calls may not respond immediately.
# Wrap expectations that may require multiple attempts with this method.
def expect_with_retry sample_name, attempts: 5
def expect_with_retry(sample_name, attempts: 5)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't need to add these parens. Our style prefers omitting them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the Pub/Sub API. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants