GoogleCloudPlatform / samples-experiment

πŸ§ͺ Experiment time! Let's see if a monorepo for Cloud samples is a good idea.
Apache License 2.0
3 stars 2 forks source link

chore: trial migration to journeys #11

Open grayside opened 1 year ago

grayside commented 1 year ago

This is a trial "journey" migration of three apps: billing-management, image-processing, and speech-to-speech from the Cloud Functions & Cloud Run samples collection. This trial is limited to Node.js & Python.

Within, we see code placed in three different layouts, based on variants currently found in Node & Python.

This PR showcases a compressed directory structure, which would not scale if additional language or platform variants were created. Since we want to avoid migrating existing sample apps based on new work, we shouldn't do this. Instead, we should probably establish a deeper structure, maybe something like:

journeys/<name+architecture>/<platform>/[<platform version>]/<language>

In this approach the code layout and some of the journey titles in the PR would look a bit different:

β”œβ”€β”€ journeys
β”‚   β”œβ”€β”€ event-driven-billing-management
β”‚   β”‚   └── functions
β”‚   β”‚       β”œβ”€β”€ nodejs
β”‚   β”‚       └── python
β”‚   β”œβ”€β”€ event-driven-image-processing
β”‚   β”‚   β”œβ”€β”€ run
β”‚   β”‚   β”‚   β”œβ”€β”€ nodejs
β”‚   β”‚   β”‚   └── python
β”‚   β”‚   └── functions
β”‚   β”‚       β”œβ”€β”€ nodejs
β”‚   β”‚       β”œβ”€β”€ python
β”‚   β”‚       └── v2
β”‚   β”‚          β”œβ”€β”€ nodejs
β”‚   β”‚          └── python
β”‚   β”œβ”€β”€ speech-to-speech
β”‚   β”‚   └── functions
β”‚   β”‚       └── nodejs
β”‚   β”” [...]
snippet-bot[bot] commented 1 year ago

Here is the summary of possible violations 😱

There are 13 possible violations for not having product prefix.

The end of the violation section. All the stuff below is FYI purposes only.


Here is the summary of changes.

