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

chore(functions/concepts): split functions into subdirs #8555

Merged
merged 3 commits into from
Dec 6, 2022

Conversation

ace-n
Copy link

@ace-n ace-n commented Nov 24, 2022

No description provided.

@product-auto-label product-auto-label bot added api: cloudfunctions Issues related to the Cloud Run functions API. samples Issues that are directly related to samples. labels Nov 24, 2022
@ace-n ace-n marked this pull request as ready for review November 24, 2022 00:28
@ace-n ace-n requested review from a team as code owners November 24, 2022 00:28
@snippet-bot
Copy link

snippet-bot bot commented Nov 24, 2022

Here is the summary of changes.

You are about to add 6 region tags.

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

@ace-n ace-n requested a review from averikitsch November 24, 2022 00:32
# limitations under the License.

# [START functions_concepts_requests]
def make_request(request):
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the same sample as connection_pooling in the tips. Can we deduplicate?

Copy link
Author

Choose a reason for hiding this comment

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

They're slightly different - see these two lines.

(That one uses connection pooling, while this one doesn't.)

instance_var = heavy_computation()


def scope_demo(request):
Copy link
Contributor

Choose a reason for hiding this comment

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

Duplicated from tips PR

Copy link
Author

@ace-n ace-n Dec 6, 2022

Choose a reason for hiding this comment

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

I assume you're referring to this sample?

They're similar, but not identical - that sample caches the "local" variable globally, while this sample does not.


There's also this Cloud Run sample, which may be duplicative:

we could reuse [this] one, but we'd have to split them up later on if differing requirements emerge.

IOW splitting up = future-proofing; keeping them together = optimizing for "right now"

@ace-n ace-n force-pushed the fn-split-concepts branch from f82fa18 to 35dbd73 Compare December 6, 2022 19:53
Copy link
Contributor

@engelke engelke left a comment

Choose a reason for hiding this comment

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

LGTM

@ace-n ace-n merged commit 3ef282a into main Dec 6, 2022
@ace-n ace-n deleted the fn-split-concepts branch December 6, 2022 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: cloudfunctions Issues related to the Cloud Run functions API. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants