Add event_trigger to cloud functions #2158
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Deprecate old
trigger_
objects, andretry_on_failure
.Decisions:
failure_policy.retry
to stop weird configsresource
expects mostly a partial self link, except gcs buckets use a different shape of self link. The shape Cloud Functions expect is not that shape. The shape they use is made up, so there is an error if you supply a gcs self link... let's be restrictive and only allow names for now. We need to specify the shape if we take in names, so we need to match against specific event_types. So let's only support the two trigger types we supported before for now (Cloud Storage, Cloud Pub/Sub)event_type
accepts a specific pattern that is documented. It will also accept some different formats (at least a certain subset of the pattern) and is not as restrictive as it seems, but let's not document that because the Cloud Functions documentation does not. And also we need users to match specific shapes so we can format the self links correctly.