-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add migration guides for all packages
There's a small maintenance overhead to adding these but I think they're far more clear than a changelog for major breaking versions. We need to include a lot of extra context and information and I think these guides will reduce questions from other teams.
- Loading branch information
1 parent
016096e
commit d62567d
Showing
20 changed files
with
469 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
# Migration guide for @dotcom-reliability-kit/app-info | ||
|
||
This document outlines how to migrate to the latest version of the Reliability Kit app-info package. Throughout this guide we use the following emoji and labels to indicate the level of change required: | ||
|
||
Emoji | Label | Meaning | ||
----------------|:------------------|:------- | ||
:red_circle: | Breaking | A breaking change which will likely require code or config changes to resolve | ||
:orange_circle: | Possibly Breaking | A breaking change that is unlikely to require code changes but things outside of the code (e.g. logs) may have changed | ||
|
||
* [Migrating from v1 to v2](#migrating-from-v1-to-v2) | ||
* [Node.js 14 is no longer supported](#nodejs-14-is-no-longer-supported) | ||
* [Migrating from v2 to v3](#migrating-from-v2-to-v3) | ||
* [Node.js 16 is no longer supported](#nodejs-16-is-no-longer-supported) | ||
|
||
|
||
## Migrating from v1 to v2 | ||
|
||
### Node.js 14 is no longer supported | ||
|
||
**:red_circle: Breaking:** this version drops support for Node.js v14. If your app is already using Node.js v16 or above then you can migrate with no code changes. | ||
|
||
|
||
## Migrating from v2 to v3 | ||
|
||
### Node.js 16 is no longer supported | ||
|
||
**:red_circle: Breaking:** this version drops support for Node.js v16. If your app is already using Node.js v18 or above then you can migrate with no code changes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
|
||
# Migration guide for @dotcom-reliability-kit/crash-handler | ||
|
||
This document outlines how to migrate to the latest version of the Reliability Kit crash-handler package. Throughout this guide we use the following emoji and labels to indicate the level of change required: | ||
|
||
Emoji | Label | Meaning | ||
----------------|:------------------|:------- | ||
:red_circle: | Breaking | A breaking change which will likely require code or config changes to resolve | ||
:orange_circle: | Possibly Breaking | A breaking change that is unlikely to require code changes but things outside of the code (e.g. logs) may have changed | ||
|
||
* [Migrating from v1 to v2](#migrating-from-v1-to-v2) | ||
* [Node.js 14 is no longer supported](#nodejs-14-is-no-longer-supported) | ||
* [Migrating from v2 to v3](#migrating-from-v2-to-v3) | ||
* [Switch to Reliability Kit logger](#switch-to-reliability-kit-logger) | ||
* [Remove Sentry workarounds](#remove-sentry-workarounds) | ||
* [Migrating from v3 to v4](#migrating-from-v3-to-v4) | ||
* [Node.js 16 is no longer supported](#nodejs-16-is-no-longer-supported) | ||
|
||
|
||
## Migrating from v1 to v2 | ||
|
||
### Node.js 14 is no longer supported | ||
|
||
**:red_circle: Breaking:** this version drops support for Node.js v14. If your app is already using Node.js v16 or above then you can migrate with no code changes. | ||
|
||
|
||
## Migrating from v2 to v3 | ||
|
||
### Switch to Reliability Kit logger | ||
|
||
**:orange_circle: Possibly Breaking:** this version switches to use [Reliability Kit's logger](https://github.com/Financial-Times/dotcom-reliability-kit/tree/main/packages/logger#readme) by default. This means that logs will not be sent directly to Splunk but will be sent to `stdout`. This may mean you lose some logs if you haven't configured your app to forward these logs somewhere more permanent. | ||
|
||
You may not need to change anything for this upgrade, for example, if your app uses Heroku log drains _or_ a Lambda log forwarder. [The logger migration guide has more information](https://github.com/Financial-Times/dotcom-reliability-kit/blob/main/packages/logger/docs/migration.md#n-logger-where-logs-get-sent). | ||
|
||
If you can't switch to Reliability Kit logger yet, then you can still use [n-logger](https://github.com/Financial-Times/n-logger) (the previous default logger) by manually passing it as an option when initialising Crash Handler: | ||
|
||
```js | ||
const registerCrashHandler = require('@dotcom-reliability-kit/crash-handler'); | ||
const nLogger = require('@financial-times/n-logger').default; | ||
|
||
registerCrashHandler({ | ||
logger: nLogger | ||
}); | ||
``` | ||
|
||
### Remove Sentry workarounds | ||
|
||
**:orange_circle: Possibly Breaking:** this only impacts apps that use [n-express](https://github.com/Financial-Times/n-express) v27 or older. Previously, this module contained code to disable the default [Sentry](https://sentry.io/) error handling which was enabled by n-express. | ||
|
||
You can safely migrate to this version of Crash Handler if your app is either _not_ using n-express or is using n-express v28 or above. | ||
|
||
|
||
## Migrating from v3 to v4 | ||
|
||
### Node.js 16 is no longer supported | ||
|
||
**:red_circle: Breaking:** this version drops support for Node.js v16. If your app is already using Node.js v18 or above then you can migrate with no code changes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
# Migration guide for @dotcom-reliability-kit/errors | ||
|
||
This document outlines how to migrate to the latest version of the Reliability Kit errors package. Throughout this guide we use the following emoji and labels to indicate the level of change required: | ||
|
||
Emoji | Label | Meaning | ||
----------------|:------------------|:------- | ||
:red_circle: | Breaking | A breaking change which will likely require code or config changes to resolve | ||
:orange_circle: | Possibly Breaking | A breaking change that is unlikely to require code changes but things outside of the code (e.g. logs) may have changed | ||
|
||
* [Migrating from v1 to v2](#migrating-from-v1-to-v2) | ||
* [Node.js 14 is no longer supported](#nodejs-14-is-no-longer-supported) | ||
* [Migrating from v2 to v3](#migrating-from-v2-to-v3) | ||
* [Node.js 16 is no longer supported](#nodejs-16-is-no-longer-supported) | ||
|
||
|
||
## Migrating from v1 to v2 | ||
|
||
### Node.js 14 is no longer supported | ||
|
||
**:red_circle: Breaking:** this version drops support for Node.js v14. If your app is already using Node.js v16 or above then you can migrate with no code changes. | ||
|
||
|
||
## Migrating from v2 to v3 | ||
|
||
### Node.js 16 is no longer supported | ||
|
||
**:red_circle: Breaking:** this version drops support for Node.js v16. If your app is already using Node.js v18 or above then you can migrate with no code changes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
|
||
# Migration guide for @dotcom-reliability-kit/eslint-config | ||
|
||
This document outlines how to migrate to the latest version of the Reliability Kit eslint-config package. Throughout this guide we use the following emoji and labels to indicate the level of change required: | ||
|
||
Emoji | Label | Meaning | ||
----------------|:------------------|:------- | ||
:red_circle: | Breaking | A breaking change which will likely require code or config changes to resolve | ||
:orange_circle: | Possibly Breaking | A breaking change that is unlikely to require code changes but things outside of the code (e.g. logs) may have changed | ||
|
||
* [Migrating from v1 to v2](#migrating-from-v1-to-v2) | ||
* [Additional default ESLint rules added (v2)](#additional-default-eslint-rules-added-v2) | ||
* [Migrating from v2 to v3](#migrating-from-v2-to-v3) | ||
* [Node.js 16 is no longer supported](#nodejs-16-is-no-longer-supported) | ||
|
||
|
||
## Migrating from v1 to v2 | ||
|
||
### Additional default ESLint rules added (v2) | ||
|
||
**:orange_circle: Possibly Breaking:** this version adds a few new ESLint rules to the default configuration, the following rules now error: | ||
|
||
* [eqeqeq](https://eslint.org/docs/latest/rules/eqeqeq) | ||
* [no-extend-native](https://eslint.org/docs/latest/rules/no-extend-native) | ||
* [no-irregular-whitespace](https://eslint.org/docs/latest/rules/no-irregular-whitespace) | ||
* [no-undef](https://eslint.org/docs/latest/rules/no-undef) | ||
* [no-unused-vars](https://eslint.org/docs/latest/rules/no-unused-vars) | ||
|
||
You may need to make changes to your code if these linting errors are found. | ||
|
||
|
||
## Migrating from v2 to v3 | ||
|
||
### Node.js 16 is no longer supported | ||
|
||
**:red_circle: Breaking:** this version drops support for Node.js v16. If your app is already using Node.js v18 or above then you can migrate with no code changes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
|
||
# Migration guide for @dotcom-reliability-kit/log-error | ||
|
||
This document outlines how to migrate to the latest version of the Reliability Kit log-error package. Throughout this guide we use the following emoji and labels to indicate the level of change required: | ||
|
||
Emoji | Label | Meaning | ||
----------------|:------------------|:------- | ||
:red_circle: | Breaking | A breaking change which will likely require code or config changes to resolve | ||
:orange_circle: | Possibly Breaking | A breaking change that is unlikely to require code changes but things outside of the code (e.g. logs) may have changed | ||
|
||
* [Migrating from v1 to v2](#migrating-from-v1-to-v2) | ||
* [Node.js 14 is no longer supported](#nodejs-14-is-no-longer-supported) | ||
* [Migrating from v2 to v3](#migrating-from-v2-to-v3) | ||
* [Switch to Reliability Kit logger](#switch-to-reliability-kit-logger) | ||
* [Unhandled errors now have a level of fatal](#unhandled-errors-now-have-a-level-of-fatal) | ||
* [Migrating from v3 to v4](#migrating-from-v3-to-v4) | ||
* [Node.js 16 is no longer supported](#nodejs-16-is-no-longer-supported) | ||
|
||
|
||
## Migrating from v1 to v2 | ||
|
||
### Node.js 14 is no longer supported | ||
|
||
**:red_circle: Breaking:** this version drops support for Node.js v14. If your app is already using Node.js v16 or above then you can migrate with no code changes. | ||
|
||
|
||
## Migrating from v2 to v3 | ||
|
||
### Switch to Reliability Kit logger | ||
|
||
**:orange_circle: Possibly Breaking:** this version switches to use [Reliability Kit's logger](https://github.com/Financial-Times/dotcom-reliability-kit/tree/main/packages/logger#readme) by default. This means that logs will not be sent directly to Splunk but will be sent to `stdout`. This may mean you lose some logs if you haven't configured your app to forward these logs somewhere more permanent. | ||
|
||
You may not need to change anything for this upgrade, for example, if your app uses Heroku log drains _or_ a Lambda log forwarder. [The logger migration guide has more information](https://github.com/Financial-Times/dotcom-reliability-kit/blob/main/packages/logger/docs/migration.md#n-logger-where-logs-get-sent). | ||
|
||
If you can't switch to Reliability Kit logger yet, then you can still use [n-logger](https://github.com/Financial-Times/n-logger) (the previous default logger) by manually passing it as an option when logging errors: | ||
|
||
```js | ||
const { logHandledError } = require('@dotcom-reliability-kit/log-error'); | ||
const nLogger = require('@financial-times/n-logger').default; | ||
|
||
logHandledError({ | ||
error: new Error('Something went wrong'), | ||
logger: nLogger | ||
}); | ||
``` | ||
|
||
### Unhandled errors now have a level of fatal | ||
|
||
**:orange_circle: Possibly Breaking:** errors logged with `logUnhandledError` will now have a `level` property of `fatal` rather than `error`. This shouldn't require code changes but you may need to update your saved Splunk searches or dashboards. | ||
|
||
|
||
## Migrating from v3 to v4 | ||
|
||
### Node.js 16 is no longer supported | ||
|
||
**:red_circle: Breaking:** this version drops support for Node.js v16. If your app is already using Node.js v18 or above then you can migrate with no code changes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.