-
Notifications
You must be signed in to change notification settings - Fork 2k
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
feat: testing-isolation split into prod and dev #3936
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.
Hi @davidcavazos and reviewers,
I'm currently reviewing this pull request and will post my detailed review in a few minutes. In the meantime, here's a quick summary to help everyone get up to speed:
This PR refactors the testing infrastructure to improve the CI/CD process. The main change is splitting the testing configuration into two separate files: nodejs-prod.jsonc
and nodejs-dev.jsonc
. nodejs-prod.jsonc
includes only consistently passing tests, excluding unsupported packages. nodejs-dev.jsonc
runs all other tests, allowing for iterative development without blocking PRs. The CI workflows (ci-prod.yaml
and ci-dev.yaml
) have been updated to use these respective config files. The ci-dev.yaml
workflow also removes linting, as it's not needed for the experimental tests.
Specifically, the changes include:
- Creation of a new configuration file:
.github/config/nodejs-dev.jsonc
, which lists packages to exclude from the development testing workflow. - Modification of the production configuration file:
.github/config/nodejs-prod.jsonc
, which now only includes packages that consistently pass tests. - Modification of the CI workflows:
.github/workflows/ci-dev.yaml
and.github/workflows/ci-prod.yaml
, to use the new configuration files and adjust the testing process accordingly.
Let me know if you have any questions.
And now, a little haiku to lighten the mood:
Tests split, now we see,
Dev and prod, a clearer path,
Code flows smoothly on.
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 pull request introduces a good approach to separate production and development tests by creating two distinct config files, nodejs-prod.jsonc
and nodejs-dev.jsonc
, and corresponding workflows. This allows for isolating consistently passing tests from those still under development, which helps streamline the PR process by preventing failing tests from blocking PRs. The exclusion logic, where the development configuration excludes passing production tests, effectively focuses development efforts on the areas needing attention. However, consider adding more details to the documentation, specifically the README and CONTRIBUTING files, to explain the new setup, how to run tests with each configuration, and how to update the configuration files.
Failing tests are all under "experimental" which are expected. |
With this, it's safe to disable any workflow that is already covered in prod. |
The following 13 packages were previously not tested on GitHub Actions, but now they are and tests passing:
There are currently 122 packages in prod where tests are passing consistently. There are 52 packages that are currently failing, some of them are parent directories that should actually just be skipped. |
…orm/nodejs-docs-samples into test-isolation-dev-prod
Hello @eddie-santos! I'm Gemini and I'm here to help. Here are some things I can help with via the following comment based commands:
Otherwise you can tag me in a comment via @code-review-assist and I'll do my best to help! |
Gemini encountered an error creating the walkthrough. You can try again by commenting |
@code-review-assist walkthrough |
Gemini encountered an error creating the walkthrough. You can try again by commenting |
@code-review-assist walkthrough |
Google Cloud Platform Node.js Samples WalkthroughThis repository contains Node.js code samples for various Google Cloud Platform (GCP) products. The samples are designed to be used with the official GCP documentation and tutorials, providing practical examples of how to interact with different GCP services. Repository Purpose: The primary goal of this repository is to provide readily usable, well-documented code examples that developers can integrate into their projects. These samples cover a wide range of GCP services, allowing developers to quickly learn and implement GCP functionalities in their Node.js applications. Repository Structure: The repository is organized into subdirectories, each representing a specific GCP product (e.g., Code Flow and Execution:
Pull Request Impact: This pull request, "feat: testing-isolation split into prod and dev," introduces a significant change to the repository's testing infrastructure. It aims to improve the efficiency of the CI/CD pipeline by separating the test suite into two configurations: one for production (
The pull request also duplicates the CI/CD workflow, creating separate workflows for production and development testing. The development workflow omits the linting step, further streamlining the development process. This approach is generally effective in separating stable and unstable tests, but it's crucial to ensure that the production configuration remains comprehensive enough to catch regressions in the main codebase. Regular review and updates to both configurations will be necessary to maintain their effectiveness. Additional Notes: The repository utilizes various tools and configurations for code style enforcement (ESLint, Prettier), automated testing (Mocha), and CI/CD (GitHub Actions). Understanding these tools and their configurations is essential for contributing to the repository effectively. The |
…ples into test-isolation-dev-prod
8d2a19d
to
9036fbf
Compare
Description
Splitting into two different configs, one for prod and one for dev. The prod config contains all the tests that are consistently passing. The dev config is to run everything else that we're still working on.
The prod config excludes packages that are still not supported. The dev config excludes all the packages passing in the prod config, so it will only run "failing" tests, but that way we can keep iterating on them without blocking PRs.
The workflow got copied for the dev config, the only difference is the config file used and that linting doesn't need to happen on the dev workflow.
Checklist
npm test
(see Testing)npm run lint
(see Style)GoogleCloudPlatform/nodejs-docs-samples
. Not a fork.