• /
  • Log in

Tag your Nerdpack's release version

Tag your Nerdpack versions to track and subscribe to them. Untag versions to prevent subscriptions or hide Nerdpacks from the catalog.

Update your CLI

Before you run any commands, ensure that you have the latest version of the CLI:

bash
$
nr1 update

Check your permissions

To tag a Nerdpack version, you need:

Publish your Nerdpack

You need to publish Nerdpacks that you create before you can tag them.

Tag a version

After you've published a Nerdpack version to the New Relic One catalog, you can tag it with the nr1 CLI.

Step 1 of 2

In the root folder of your Nerdpack, run nr1 nerdpack:tag:

bash
$
nr1 nerdpack:tag --tag=DEV
Tagged ab123c45-678d-9012-efg3-45hi6jkl7890 version 1.0.0 as DEV.

Here, you tagged version 1.0.0 as DEV.

Now, you, and other users on your account, can use this tag:

  • You see the tag as an option to subscribe to when you add the Nerdpack to your account
  • If you subscribe to the DEV tag and it gets updated later—say, DEV is applied to version 1.0.1—you automatically get upgraded to the new version without having to subscribe again.

Important

One of the features of tagging release versions is that users who are subscribed to a tag automatically get updates when that tag is used for another version. This means that if a user is testing one version, say 1.0.0, and you apply that same tag to another version, say 1.0.1, that user will see version 1.0.1 in their account, and they can no longer access the Nerdpack they were testing before. Often times, this is the expected behavior, but make sure you consider this side effect when you use tags.

Step 2 of 2

View your Nerdpack's registry information:

bash
$
nr1 nerdpack:info
Id: ab123c45-678d-9012-efg3-45hi6jkl7890
Region: us
Account ID: 1234567
Local version: 1.0.0
Subscription Model: OWNER_AND_ALLOWED
Version Count: 1
Version Date Tags
------- ----------- ----
1.0.0 5 hours ago DEV

This output confirms your DEV tag on version 1.0.0.

Untag a version

As you build more versions of your Nerdpack, you may update your tags to newer versions. However, you can also remove a tag from your Nerdpack with nr1.

Step 1 of 3

From your Nerdpack's root directory, view your registry information:

bash
$
nr1 nerdpack:info
Id: ab123c45-678d-9012-efg3-45hi6jkl7890
Region: us
Account ID: 1234567
Local version: 1.0.0
Subscription Model: OWNER_AND_ALLOWED
Version Count: 1
Version Date Tags
------- ----------------- ----
2.0.0 a few seconds ago DEV
1.0.1 8 minutes ago BETA, STABLE
1.0.0 6 hours ago

Here, you see that version 1.0.0 has no tags, version 1.0.1 has two tags, BETA and STABLE, and version 2.0.0 has one tag, DEV.

Step 2 of 3

Remove the BETA tag from your Nerdpack versions:

bash
$
nr1 nerdpack:untag --tag=BETA
Removed nerdpack ab123c45-678d-9012-efg3-45hi6jkl7890 tag BETA.
Step 3 of 3

Verify that the tag was removed from your Nerdpack:

bash
$
nr1 nerdpack:info
Id: ab123c45-678d-9012-efg3-45hi6jkl7890
Region: us
Account ID: 1234567
Local version: 1.0.0
Subscription Model: OWNER_AND_ALLOWED
Version Count: 1
Version Date Tags
------- -------------- ----
2.0.0 5 minutes ago DEV
1.0.1 13 minutes ago STABLE
1.0.0 6 hours ago

Resolve issues with tagging a Nerdpack version

Sometimes, when you tag to a Nerdpack version, you may come across issues. Whether you can't tag your Nerdpack or you can't untag your Nerdpack, consider some common solutions for resolving these issues.

Publish your Nerdpack

If you try to tag your Nerdpack without first publishing it, you'll get an error:

bash
$
nr1 nerdpack:tag --tag=DEV
Error: A downstream error occurred.

This error message doesn't say much, but you can use the --verbose option to see more information:

bash
$
nr1 nerdpack:tag --tag=DEV --verbose
init version: @oclif/command@1.8.0 argv: [ '--tag=DEV', '--verbose', [length]: 2 ]
dist/metadata.json does not exist. package.json will be used instead.
Using profile account-1234567
Request: POST https://api.newrelic.com/graphql
Data: mutation
nerdpackTagVersion(
nerdpackId: "ab123c45-678d-9012-efg3-45hi6jkl7890",
versionTag:
tag: "DEV",
version: "1.0.0"
}
)
nerdpackId
tags
version
}
}
Headers:
'API-Key': '<YOU USER KEY>',
'Content-Type': 'application/graphql'
}

This more verbose error message shows the GraphQL that runs behind the scenes for nr1 nerdpack:tag. The important part of the message here is:

bash
dist/metadata.json does not exist. package.json will be used instead.

The dist directory is created when you publish your app. So, because it hasn't been published yet, this directory doesn't exist and nr1 falls back to package.json to look for details about your Nerdpack. But, because the UUID in your package.json isn't in the New Relic registry, the command failed.

So, before you tag your versions, publish them to the registry:

bash
$
nr1 nerdpack:publish
$
nr1 nerdpack:tag --tag=DEV

Tip

Remember that you can also tag a version at the same time you deploy it!

bash
$
nr1 nerdpack:publish --tag=DEV

Unsubscribe from the Nerdpack

You can only remove tags that have no subscribers. If you try to remove a tag that users are subscribed to, you'll get an error:

bash
$
nr1 nerdpack:info
Id: ab123c45-678d-9012-efg3-45hi6jkl7890
Region: us
Account ID: 1234567
Local version: 2.0.0
Subscription Model: OWNER_AND_ALLOWED
Version Count: 3
Version Date Tags
------- ----------- ----
2.0.0 an hour ago DEV
1.0.1 an hour ago
1.0.0 6 hours ago
$
nr1 nerdpack:untag -t DEV
Error: A downstream error occurred.

In this case, check to see if you're subscribed to the Nerdpack:

bash
$
nr1 subscription:list
Listing subscribed deployed nerdpacks on your account:
Version UUID Name Date User
------- ------------------------------------ ----------------- ----------- ----------
2.0.0 ab123c45-678d-9012-efg3-45hi6jkl7890 MyAwesomeNerdpack an hour ago 1000383529

This shows that you're subscribed to MyAwesomeNerdpack. Unsubscribe, then try to remove the DEV tag again:

bash
$
nr1 nerdpack:unsubscribe
Unsubscribed account 1234567 from the nerdpack ab123c45-678d-9012-efg3-45hi6jkl7890 on the DEV channel.
$
nr1 nerdpack:untag --tag=DEV
Removed nerdpack ab123c45-678d-9012-efg3-45hi6jkl7890 tag DEV.
$
nr1 nerdpack:info
Id: ab123c45-678d-9012-efg3-45hi6jkl7890
Region: us
Account ID: 1234567
Local version: 2.0.0
Subscription Model: OWNER_AND_ALLOWED
Version Count: 3
Version Date Tags
------- ----------- ----
2.0.0 an hour ago
1.0.1 an hour ago
1.0.0 6 hours ago
Create issueEdit page
Copyright © 2021 New Relic Inc.