-
Notifications
You must be signed in to change notification settings - Fork 2k
chore(ci): migrate sqlserver/mssql sample to new ci #4066
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @glasnt, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
Summary of Changes
This pull request migrates the sqlserver/mssql sample to the new CI. This involves adding a ci-setup.json file with environment variables and secrets, updating the package.json to include a proxy script for running system tests, and updating the nodejs-dev.jsonc and nodejs.jsonc files to reflect the change.
Highlights
- CI Migration: The sqlserver/mssql sample is being migrated to the new CI.
- ci-setup.json: A new
ci-setup.json
file is added to define environment variables and secrets for the CI environment. - package.json update: The
package.json
file is updated to include aproxy
script that usessql-proxy.sh
and prepends it to the system test command. - nodejs config updates: The
nodejs-dev.jsonc
andnodejs.jsonc
files are updated to reflect the migration of the sqlserver/mssql sample.
Changelog
- .github/config/nodejs-dev.jsonc
- Added
cloud-sql/sqlserver/mssql
to the list of samples in thenodejs-dev.jsonc
file at line 106.
- Added
- .github/config/nodejs.jsonc
- Removed
cloud-sql/sqlserver/mssql
from the list of samples in thenodejs.jsonc
file at line 80.
- Removed
- cloud-sql/sqlserver/mssql/ci-setup.json
- Created a new
ci-setup.json
file with environment variables and secrets for the CI environment, includingINSTANCE_HOST
,INSTANCE_CONNECTION_NAME
,UNIX_SOCKET_DIR
,CLOUD_SQL_CONNECTION_NAME
,INSTANCE_UNIX_SOCKET
,DB_NAME
,DB_USER
, andDB_PASS
.
- Created a new
- cloud-sql/sqlserver/mssql/package.json
- Added a
proxy
script to thepackage.json
file at line 16 that executes thesql-proxy.sh
script. - Modified the
system-test
script at line 17 to use the newproxy
script to run the tests.
- Added a
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
Feature | Command | Description |
---|---|---|
Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/
folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
The SQL server sleeps,
A proxy whispers awake,
Tests now start to pass.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
The pull request migrates the sqlserver/mssql sample to the new CI. This involves adding the sample to the nodejs-dev.jsonc
config, removing it from the nodejs.jsonc
config, creating a ci-setup.json
file, and modifying the package.json
file to include a proxy script for system tests. Overall, the changes seem reasonable and necessary for the migration.
Merge Readiness
The changes appear to be correct and necessary for migrating the sqlserver/mssql sample to the new CI. I recommend merging this pull request after addressing the review comments. I am unable to directly approve the pull request, and users should have others review and approve this code before merging.
@@ -77,7 +77,6 @@ | |||
// TODO: fix these | |||
"ai-platform/snippets", // PERMISSION_DENIED: Permission denied: Consumer 'projects/undefined' has been suspended. | |||
"automl", // (untested) FAILED_PRECONDITION: Google Cloud AutoML Natural Language was retired on March 15, 2024. Please migrate to Vertex AI instead | |||
"cloud-sql/sqlserver/mssql", // (untested) TypeError: The "config.server" property is required and must be of type string. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is being removed, which makes sense since the sample is being migrated to the nodejs-dev.jsonc
config. However, it's important to ensure that the reason for the previous failure (TypeError: The "config.server" property is required and must be of type string.) has been addressed in the new CI setup. Otherwise, the sample might still fail in the new CI environment.
"proxy": "$GITHUB_WORKSPACE/.github/workflows/utils/sql-proxy.sh", | ||
"system-test": "npm run proxy -- c8 mocha -p -j 2 test/*.test.js --timeout=60000 --exit", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -13,7 +13,8 @@ | |||
}, | |||
"scripts": { | |||
"start": "node server/server.js", | |||
"system-test": "c8 mocha -p -j 2 test/*.test.js --timeout=60000 --exit", | |||
"proxy": "$GITHUB_WORKSPACE/.github/workflows/utils/sql-proxy.sh", | |||
"system-test": "npm run proxy -- c8 mocha -p -j 2 test/*.test.js --timeout=60000 --exit", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"env": { | ||
"INSTANCE_HOST": "127.0.0.1", | ||
"INSTANCE_CONNECTION_NAME": "nodejs-docs-samples-tests:us-central1:sql-server-ci", | ||
"UNIX_SOCKET_DIR": "tmp/cloudsql", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@glasnt SQL Server does not support unix domain socket connections so I think we can remove the unix socket related variables from SQL Server config 😄
experimental test is failing because it's using the package.json from the main branch |
Description
Fixes #
Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.
Checklist
npm test
(see Testing)npm run lint
(see Style)GoogleCloudPlatform/nodejs-docs-samples
. Not a fork.