Skip to content

Commit

Permalink
Merge branch 'develop' into pm-handbook
Browse files Browse the repository at this point in the history
  • Loading branch information
austin-schaefer committed Aug 16, 2021
2 parents 9a1fbf3 + a975607 commit 43fc023
Show file tree
Hide file tree
Showing 141 changed files with 1,265 additions and 651 deletions.
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/content-issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ labels: content
assignees: ''
---

<!-- NOTE: New Relic is honoring employees with a Relic Recharge Week. This means many of us are out of the office from August 9th through August 13th. We'll take a look at your issue as soon as we're back on August 16.
Or, if your issue is urgent, you can reach out to our support team
at support.newrelic.com. -->

<!-- Thanks for filing an issue on our docs! -->

<!-- This repo is public. Anything you share here is visible to the world. -->
Expand Down
11 changes: 9 additions & 2 deletions .github/ISSUE_TEMPLATE/site-bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,16 @@ labels: bug, eng
assignees: ''
---

<!-- Please fill out each section below, otherwise, your issue will be closed. This info allows our engineers to diagnose your issue as quickly as possible. **THIS REPO IS PUBLIC. Any information included in this form is accessible on the internet!**
<!-- NOTE: New Relic is honoring employees with a Relic Recharge Week. This means many of us are out of the office from August 9th through August 13th. We'll take a look at your issue as soon as we're back on August 16.
Or, if your issue is urgent, you can reach out to our support team
at support.newrelic.com. -->

** Check for existing issues**: Before opening a new issue, please search existing issues: https://github.com/newrelic/docs-website/issues -->
<!-- Please fill out each section below. This info allows our engineers to
diagnose your issue as quickly as possible. This repo is public. Anything you
share here is visible to the world. -->

<!-- ** Check for existing issues**: Before opening a new issue, please search
existing issues: https://github.com/newrelic/docs-website/issues -->

### Description

Expand Down
11 changes: 9 additions & 2 deletions .github/ISSUE_TEMPLATE/site-enhancement.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,16 @@ labels: enhancement, eng
assignees: ''
---

<!-- Please fill out each section below, otherwise, your issue will be closed. This info allows our engineers to diagnose your issue as quickly as possible. **THIS REPO IS PUBLIC. Any information included in this form is accessible on the internet!**
<!-- NOTE: New Relic is honoring employees with a Relic Recharge Week. This means many of us are out of the office from August 9th through August 13th. We'll take a look at your issue as soon as we're back on August 16.
Or, if your issue is urgent, you can reach out to our support team
at support.newrelic.com. -->

DISCLAIMER: Not every feature request will be worked on, but hearing about what you want is important. Don't be afraid to add a feature request! -->
<!-- Please fill out each section below. This info allows our engineers to
diagnose your issue as quickly as possible. This repo is public. Anything you
share here is visible to the world. -->

<!-- DISCLAIMER: Not every feature request will be worked on, but hearing about
what you want is important. Don't be afraid to add a feature request! -->

### Is your feature request related to a problem? Please describe

Expand Down
5 changes: 5 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!-- NOTE: New Relic is on a company-wide vacation the week of August 9 through
August 12. We'll take a look at your PR as soon as we're back on
August 16. Or, if your issue is urgent, you can reach out to our support team
at support.newrelic.com. -->

<!-- Thanks for contributing to our docs! -->

<!-- For Japanese readers:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/check-translations-and-deserialize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ on:
- cron: '0 12 * * *'

env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
TRANSLATION_VENDOR_API_URL: ${{ secrets.TRANSLATION_VENDOR_API_URL }}
TRANSLATION_VENDOR_PROJECT: ${{ secrets.TRANSLATION_VENDOR_PROJECT }}
TRANSLATION_VENDOR_USER: ${{ secrets.TRANSLATION_VENDOR_USER }}
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/get-slugs-to-translate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ on:
- '**.mdx'

env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
DB_CONNECTION_INFO: ${{ secrets.DB_CONNECTION_INFO }}

jobs:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/send-content-to-translate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ on:
- cron: '0 1 1,15 * *'

env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
TRANSLATION_VENDOR_API_URL: ${{ secrets.TRANSLATION_VENDOR_API_URL }}
TRANSLATION_VENDOR_PROJECT: ${{ secrets.TRANSLATION_VENDOR_PROJECT }}
TRANSLATION_VENDOR_USER: ${{ secrets.TRANSLATION_VENDOR_USER }}
Expand Down
36 changes: 3 additions & 33 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
- [Use `chore`](#use-chore)
- [Use `fix`](#use-fix)
- [Use `feat`](#use-feat)
- [Deploy previews with Amplify](#deploy-previews-with-amplify)
- [Deploy previews with Gatsby Cloud](#deploy-previews-with-gatsby-cloud)
- [Reusable components](#reusable-components)
- [Editing existing pages](#editing-existing-pages)
- [Private edits](#private-edits)
Expand All @@ -32,7 +32,6 @@
- [Step 5](#step-5)
- [Troubleshooting](#troubleshooting)
- [General Install, compile or build issues](#general-install-compile-or-build-issues)
- [Build / compile issues on the Apple M1 chipset](#build--compile-issues-on-the-apple-m1-chipset)
- [Problems with yarn start](#problems-with-yarn-start)

## Guidelines for contributing
Expand Down Expand Up @@ -180,9 +179,9 @@ git commit -m "fix: typo and prop error in the code of conduct"
git commit -m "feat(media): creating a video landing page"
```

### Deploy previews with Amplify
### Deploy previews with Gatsby Cloud

PRs that are opened from a branch in this repo (not forks) will generate preview links on Amplify automatically. Amplify preview links can be found within the PR under the `Checks` Tab.
PRs that are opened from a branch in this repo (not forks) will generate preview links on Gatsby Cloud automatically. Gatsby Cloud preview links are posted as comments on your pull request when they are done building. You can monitor the progress via the `Gatsby Build Service` job under the `Checks` section.

## Reusable components

Expand Down Expand Up @@ -270,35 +269,6 @@ Many of the common errors you'll face can be resolve by the following:

As a last resort, you can completely delete the `node_modules` folder in the root project directory, and re-run `yarn`

### Build / compile issues on the Apple M1 chipset

If you are working on an M1 Mac, you may run into an error like the following when installing node_modules:

```bash
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
CC(target) Release/obj.target/nothing/../node-addon-api/nothing.o
LIBTOOL-STATIC Release/nothing.a
warning: /Library/Developer/CommandLineTools/usr/bin/libtool: archive library: Release/nothing.a the table of contents is empty (no object file members in the library define global symbols)
TOUCH Release/obj.target/libvips-cpp.stamp
CXX(target) Release/obj.target/sharp/src/common.o
../src/common.cc:23:10: fatal error: 'vips/vips8' file not found
include <vips/vips8>
1 error generated.
make: *** [Release/obj.target/sharp/src/common.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/me/.nvm/versions/node/v15.4.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (node:events:376:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:284:12)
gyp ERR! System Darwin 20.3.0
gyp ERR! command "/Users/me/.nvm/versions/node/v15.4.0/bin/node" "/Users/me/.nvm/versions/node/v15.4.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/me/dev/docs-website/node_modules/sharp
```

**Solution**

https://github.com/lovell/sharp/issues/2460#issuecomment-768558230

### Problems with yarn start

When you start up the site via `yarn start`, you may see errors in your terminal like the following:
Expand Down
24 changes: 0 additions & 24 deletions amplify.yml

This file was deleted.

2 changes: 1 addition & 1 deletion gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ const rehypeStringify = require('rehype-stringify');
const addAbsoluteImagePath = require('./rehype-plugins/utils/addAbsoluteImagePath');
const getAgentName = require('./src/utils/getAgentName');

const siteUrl = 'https://docs.newrelic.com';
const dataDictionaryPath = `${__dirname}/src/data-dictionary`;
const siteUrl = 'https://docs.newrelic.com';
const additionalLocales = ['jp'];
const quote = (str) => `"${str}"`;

Expand Down
25 changes: 22 additions & 3 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
externalRedirects.forEach(({ url, paths }) => {
paths.forEach((path) => {
createRedirect({
fromPath: appendTrailingSlash(path),
fromPath: path,
toPath: url,
isPermanent: true,
redirectInBrowser: true,
Expand Down Expand Up @@ -337,16 +337,35 @@ const createLocalizedRedirect = ({
isPermanent = true,
createRedirect,
}) => {
// Create redirects for paths with and without a trailing slash
const pathWithTrailingSlash = hasTrailingSlash(fromPath)
? fromPath
: path.join(fromPath, '/');
const pathWithoutTrailingSlash = pathWithTrailingSlash.slice(0, -1);

createRedirect({
fromPath: pathWithTrailingSlash,
toPath: appendTrailingSlash(toPath),
isPermanent,
redirectInBrowser,
});

createRedirect({
fromPath: appendTrailingSlash(fromPath),
fromPath: pathWithoutTrailingSlash,
toPath: appendTrailingSlash(toPath),
isPermanent,
redirectInBrowser,
});

locales.forEach((locale) => {
createRedirect({
fromPath: appendTrailingSlash(path.join(`/${locale}`, fromPath)),
fromPath: path.join(`/${locale}`, pathWithTrailingSlash),
toPath: appendTrailingSlash(path.join(`/${locale}`, toPath)),
isPermanent,
redirectInBrowser,
});
createRedirect({
fromPath: path.join(`/${locale}`, pathWithoutTrailingSlash),
toPath: appendTrailingSlash(path.join(`/${locale}`, toPath)),
isPermanent,
redirectInBrowser,
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@
"scripts": {
"build": "gatsby build",
"develop": "gatsby develop",
"reboot": "rm -rf node_modules && yarn && yarn clean && yarn start",
"build:production": "GATSBY_NEWRELIC_ENV=production yarn run build",
"build:staging": "GATSBY_NEWRELIC_ENV=staging yarn run build",
"generate-whatsnew-ids": "node scripts/actions/generate-whats-new-ids.js",
Expand Down
25 changes: 25 additions & 0 deletions plugins/gatsby-plugin-generate-doc-json/utils/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,31 @@ module.exports = {
th: (h, node) => h(node, 'th', {}, all(h, node)),
td: (h, node) => h(node, 'td', {}, all(h, node)),
var: (h, node) => h(node, 'var', {}, [u('text', toString(node))]),
Video: (h, node) => {
const id = findAttribute('id', node);
const type = findAttribute('type', node);
const videoPlatforms = {
youtube: (id) => `//www.youtube.com/embed/${id}?modestbranding=1`,
wistia: (id) => `//fast.wistia.net/embed/iframe/${id}`,
};

return h(
node,
'div',
{
className: 'iframe-wrapper',
},
[
h(node, 'iframe', {
src: videoPlatforms[type](id),
allow:
'accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture',
allowFullScreen: true,
frameborder: '0',
}),
]
);
},
mark: (h, node) => h(node, 'mark', {}, [u('text', toString(node))]),
figcaption: (h, node) =>
h(node, 'div', { className: ['meta'] }, all(h, node)),
Expand Down
4 changes: 4 additions & 0 deletions scripts/actions/release-notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from invoke import run
import os
import re
import json

# Get token from Workflow environment variable
token = os.getenv('GITHUB_TOKEN', '...')
Expand Down Expand Up @@ -32,6 +33,9 @@
except AttributeError:
pass

# Encode the string to escape characters
result = json.dumps(result)

# Set result as an Env for use in Workflow
run('echo "RESULT<<EOF" >> $GITHUB_ENV')
run('echo "%s" >> $GITHUB_ENV' % result)
Expand Down
39 changes: 0 additions & 39 deletions scripts/actions/utils/load-from-db.js

This file was deleted.

50 changes: 0 additions & 50 deletions scripts/actions/utils/save-to-db.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ Options for finding your account ID:

* If your organization has multiple accounts: From [one.newrelic.com](https://one.newrelic.com), use the account selector dropdown near the top of the page to switch between accounts and see their IDs.
* There are other options, depending on which [account/user model](/docs/accounts/original-accounts-billing/original-product-based-pricing/overview-changes-pricing-user-model/#user-models) you're on:
* Original user model: Click the [account dropdown](/docs/using-new-relic/welcome-new-relic/get-started/glossary#account-dropdown), click **Account settings**, and then click **API keys**. The account ID is displayed there.
* New Relic One user model: Click the [account dropdown](/docs/using-new-relic/welcome-new-relic/get-started/glossary#account-dropdown) and then click **Administration**. Click **Organization and access** and then **Accounts** to see account IDs.
* Original user model: Click the [account dropdown](/docs/using-new-relic/welcome-new-relic/get-started/glossary#account-dropdown), click **Account settings**, and then click **API keys**. The account ID is displayed there.


For more on how account access works, see [Factors affecting access](/docs/new-relic-one/use-new-relic-one/core-concepts/cross-account-features-security-new-relic-one).
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ redirects:
- /docs/accounts/install-new-relic/account-setup/license-key
---

Your New Relic license key is a 40-character hexadecimal string created when you [sign up](/docs/subscriptions/creating-your-new-relic-account) for a New Relic account. It's used to determine the account to which you send your APM and infrastructure data, and some New Relic features will require you to input it.
Your New Relic license key is a 40-character hexadecimal string created when you [sign up](https://newrelic.com/signup) for a New Relic account. It's used to determine the account to which you send your APM and infrastructure data, and some New Relic features will require you to input it.

<Callout variant="important">
To prevent unexpected data to be sent to your account, treat your license key securely.
Expand Down

0 comments on commit 43fc023

Please sign in to comment.