You are about to add 56 region tags. - [journeys/billing-management/nodejs/index.js:15](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/billing-management/nodejs/index.js#L15), tag `functions_billing_limit` - [journeys/billing-management/nodejs/index.js:16](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/billing-management/nodejs/index.js#L16), tag `functions_billing_stop` - [journeys/billing-management/nodejs/index.js:25](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/billing-management/nodejs/index.js#L25), tag `functions_billing_slack` - [journeys/billing-management/nodejs/index.js:50](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/billing-management/nodejs/index.js#L50), tag `functions_billing_stop` - [journeys/billing-management/nodejs/index.js:126](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/billing-management/nodejs/index.js#L126), tag `functions_billing_limit` - [journeys/billing-management/python/main.py:15](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/billing-management/python/main.py#L15), tag `functions_billing_limit` - [journeys/billing-management/python/main.py:16](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/billing-management/python/main.py#L16), tag `functions_billing_limit_appengine` - [journeys/billing-management/python/main.py:17](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/billing-management/python/main.py#L17), tag `functions_billing_stop` - [journeys/billing-management/python/main.py:18](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/billing-management/python/main.py#L18), tag `functions_billing_slack` - [journeys/billing-management/python/main.py:28](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/billing-management/python/main.py#L28), tag `functions_billing_limit` - [journeys/billing-management/python/main.py:29](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/billing-management/python/main.py#L29), tag `functions_billing_limit_appengine` - [journeys/billing-management/python/main.py:30](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/billing-management/python/main.py#L30), tag `functions_billing_stop` - [journeys/billing-management/python/main.py:37](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/billing-management/python/main.py#L37), tag `functions_billing_slack` - [journeys/billing-management/python/main.py:43](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/billing-management/python/main.py#L43), tag `functions_billing_limit` - [journeys/billing-management/python/main.py:44](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/billing-management/python/main.py#L44), tag `functions_billing_stop` - [journeys/billing-management/python/main.py:50](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/billing-management/python/main.py#L50), tag `functions_billing_slack` - [journeys/billing-management/python/main.py:89](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/billing-management/python/main.py#L89), tag `functions_billing_stop` - [journeys/billing-management/python/main.py:154](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/billing-management/python/main.py#L154), tag `functions_billing_limit` - [journeys/billing-management/python/main.py:213](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/billing-management/python/main.py#L213), tag `functions_billing_limit_appengine` - [journeys/billing-management/python/requirements.txt:2](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/billing-management/python/requirements.txt#L2), tag `functions_billing_limit_appengine_deps` - [journeys/image-processing/functions/nodejs/index.js:17](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/image-processing/functions/nodejs/index.js#L17), tag `functions_imagemagick_setup` - [journeys/image-processing/functions/nodejs/index.js:30](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/image-processing/functions/nodejs/index.js#L30), tag `functions_imagemagick_analyze` - [journeys/image-processing/functions/nodejs/index.js:62](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/image-processing/functions/nodejs/index.js#L62), tag `functions_imagemagick_blur` - [journeys/image-processing/functions/python/main.py:16](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/image-processing/functions/python/main.py#L16), tag `functions_imagemagick_setup` - [journeys/image-processing/functions/python/main.py:28](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/image-processing/functions/python/main.py#L28), tag `functions_imagemagick_analyze` - [journeys/image-processing/functions/python/main.py:61](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/image-processing/functions/python/main.py#L61), tag `functions_imagemagick_blur` - [journeys/image-processing/functions/v2/nodejs/index.js:17](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/image-processing/functions/v2/nodejs/index.js#L17), tag `functions_imagemagick_setup` - [journeys/image-processing/functions/v2/nodejs/index.js:31](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/image-processing/functions/v2/nodejs/index.js#L31), tag `functions_imagemagick_analyze` - [journeys/image-processing/functions/v2/nodejs/index.js:63](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/image-processing/functions/v2/nodejs/index.js#L63), tag `functions_imagemagick_blur` - [journeys/image-processing/functions/v2/python/main.py:16](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/image-processing/functions/v2/python/main.py#L16), tag `functions_imagemagick_setup` - [journeys/image-processing/functions/v2/python/main.py:29](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/image-processing/functions/v2/python/main.py#L29), tag `functions_imagemagick_analyze` - [journeys/image-processing/functions/v2/python/main.py:64](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/image-processing/functions/v2/python/main.py#L64), tag `functions_imagemagick_blur` - [journeys/image-processing/run/nodejs/Dockerfile:9](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/image-processing/run/nodejs/Dockerfile#L9), tag `cloudrun_imageproc_dockerfile_imagemagick` - [journeys/image-processing/run/nodejs/Dockerfile:10](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/image-processing/run/nodejs/Dockerfile#L10), tag `run_imageproc_dockerfile_imagemagick` - [journeys/image-processing/run/nodejs/app.js:5](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/image-processing/run/nodejs/app.js#L5), tag `cloudrun_imageproc_controller` - [journeys/image-processing/run/nodejs/app.js:6](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/image-processing/run/nodejs/app.js#L6), tag `run_imageproc_controller` - [journeys/image-processing/run/nodejs/image.js:17](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/image-processing/run/nodejs/image.js#L17), tag `cloudrun_imageproc_handler_setup` - [journeys/image-processing/run/nodejs/image.js:18](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/image-processing/run/nodejs/image.js#L18), tag `run_imageproc_handler_setup` - [journeys/image-processing/run/nodejs/image.js:33](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/image-processing/run/nodejs/image.js#L33), tag `cloudrun_imageproc_handler_analyze` - [journeys/image-processing/run/nodejs/image.js:34](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/image-processing/run/nodejs/image.js#L34), tag `run_imageproc_handler_analyze` - [journeys/image-processing/run/nodejs/image.js:67](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/image-processing/run/nodejs/image.js#L67), tag `cloudrun_imageproc_handler_blur` - [journeys/image-processing/run/nodejs/image.js:68](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/image-processing/run/nodejs/image.js#L68), tag `run_imageproc_handler_blur` - [journeys/image-processing/run/nodejs/index.js:5](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/image-processing/run/nodejs/index.js#L5), tag `cloudrun_imageproc_server` - [journeys/image-processing/run/nodejs/index.js:6](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/image-processing/run/nodejs/index.js#L6), tag `run_imageproc_server` - [journeys/image-processing/run/python/Dockerfile:29](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/image-processing/run/python/Dockerfile#L29), tag `cloudrun_imageproc_dockerfile_imagemagick` - [journeys/image-processing/run/python/Dockerfile:30](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/image-processing/run/python/Dockerfile#L30), tag `run_imageproc_dockerfile_imagemagick` - [journeys/image-processing/run/python/image.py:15](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/image-processing/run/python/image.py#L15), tag `cloudrun_imageproc_handler_setup` - [journeys/image-processing/run/python/image.py:27](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/image-processing/run/python/image.py#L27), tag `cloudrun_imageproc_handler_analyze` - [journeys/image-processing/run/python/image.py:64](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/image-processing/run/python/image.py#L64), tag `cloudrun_imageproc_handler_blur` - [journeys/image-processing/run/python/main.py:15](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/image-processing/run/python/main.py#L15), tag `cloudrun_imageproc_controller` - [journeys/speech-to-speech/functions/index.js:62](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/speech-to-speech/functions/index.js#L62), tag `chain_cloud_calls` - [journeys/speech-to-speech/functions/index.js:131](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/speech-to-speech/functions/index.js#L131), tag `call_speech_to_text` - [journeys/speech-to-speech/functions/index.js:153](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/speech-to-speech/functions/index.js#L153), tag `call_text_translation` - [journeys/speech-to-speech/functions/index.js:161](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/speech-to-speech/functions/index.js#L161), tag `call_text_to_speech` - [journeys/speech-to-speech/functions/index.js:175](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/speech-to-speech/functions/index.js#L175), tag `upload_to_cloud_storage` - [journeys/speech-to-speech/functions/index.js:183](https://github.com/GoogleCloudPlatform/samples-experiment/blob/5a80542b115f9c2f85f3e427440c09b466d2ace1/journeys/speech-to-speech/functions/index.js#L183), tag `validate_request`
You are about to delete 6 region tags. - [products/functions/nodejs/speech-to-speech/functions/index.js:62](https://github.com/GoogleCloudPlatform/samples-experiment/blob/76b6832f60433fee1befef6209eb16755be4758b/products/functions/nodejs/speech-to-speech/functions/index.js#L62), tag `chain_cloud_calls` - [products/functions/nodejs/speech-to-speech/functions/index.js:131](https://github.com/GoogleCloudPlatform/samples-experiment/blob/76b6832f60433fee1befef6209eb16755be4758b/products/functions/nodejs/speech-to-speech/functions/index.js#L131), tag `call_speech_to_text` - [products/functions/nodejs/speech-to-speech/functions/index.js:153](https://github.com/GoogleCloudPlatform/samples-experiment/blob/76b6832f60433fee1befef6209eb16755be4758b/products/functions/nodejs/speech-to-speech/functions/index.js#L153), tag `call_text_translation` - [products/functions/nodejs/speech-to-speech/functions/index.js:161](https://github.com/GoogleCloudPlatform/samples-experiment/blob/76b6832f60433fee1befef6209eb16755be4758b/products/functions/nodejs/speech-to-speech/functions/index.js#L161), tag `call_text_to_speech` - [products/functions/nodejs/speech-to-speech/functions/index.js:175](https://github.com/GoogleCloudPlatform/samples-experiment/blob/76b6832f60433fee1befef6209eb16755be4758b/products/functions/nodejs/speech-to-speech/functions/index.js#L175), tag `upload_to_cloud_storage` - [products/functions/nodejs/speech-to-speech/functions/index.js:183](https://github.com/GoogleCloudPlatform/samples-experiment/blob/76b6832f60433fee1befef6209eb16755be4758b/products/functions/nodejs/speech-to-speech/functions/index.js#L183), tag `validate_request`

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: