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

feat: add run_events_pubsub #1809

Merged
merged 11 commits into from
May 20, 2020
Merged

feat: add run_events_pubsub #1809

merged 11 commits into from
May 20, 2020

Conversation

grant
Copy link
Contributor

@grant grant commented May 18, 2020

Adds a minimal Events for Cloud Run for Pub/Sub triggers.

Similar to the existing Pub/Sub sample, but uses Events for Cloud Run directly. Worth having a separate sample (at least until GA).

Future samples will be prefixed with:

  • run_events_{trigger type}
  • run_events_pubsub
  • run_events_audit_logs_gcs
  • run_events_firestore
    ...etc.

Signed-off-by: Grant Timmerman <timmerman+devrel@google.com>
@grant grant requested a review from grayside May 18, 2020 20:13
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 18, 2020
@grant
Copy link
Contributor Author

grant commented May 18, 2020

I don't understand why the tests have failed for the md preview renderer.

It seems unrelated to this PR.

[ERROR] Failed to get build config
com.google.devtools.kokoro.config.ConfigException: Couldn't find build configuration markdown-preview-renderer under /tmp/workspace/workspace/cloud-devrel/nodejs-docs-samples/presubmit/run/markdown-preview-renderer/src/github/nodejs-docs-samples/.kokoro/run.

That is frustrating.

@grant grant requested a review from averikitsch May 18, 2020 23:18
run/events-pubsub/.gitignore Outdated Show resolved Hide resolved
run/events-pubsub/Dockerfile Outdated Show resolved Hide resolved
run/events-pubsub/Dockerfile Outdated Show resolved Hide resolved
run/events-pubsub/README.md Show resolved Hide resolved
run/events-pubsub/README.md Outdated Show resolved Hide resolved
run/events-pubsub/app.js Outdated Show resolved Hide resolved
run/events-pubsub/app.js Outdated Show resolved Hide resolved
@averikitsch
Copy link
Contributor

I don't understand why the tests have failed for the md preview renderer.

It seems unrelated to this PR.

[ERROR] Failed to get build config
com.google.devtools.kokoro.config.ConfigException: Couldn't find build configuration markdown-preview-renderer under /tmp/workspace/workspace/cloud-devrel/nodejs-docs-samples/presubmit/run/markdown-preview-renderer/src/github/nodejs-docs-samples/.kokoro/run.

That is frustrating.

Looks like we should get those kokoro files merged ASAP @kelsk @grayside

@grayside
Copy link
Collaborator

Grant, the failure for markdown-preview-renderer is likely because a CL was submitted to enable testing of a work-in-progress sample, but that sample has not yet been merged.

run/README.md Outdated
@@ -16,6 +16,7 @@
|[Cloud SQL (MySQL)][mysql] | Use MySQL with Cloud Run | - |
|[Cloud SQL (Postgres)][postgres] | Use Postgres with Cloud Run | - |
|[Hello Broken][hello_broken] | Something is wrong, how do you fix it? | [<img src="https://storage.googleapis.com/cloudrun/button.svg" alt="Run on Google Cloud" height="30"/>][run_button_hello_broken] |
|[Events – Pub/Sub][events_pubsub] | Use Pub/Sub with Cloud Run | - |
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we should have this description parallel the Pub/Sub description more, and be moved right under it. Might want to flag it as alpha if we're going to "advertise" it here.

Suggested change
|[Events – Pub/Sub][events_pubsub] | Use Pub/Sub with Cloud Run | - |
|[Events – Pub/Sub][events_pubsub] | Event-driven service with Events for Cloud Run for Pub/Sub | - |

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree we can move the Pub/Sub trigger next to the other Pub/Sub sample.

I disagree that we should change the title in this way.
Cloud Run is not_for_ Pub/Sub.
Pub/Sub is a trigger/event type for Cloud Run.

Once public, we should remove the non-native Pub/Sub sample.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The core feedback here is that the two samples should be listed next to each other, and with similar enough structure in their descriptions to make differentiation easy.

Whether one of them is removed at GA is a good question.

run/events-pubsub/README.md Outdated Show resolved Hide resolved
run/events-pubsub/app.js Outdated Show resolved Hide resolved
Copy link
Contributor Author

@grant grant left a comment

Choose a reason for hiding this comment

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

Thanks for the reviews!

Addressed a few issues.
Need to sync in the design doc a bit more before asking for another review.

run/README.md Outdated
@@ -16,6 +16,7 @@
|[Cloud SQL (MySQL)][mysql] | Use MySQL with Cloud Run | - |
|[Cloud SQL (Postgres)][postgres] | Use Postgres with Cloud Run | - |
|[Hello Broken][hello_broken] | Something is wrong, how do you fix it? | [<img src="https://storage.googleapis.com/cloudrun/button.svg" alt="Run on Google Cloud" height="30"/>][run_button_hello_broken] |
|[Events – Pub/Sub][events_pubsub] | Use Pub/Sub with Cloud Run | - |
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree we can move the Pub/Sub trigger next to the other Pub/Sub sample.

I disagree that we should change the title in this way.
Cloud Run is not_for_ Pub/Sub.
Pub/Sub is a trigger/event type for Cloud Run.

Once public, we should remove the non-native Pub/Sub sample.

run/events-pubsub/.gitignore Outdated Show resolved Hide resolved
run/events-pubsub/Dockerfile Outdated Show resolved Hide resolved
run/events-pubsub/Dockerfile Outdated Show resolved Hide resolved
run/events-pubsub/README.md Show resolved Hide resolved
run/events-pubsub/README.md Outdated Show resolved Hide resolved
run/events-pubsub/README.md Outdated Show resolved Hide resolved
run/events-pubsub/app.js Outdated Show resolved Hide resolved
run/events-pubsub/app.js Outdated Show resolved Hide resolved
Signed-off-by: Grant Timmerman <timmerman+devrel@google.com>
@grant
Copy link
Contributor Author

grant commented May 19, 2020

Grant, the failure for markdown-preview-renderer is likely because a CL was submitted to enable testing of a work-in-progress sample, but that sample has not yet been merged.

OK. Please advise on how to proceed. It's really hard to understand the PR test status if master is failing.

grant added 2 commits May 19, 2020 16:26
…orm/nodejs-docs-samples into grant_run_events_pubsub
Signed-off-by: Grant Timmerman <timmerman+devrel@google.com>
@grant
Copy link
Contributor Author

grant commented May 20, 2020

I've created GitHub issues for unrelated failing tests.

grant added 2 commits May 19, 2020 17:09
Signed-off-by: Grant Timmerman <timmerman+devrel@google.com>
Signed-off-by: Grant Timmerman <timmerman+devrel@google.com>
@averikitsch averikitsch added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 20, 2020
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 20, 2020
@grayside
Copy link
Collaborator

hello-broken failing is news to me, thanks for filing the issue.

The other two are part of #1752, it seems like Kokoro was configured to expect that PR to already be merged. Note that while it's a failure, it's not a "required" check, so won't block merging.

run/README.md Outdated
@@ -16,6 +16,7 @@
|[Cloud SQL (MySQL)][mysql] | Use MySQL with Cloud Run | - |
|[Cloud SQL (Postgres)][postgres] | Use Postgres with Cloud Run | - |
|[Hello Broken][hello_broken] | Something is wrong, how do you fix it? | [<img src="https://storage.googleapis.com/cloudrun/button.svg" alt="Run on Google Cloud" height="30"/>][run_button_hello_broken] |
|[Events – Pub/Sub][events_pubsub] | Use Pub/Sub with Cloud Run | - |
Copy link
Collaborator

Choose a reason for hiding this comment

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

The core feedback here is that the two samples should be listed next to each other, and with similar enough structure in their descriptions to make differentiation easy.

Whether one of them is removed at GA is a good question.

run/events-pubsub/README.md Show resolved Hide resolved
run/events-pubsub/README.md Outdated Show resolved Hide resolved
run/events-pubsub/README.md Outdated Show resolved Hide resolved
run/events-pubsub/app.js Show resolved Hide resolved
Signed-off-by: Grant Timmerman <timmerman+devrel@google.com>
@grant
Copy link
Contributor Author

grant commented May 20, 2020

@grayside PTAL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants