-
Notifications
You must be signed in to change notification settings - Fork 2k
ci(markdown): migrate renderer, editor to new CI #4002
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
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 markdown renderer and editor to a new CI setup. This involves updating the CI configuration files, package.json files, and test setup files for both the renderer and editor services. The changes primarily focus on adjusting the test commands, adding environment variables for service names and versions, and updating the Cloud Run deployment configurations in the e2e tests.
Highlights
- CI Configuration: Adds
ci-setup.json
files to both the renderer and editor directories to define environment variables for the CI environment, such asSERVICE_NAME
andSAMPLE_VERSION
. - Package.json Updates: Modifies the
package.json
files in both the renderer and editor directories to include new test scripts (all-test
,unit-test
,system-test
) to streamline the testing process. - E2E Test Configuration: Updates the
e2e_test_setup.yaml
ande2e_test_cleanup.yaml
files for both services to remove the--platform
flag fromgcloud run
commands and adds service account configurations. - System Test Updates: Modifies the
system.test.js
files to retrieve the ID token from the environment variables instead of generating it dynamically, and removes the--platform
flag from thegcloud run services describe
command. - Prod Config Update: Removes the
run/markdown-preview/editor
entry from thenodejs-prod.jsonc
file, presumably because the CI migration addresses the previous error.
Changelog
Click here to see the changelog
- .github/config/nodejs-prod.jsonc
- Removes
run/markdown-preview/editor
from the list of services with known issues.
- Removes
- run/markdown-preview/editor/ci-setup.json
- Adds a new file to define CI environment variables
SERVICE_NAME
andSAMPLE_VERSION
.
- Adds a new file to define CI environment variables
- run/markdown-preview/editor/package.json
- Updates test scripts to include
all-test
,unit-test
, andsystem-test
commands.
- Updates test scripts to include
- run/markdown-preview/editor/test/e2e_test_cleanup.yaml
- Removes the
--platform
flag fromgcloud run services delete
andgcloud run services describe
commands. - Adds service account and options configurations for Cloud Build.
- Removes the
- run/markdown-preview/editor/test/e2e_test_setup.yaml
- Removes the
--platform
flag from thegcloud run deploy
command. - Adds service account and options configurations for Cloud Build.
- Removes the
- run/markdown-preview/editor/test/system.test.js
- Retrieves the ID token from the environment variables.
- Removes the
--platform
flag from thegcloud run services describe
command.
- run/markdown-preview/renderer/ci-setup.json
- Adds a new file to define CI environment variables
SERVICE_NAME
andSAMPLE_VERSION
.
- Adds a new file to define CI environment variables
- run/markdown-preview/renderer/package.json
- Updates test scripts to include
all-test
,unit-test
, andsystem-test
commands.
- Updates test scripts to include
- run/markdown-preview/renderer/test/e2e_test_cleanup.yaml
- Removes the
--platform
flag fromgcloud run services delete
andgcloud run services describe
commands. - Adds service account and options configurations for Cloud Build.
- Removes the
- run/markdown-preview/renderer/test/e2e_test_setup.yaml
- Removes the
--platform
flag and adds--add-custom-audiences
to thegcloud run deploy
command. - Adds service account and options configurations for Cloud Build.
- Removes the
- run/markdown-preview/renderer/test/system.test.js
- Retrieves the ID token from the environment variables.
- Removes the
--platform
flag from thegcloud run services describe
command.
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.
Did you know?
Cloud Build allows you to define custom images to use in your build process, giving you complete control over the build environment.
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 renderer and editor to a new CI. The changes involve updating package.json scripts, modifying test configurations, and adjusting Cloud Build configurations. Overall, the changes seem reasonable, but there are a few points that need attention.
Summary of Findings
- Redundant Platform Variable: The
_PLATFORM
variable is being removed from the gcloud run commands in the e2e tests. It's important to verify that this doesn't affect the deployment or functionality of the services, as the platform might have been implicitly defaulted to a specific value. - ID Token Handling: The ID token retrieval logic has been changed in the system tests. It's crucial to ensure that the new approach is reliable and doesn't introduce any security vulnerabilities or authentication issues.
- Test Script Updates: The
test
script inpackage.json
has been updated to run both unit and system tests. It's important to verify that all tests are passing and that the new test setup is working as expected.
Merge Readiness
The pull request introduces several changes to the CI setup and test configurations. While the changes seem to address the migration to a new CI, it's important to ensure that all tests are passing and that the new setup is working as expected. I recommend addressing the comments before merging. I am unable to directly approve the pull request, and users should have others review and approve this code before merging.
Here is the summary of changes. You are about to add 2 region tags.
This comment is generated by snippet-bot.
|
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.
Overall LGTM! Love the detailed updates deep into the tests.
One nit around configs.
Description
Migrates the two Markdown Preview services to the new CI
Note: one unit test is marked Skipped and requires NodeJS/sinon expertise to correctly setup mocking etc (example.com does not respond to POST commands)