-
-
Notifications
You must be signed in to change notification settings - Fork 70
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: Introduce ecosystem tests for popular plugins #127
base: main
Are you sure you want to change the base?
Changes from 4 commits
d55fe1a
9baeb50
a52ca5e
1329c1a
cdb2677
071532d
7d61947
d1ab08b
994a1a8
2dcf2be
5a79c72
e663bf3
91aa502
4612800
8fd5da4
0f518bf
c176a7e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -3,11 +3,11 @@ | |||||
- RFC PR: <https://github.com/eslint/rfcs/pull/127> | ||||||
- Authors: [Josh Goldberg](https://github.com/JoshuaKGoldberg) | ||||||
|
||||||
# Introduce ecosystem tests for popular third-party plugins | ||||||
# Introduce ecosystem tests for popular plugins | ||||||
|
||||||
## Summary | ||||||
|
||||||
Adding an CI job to the `eslint/eslint` repo that checks changes against a small selection of third-party plugins. | ||||||
Adding an CI job to the `eslint/eslint` repo that checks changes against `@eslint/*` plugins as well as a small selection of third-party plugins. | ||||||
|
||||||
## Motivation | ||||||
|
||||||
|
@@ -67,7 +67,7 @@ Depending on specifics of plugin rule reports would make the job prone to failur | |||||
|
||||||
### Failure Handling | ||||||
|
||||||
It is theoretically possible that the ecosystem CI job will occasionally be broken by updates to ecosystem plugins. | ||||||
It is theoretically possible that the ecosystem CI job will occasionally be broken by updates to plugins. | ||||||
However, this RFC believes that case will be exceedingly rare and short-lived: | ||||||
|
||||||
- Per [Plugin Selection](#plugin-selection), only very stable plugins that test on multiple ESLint versions including the latest will be selected | ||||||
|
@@ -103,30 +103,33 @@ Otherwise the ESLint repository will assume only supporting up to the currently | |||||
|
||||||
The plugins that will be included to start will be: | ||||||
|
||||||
- All `@eslint/*` plugins, including [`@eslint/css`](https://www.npmjs.com/package/@eslint/css), [`@eslint/json`](https://www.npmjs.com/package/@eslint/json), and [`@eslint/markdown`](https://www.npmjs.com/package/@eslint/markdown) | ||||||
- [`eslint-plugin-eslint-comments`](https://github.com/eslint-community/eslint-plugin-eslint-comments): to capture an `eslint-community` project and AST edge cases around comments | ||||||
- [`eslint-plugin-unicorn`](https://github.com/sindresorhus/eslint-plugin-unicorn): to capture a large selection of miscellaneous rules | ||||||
- [`eslint-plugin-vue`](https://github.com/vuejs/eslint-plugin-vue): to capture support for a framework with nested parsing of a non-JavaScript/TypeScript-standard syntax | ||||||
- [`typescript-eslint`](https://github.com/typescript-eslint/typescript-eslint): to capture testing TypeScript APIs and intricate uses of parsing in general | ||||||
|
||||||
Plugins will be selectively added if they meet all of the following criteria: | ||||||
Third-party plugins will be selectively added if they meet all of the following criteria: | ||||||
|
||||||
- >1 million npm downloads a week: arbitrary large size threshold to avoid small packages | ||||||
- Adding a notable new API usage not yet covered: to avoid duplicate equivalent plugins | ||||||
- Has had a breakage reported on ESLint: to be cautious in adding to the list | ||||||
- Is under active maintenance and has taken a week or less to fix any ESLint breakages within the last year: to avoid packages that won't be updated quickly on failures | ||||||
|
||||||
The number of plugins should remain small. | ||||||
Each added plugin brings adds the risk of third-party breakage, so plugins will only be added after filing a new issue and gaining team consensus. | ||||||
The number of third-party plugins should remain small. | ||||||
Each added plugin brings adds a risk of breakage, so plugins will only be added after filing a new issue and gaining team consensus. | ||||||
|
||||||
### Rollout | ||||||
|
||||||
This RFC expects the added ecosystem CI job to _likely_ consistently pass. | ||||||
However, to be safe, this RFC proposes adding a CI job in three steps: | ||||||
A CI job will be added to the `eslint/eslint` issue, but will not immediately be a part of `main` branch or PR branch builds. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
To be safe, this RFC proposes rolling out CI job in three steps: | ||||||
|
||||||
1. On a branch that is manually updated from `main` several times a week | ||||||
1. On a CI cron job once a day, targeting the `main` branch but not blocking its builds | ||||||
2. On the `main` branch only | ||||||
3. On all PRs targeting the `main` branch, alongside existing CI jobs | ||||||
|
||||||
Starting with a job separately from `main` ensures that unexpectedly high frequencies of breakages are caught early, without blocking `main` branch builds. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm a bit confused by this process. Is the intent that we end up with all three at the end? Or just number 3? And I'm unclear on the value of number 2. Presumably, this is meant to run only after a PR is merged, but how will we be notified if the job fails? |
||||||
At least one month should be held between those steps to make sure the job is consistently passing. | ||||||
|
||||||
## Out of Scope | ||||||
|
@@ -152,6 +155,14 @@ Even when all packages in an ecosystem are well-tested the way ESLint and its ma | |||||
|
||||||
> [Venerable xkcd "Workflow" comic](https://xkcd.com/1172) | ||||||
|
||||||
### What if a breakage causes rules to report incorrectly, but doesn't cause `npm lint` to crash? | ||||||
|
||||||
Checking for incorrect rule reports is not handled by this RFC. | ||||||
All recent significant downstream breakages caused rules to fully crash. | ||||||
|
||||||
Any kind of rule report verification would necessitate ecosystem tests taking a dependency on the specific reports from downstream plugins. | ||||||
This RFC does not believe the effort of keeping snapshots of those reports up-to-date as worthwhile. | ||||||
|
||||||
## Related Discussions | ||||||
|
||||||
- [Repo: add end-to-end/integration tests for popular 3rd party plugins](https://github.com/eslint/eslint/issues/19139) |
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.