apollographql / apollographql/apollo-tooling
Ability to run service check against all registered operations
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 460
- PR merge metrics
- No merged PRs in 30d
Description
At my company, we’ve set up our CI environment with `service:check` and `client:check` commands, but after a while we realized that the asymmetry between the two is causing us too much pain and we’ve had to disable `client:check`. The asymmetry problem is as such: `client:check` validates *all* operations in the client code, but `service:check` only validates against operations seen during the validation period.
This poses a loophole, since `service:check` is more permissive than `client:check` and can sometimes allow breaking changes, which in turn cause the client’s CI suite to go red.
A couple of examples include:
1. Code for an un-launched feature exists in the client code. A backend PR erroneously removes a field used by the un-launched feature code. The backend PR passes `service:check` (because the feature isn't live) and is merged and deployed, subsequently the client’s CI suite is red for all branches (`client:check` fails).
2. An infrequently-used feature exists in the client code. A backend PR erroneously removes a field used by said feature. The backend PR passes `service:check` (because the feature hasn’t been used during the validation period) and is merged and deployed, subsequently the client’s CI is red for all branches (`client:check` fails).
This situation is problematic because it allows backend developers to merge in code that we could have identified as a breaking change earlier, and it causes a lot of noise for all developers working on the frontend client (in our case that's quite a lot of people).
Currently service check only operates against a validation window. However if we could run it instead against a specific list of operations (such as those specified by `client:push` for a list of supported clients), this would solve the problem.
Let me know if you have any questions!
Contributor guide
Assessment
This issue has not been assessed yet.