diff --git a/src/data/nav.yml b/src/data/nav.yml index a27b518c3..03400dc1f 100644 --- a/src/data/nav.yml +++ b/src/data/nav.yml @@ -167,6 +167,8 @@ url: '/build-apps/ab-test/subscribe' - title: See all open source apps url: https://opensource.newrelic.com/nerdpacks/ + - title: Manage New Relic One SDK deprecations + url: '/build-apps/nr1-deprecations' - title: Contribute to quickstarts icon: fe-zap diff --git a/src/images/build-an-app/deprecation-msg.png b/src/images/build-an-app/deprecation-msg.png new file mode 100644 index 000000000..aa87db1f0 Binary files /dev/null and b/src/images/build-an-app/deprecation-msg.png differ diff --git a/src/images/build-an-app/no-deprecation-msg.png b/src/images/build-an-app/no-deprecation-msg.png new file mode 100644 index 000000000..c4315a30d Binary files /dev/null and b/src/images/build-an-app/no-deprecation-msg.png differ diff --git a/src/markdown-pages/build-apps/nr1-deprecations.mdx b/src/markdown-pages/build-apps/nr1-deprecations.mdx new file mode 100644 index 000000000..ab0462ad0 --- /dev/null +++ b/src/markdown-pages/build-apps/nr1-deprecations.mdx @@ -0,0 +1,197 @@ +--- +title: 'Manage New Relic One SDK deprecations' +template: 'GuideTemplate' +description: 'Learn how to manage New Relic One SDK deprecations' +--- + +We at New Relic frequently update the New Relic One SDK. These updates include new features, improvements to existing features, and the deprecation, or removal, of existing features. When we remove a feature, you, as a developer of New Relic One Nerdpacks, need to know because if you don't update your code, it will eventually stop working. + +In this guide, you learn: + +- How to know if an when you'll be affected by deprecations +- How to see the code you need to change +- Where to go for help if you need it + +## Know when we're deprecating features + +When we deprecate features in the New Relic One SDK, we notify you on a predictable schedule so you know what changes will affect your Nerdpack well before they actually do. + +Here's how and when we notify you: + +- Six months before we deprecate a feature or functionality, you see a console **log** +- Four months before we deprecate a feature or functionality, you see a console **warning** +- Two months before we deprecate a feature or functionality, you see a console **error** +- One month before we deprecate a feature or functionality, you see a console **error** + +Once you see a notification that we're deprecating a feature that your Nerdpack uses, you need to test your code in a local environment to see specific instructions on how to deal with the changes. + +## Identify and address deprecations + +When you hear that we're deprecating a feature your Nerdpack uses, you need to identify what feature is impacted and update the relevant code so your app or custom visualization continues to work as you expect. + + + + + +If you already have a local copy of your Nerdpack's repository, make sure you have the latest code. + +<> + +```bash +cd +git pull +``` + + + +Make sure you replace `` with the real path. + + + + + +If not, clone your repository. + +<> + +```bash +git clone +``` + + + +Make sure you replace `` with your reposority's actual url. + + + + + + + + + +If you already have the New Relic One CLI, make sure you have the latest version. + +<> + +```bash +nr1 update +``` + + + +Otherwise, [install it](https://one.newrelic.com/launcher/developer-center.launcher?pane=eyJuZXJkbGV0SWQiOiJkZXZlbG9wZXItY2VudGVyLmhvbWUifQ==) so you can test your Nerdpack locally. + + + + + +Serve your Nerdpack locally: + +<> + +```bash +nr1 nerdpack:serve +``` + + + + + + + +Navigate to your app launcher or custom visualization from the short url at the bottom of your `serve` output: + +<> + +```bash +[output] {purple}Launchers: +[output] ⁎ {green}launcher {blue}https://onenr.io/0A1bcDEfgHi +``` + + + + + + + +Open your browser's developer console and check for deprecation logs, warnings, and errors: + +![Deprecation message](../../images/build-an-app/deprecation-msg.png) + +This message tells you not only the code that's affected by the deprecation, but also the due date for updating it. + + + + + +Update your code: + +<> + +```js lineHighlight=3 +return + {({ data }) => { + return ; + }} +; +``` + + + +In this example, the `accountId` property for `NrqlQuery` is changing to `accountIds`. For your actual Nerdpack, the deprecation message will tell you what you need to change. + +While still serving your application, your Nerdpack updates automatically in the browser when you save your file. + + + + + +Check your console again: + +![No deprecation message](../../images/build-an-app/no-deprecation-msg.png) + +When you fix your code, your console no longer logs a deprecation message. + + + + + +Commit your code and push it to your remote repository: + +<> + +```bash +git commit -am "fix: deprecated code" +git push origin +``` + + + + + + + +[Publish your updated Nerdpack](/build-apps/publish-deploy/publish/) to the New Relic One catalog. + + + + + +We strive to write clear messages so you know when and how you need to change your code to address deprecated features. + +However, it may still be valuable for you to reach out to our community channels if you need further assistance. + +## Get help from the New Relic community + +Our global support team doesn't officially support Nerdpacks. That said, if you still need help, you can: + +- Post in the [Explorers Hub](https://discuss.newrelic.com) +- Post in [GitHub Discussions](https://github.com/newrelic/opensource-website/discussions/897) +- Ask your New Relic account manager or technical support engineer for help, if you have one + +Once you've cleared all the deprecation messages from your Nerdpack and you've published it to the catalog, you can rest easy, knowing your code won't be impacted by this round of deprecations. \ No newline at end of file