Skip to content

docs: Refactor sample to stop and start Cloud SQL instances#4379

Open
camiekim wants to merge 9 commits into
GoogleCloudPlatform:mainfrom
camiekim:b/525850307
Open

docs: Refactor sample to stop and start Cloud SQL instances#4379
camiekim wants to merge 9 commits into
GoogleCloudPlatform:mainfrom
camiekim:b/525850307

Conversation

@camiekim

Copy link
Copy Markdown
Contributor

Description

  • Migrate tutorial from GCE instances to Cloud SQL for SQL Server instances
  • Update Cloud Functions to use 2nd gen Node.js functions with Eventarc triggers

Fixes b/525850307 (cl/940615883)

Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.

Checklist

  • [x ] I have followed guidelines from CONTRIBUTING.MD and Samples Style Guide
  • [x ] Tests pass: npm test (see Testing)
  • [x ] Lint pass: npm run lint (see Style)
  • Required CI tests pass (see CI testing)
  • These samples need a new API enabled in testing projects to pass (let us know which ones)
  • These samples need a new/updated env vars in testing projects set to pass (let us know which ones)
  • This pull request is from a branch created directly off of GoogleCloudPlatform/nodejs-docs-samples. Not a fork.
  • This sample adds a new sample directory, and I updated the CODEOWNERS file with the codeowners for this sample
  • This sample adds a new sample directory, and I created GitHub Actions workflow for this sample
  • This sample adds a new Product API, and I updated the Blunderbuss issue/PR auto-assigner with the codeowners for this sample
  • [x ] Please merge this PR for me once it is approved

Note: Any check with (dev), (experimental), or (legacy) can be ignored and should not block your PR from merging (see CI testing).

@camiekim camiekim requested review from a team as code owners July 10, 2026 21:34
@product-auto-label product-auto-label Bot added samples Issues that are directly related to samples. api: cloudfunctions Issues related to the Cloud Run functions API. asset: pattern DEE Asset tagging - Pattern. labels Jul 10, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request migrates the scheduling sample from Google Compute Engine (GCE) instances to Cloud SQL instances, updating the README, dependencies, function implementation to use CloudEvents, and the corresponding unit tests. The review feedback highlights a critical syntax error in the test file (a stray cd command), inconsistent multiline string formatting in a log statement, and an opportunity to improve input validation by ensuring the label payload attribute is a string containing an = delimiter before splitting.

Comment thread functions/scheduleinstance/test/index.test.js
Comment thread functions/scheduleinstance/index.js Outdated
Comment thread functions/scheduleinstance/index.js
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. asset: pattern DEE Asset tagging - Pattern. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant