GithubHelp home page GithubHelp logo

getsentry / sentry-netlify-build-plugin Goto Github PK

View Code? Open in Web Editor NEW
46.0 39.0 17.0 701 KB

The Sentry Netlify build plugin automatically notifies Sentry of new releases being deployed to your site.

License: Apache License 2.0

JavaScript 97.19% Shell 2.81%
tag-archived

sentry-netlify-build-plugin's Introduction

Sentry Netlify Build Plugin

Automatically upload source maps and notify Sentry of new releases being deployed to your site after it finishes building in Netlify.

The Sentry Netlify build plugin:

  • Notifies Sentry of new releases being deployed.
  • Uploads source maps to Sentry.
  • Sends Sentry the commit SHA of HEAD to enable commit features.

Note: This build plugin is separate from @netlify/sentry, which is a monitoring plugin built by Netlify. For more information, see @sentry/netlify-build-plugin vs. @netlify/sentry below.


Installation

Prepare Your Sentry Organization

Before proceeding, you'll first want to ensure that your Sentry project is set up properly to track commit metadata and allow uploading of source maps.

First, if you haven't already, install a repository integration.

Second, create an internal integration in Sentry, which will handle authentication for source map uploading.

  1. In Sentry, navigate to: Settings > Developer Settings > New Internal Integration.
  2. Give your new integration a name (for example, "Netlify Deploy Integration") and specify the necessary permissions. In this case, we need "Admin" access for "Release" and "Read" access for "Organization". You can leave all other fields blank.
  3. Click "Save Changes" at the bottom of the page.
  4. Once the integration has been created, it should take you to the "Edit Internal Integration" page for your integration. Scroll down to the "Tokens" section and copy your token, which you'll need when configuring the plugin.

Install the Plugin

The plugin can be installed either through the Netlify UI or by adding configuration values to netlify.toml. Unless you need advanced configuration, we recommend using the UI.

UI Installation

To install the plugin via the Netlify UI, go to your team sites list and select the Integrations tab (or follow this direct link to the Integrations directory). Then search for "Sentry" and click Enable and then Enable Release Management.

File-based Installation

Alternatively, to use file-based installation, add the following lines to your netlify.toml file:

[[plugins]]
  package = "@sentry/netlify-build-plugin"

  [plugins.inputs]
    sentryOrg = "your org slug"
    sentryProject = "your project slug"

Note: The [[plugins]] line is required for each plugin installed via file-based installation, so you need to add it here even if you have other plugins in your netlify.toml file already.

Configure Your SDK

To link errors with releases, you must include a release ID (a.k.a version) where you configure your client SDK. For more information, read our documentation on configuring your SDK for releases.

Configuration

The Sentry build plugin can be configured in the Netlify UI, by setting environment variables, or by adding options to netlify.toml.

UI Configuration

Basic configuration can be done in the Netlify UI. In the same Integrations tab where you installed the plugin, find the Sentry plugin again, click "View," and you should now see a configuration panel where you can set your auth token (from the internal integration created above) along with your organization and project slugs.

Doing this will automatically set the SENTRY_AUTH_TOKEN, SENTRY_ORG, and SENTRY_PROJECT environment variables in Netlify.

Configuration Using Environment Variables

The plugin can be configured using site environment variables in Netlify:

  1. In Netlify, go to your site's settings.
  2. Click on "Environment Variables".
  3. Add SENTRY_AUTH_TOKEN, SENTRY_ORG, and SENTRY_PROJECT with their respective values. (The auth token comes from the internal integration created above.)

For more configuration options see the Options section below.

Configuration in netlify.toml

You organization and project slugs can be specified in netlify.toml in the plugins.inputs section:

[[plugins]]
  package = "@sentry/netlify-build-plugin"

  [plugins.inputs]
    sentryOrg = "your org slug"
    sentryProject = "your project slug"

We recommend against setting your auth token in netlify.toml, to avoid committing it to your repo.

For more configuration options see the Options section below.

Options

In most cases, auth token, org slug, and project slug are all that's needed to use the plugin. For more advanced use cases, configuration can be done either by setting site environment variables or by adding to netlify.toml. Most options can be set either way.

For more information about the parameters below, please see the Sentry release management docs.

netlify.toml Environment Variable Description Default
sentryOrg SENTRY_ORG Slug of the organization in Sentry. -
sentryProject SENTRY_PROJECT Slug of the project in Sentry -
sentryAuthToken SENTRY_AUTH_TOKEN Authentication token for Sentry. We recommend this be set as an environment variable, to avoid committing it to your repo. -
sentryRelease SENTRY_RELEASE Release ID (a.k.a version) COMMIT_REF env variable, automatically set by Netlify
sentryRepository SENTRY_REPOSITORY Name of the repository linked to your Sentry repository integration, in the form org-name/repo-name Derived from REPOSITORY_URL env variable, automatically set by Netlify
releasePrefix SENTRY_RELEASE_PREFIX Prefix to add to the release name -
- SENTRY_ENVIRONMENT Name of the environment being deployed to Netlify deploy context
sourceMapPath - Folder to scan for source maps to upload Netlify publish directory
sourceMapUrlPrefix - Prefix for uploaded source map filenames (see sentry-cli docs) "~/"
skipSetCommits - If true, disable commit tracking. false
skipSourceMaps - If true, disable uploading source maps to Sentry. false
deployPreviews - If false, skip running the build plugin on preview deploys. true
deleteSourceMaps SENTRY_DELETE_SOURCEMAPS If true, delete source maps after uploading them to Sentry. May cause browser console errors if not used alongside your build tool's equivalent of webpack's hidden-source-map option. false

@sentry/netlify-build-plugin vs. @netlify/sentry

Both Sentry and Netlify have created plugins which integrate the two services. The Sentry plugin (the one whose docs you're reading right now) is a build plugin, which handles release management and source map uploading. The Netlify plugin, is a monitoring plugin, which adds Sentry to Netlify functions. Docs for that plugin can be found here.

The two plugins can be enabled separately or together, depending on your installation method. In the Netlify UI, they are enabled together, in the Integrations tab, and there you will see settings for both. If enabled through netlify.toml, they must be enabled separately, with a [[plugins]] section added for each.

Note that in the Netlify UI, the Sentry plugin has a Beta label. This applies to only to the Netlify-built plugin, not this one.

sentry-netlify-build-plugin's People

Contributors

armenzg avatar baffo avatar byk avatar ceorourke avatar dependabot[bot] avatar dkocich avatar ehmicky avatar getsentry-bot avatar jonesphillip avatar leeandher avatar lewisjared avatar lobsterkatie avatar mitsuhiko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sentry-netlify-build-plugin's Issues

Option to read sentryRelease from package file (e.g. package.json)

I'd like to have the sentry release version determined through the code somehow, with the current options I haven't been able to figure out a way of doing that (hopefully I'm wrong!). Our version numbers are updated in our package.json file, which we consider the single source of truth here.

Currently, I'm using an environment variable for pass it to this plugin, which is hard to keep in sync with the file (in our case package.json). Is there a way of achieving this, or else could that be added?

SENTRY_RELEASE and SENTRY_ENVIRONMENT undefined

Environment

React app with Netlify deployments

Steps to Reproduce

  1. While setting up Sentry.init with the following params, SENTRY_RELEASE and SENTRY_ENVIRONMENT is undefined.
Sentry.init({
    dsn: 'dsn-value',
    integrations: [new BrowserTracing()],
    tracesSampleRate: 1.0,
    release: process.env.SENTRY_RELEASE,
    environment: process.env.SENTRY_ENVIRONMENT,
  });

In webpack.config.js

plugins: [
      new SentryWebpackPlugin({
        org: 'some-org',
        project: 'some-project',
        include: './build',
        ignoreFile: '.sentrycliignore',
        ignore: ['node_modules', 'webpack.config.js'],
        authToken: process.env.SENTRY_AUTH_TOKEN,
        release: process.env.SENTRY_RELEASE,
      }),
    ],

The Releases tab in sentry is showing the release and no related issue. Also the environment is available.

Screenshot 2023-03-16 at 1 52 26 PM

Screenshot 2023-03-16 at 1 54 59 PM

But the issue/errors has no release or environment data.

I also looked at the previous resolved issues

I also tried using netlify.toml file to set env variables but I specifically need the release which Netlify is sending to sentry (the default value) and it is dynamic every time based on the build, so I am not sure how to set dynamic env vars in netlify.toml

Expected Result

process.env.SENTRY_RELEASE should not be undefined
process.env.SENTRY_ENVIRONMENT should not be undefined

Actual Result

What actually happened. Maybe a screenshot/recording? Maybe some logs?

process.env.SENTRY_RELEASE is undefined/ N/a
process.env.SENTRY_ENVIRONMENT is undefined/ N/a

Please let me know if I have missed anything. Thanks in advance.

Error: SentryCLI failed to set commits

Steps to Reproduce

  1. Created internal integration in Sentry.
  2. Added the Sentry integration via the Netlify UI with the org slug, repo slug, and auth token.
  3. Push a commit to the main branch.

Expected Result

Build would be successfully deployed and reported.

Actual Result

The deploy fails with the error below.

Error: SentryCLI failed to set commits. You likely need to set up a repository or repository integration.
Read more: https://docs.sentry.io/workflow/releases/?platform=python#install-repo-integration

Error `No repositories are configured in Sentry for your organization.`

The following error happens in some builds:

Command failed: /opt/buildhome/.netlify-build-plugins/node_modules/@sentry/cli/sentry-cli releases set-commits d0dda9d322a710af170f67ff926ff3eb4115889b --commit chrisotto6/chrisottodev@d0dda9d322a710af170f67ff926ff3eb4115889b
error: No repositories are configured in Sentry for your organization.

Add --log-level=[info|debug] or export SENTRY_LOG_LEVEL=[info|debug] to see more output.
Please attach the full debug log to all bug reports.
 
    child_process.js:303:12 ChildProcess.exithandler
    events.js:310:20 ChildProcess.emit
    internal/child_process.js:1021:16 maybeClose
    internal/child_process.js:286:5 Process.ChildProcess._handle.onexit

I am assuming this might indicate a user error, in which case #3 might be related as well.

What do you think?

Consider switching to `onSuccess` from `onPostBuild`

Hello and thank you for creating this plugin.

We're making a change to how onSuccess works.

Current: onSuccess occurs after the build command is complete, but before any files are uploaded.
Upcoming: onSuccess occurs after the site is deployed, live, and published to production (if applicable).

As a result, using onSuccess might be a better fit for this plugin.

Please note that after the change failing a build from onSuccess won't be possible and you would need to replace failBuild invocations with failPlugin.

Error: Unknown repo jasikpark/live-collegemusic-co-uk/

Environment

How do you use Sentry?
Sentry SaaS (sentry.io)

Which SDK and version?
JS 6.2.1

Steps to Reproduce

Setup the netlify plugin with correct environmental variables

Expected Result

A successful build

Actual Result

I got a couple of successful builds, but I suddenly am getting an error due to problems with my git remote format I expect:

7:41:34 PM: Error: Command failed: /opt/build/repo/.netlify/plugins/node_modules/@sentry/cli/sentry-cli releases set-commits 9b1c9d17e757dc8f7ac1dde3a5abceefa297667a --commit jasikpark/live.collegemusic.co.uk@9b1c9d17e757dc8f7ac1dde3a5abceefa297667a
7:41:34 PM: error: Unknown repo 'jasikpark/live.collegemusic.co.uk'
$ git remote -v
origin  [email protected]:jasikpark/live.collegemusic.co.uk.git (fetch)
origin  [email protected]:jasikpark/live.collegemusic.co.uk.git (push)

Add dist env

First, its most easy way to create release and upload sources to sentry!
But, after uploading sources there doesn't have way to add dist value, and after uploading we don't have dist for artefacts.

image

Be better if we may have add some env for that field, or it may add dist from plugins.inputs.

source maps have the incorrect path, need different option

Environment

7.12.1

Steps to Reproduce

We just can't get the sourcemaps to work:
It's a next.js app running on netlify.

I've been going through the sentry sourcemaps walkthrough: https://docs.sentry.io/platforms/javascript/guides/nextjs/sourcemaps/troubleshooting_js/

There's a couple of suspect things, but I can't pinpoint the bottle-neck.

  1. There's no distribution version appointed to any of the artifacts, could that be problematic? (not sure how it lines up with sentry errors). An issue about this had been created in May #60
  2. The result from sentry-cli sourcemaps explain dd8595f782254540987a1b49d12e2155 --org $ORG --project $OURPROJECT is
[frontend] sentry-cli sourcemaps explain dd8595f782254540987a1b49d12e2155 --org hifi-labs --project musicos-alpha
✔ Fetched data for event: dd8595f782254540987a1b49d12e2155
✔ Event has release name: 22faee120328fe1cc486aaf1a0c0608628ae0a48
✔ Event has a valid exception present
✔ Event has a valid stacktrace present
✖ Uploaded artifacts do not include entry: ~/_next/static/chunks/framework-0ba0ddd33199226d.js
ℹ Found entry with partially matching filename: ~/static/chunks/framework-0ba0ddd33199226d.js. Make sure that that --url-prefix is set correctly.

There's a sourceMapUrlPrefix option but it, as it says, prefixes the URL and we end up with ~/$PREFIX/_next/static/chunks/framework-0ba0ddd33199226d.js. I'm not sure what the word is, but we need to subtract part of the path.

The artifact entries in Sentry confirm the paths
image

Not taking SENTRY_ORG or SENTRY_PROJECT from environment variables

image

However the current readme says I can use environment variables instead:

You can also use site environment variables to configure these values:

name description default
SENTRY_AUTH_TOKEN Authentication token for Sentry. -
SENTRY_ORG The slug of the organization name in Sentry. -
SENTRY_PROJECT The slug of the project name in Sentry. -

Is this a mistake or are those options required?

I apologize if i missed anything! Thanks for this cool build plugin!

Ability to skip plugin for deploy previews

We don't want to clutter the Sentry releases page with deploy previews that may or may not ever be merged. Would like the ability to specify that the plugin should only run for the master branch.

Gitlab - SentryCLI failed to set commits

When using this plugin with a Gitlab integration, we run in to the following error:

12:51:09 PM:   cmd: '/opt/buildhome/.netlify-build-plugins/node_modules/@sentry/cli/sentry-cli releases set-commits ac28e1c49ac9312242e09696c2046c53c3926835 --commit theworkshop/web-app@ac28e1c49ac9312242e09696c2046c53c3926835'
12:51:09 PM: }
12:51:09 PM: ​
12:51:09 PM: ┌──────────────────────────────────────────────┐
12:51:09 PM: │ Plugin "@sentry/netlify-build-plugin" failed │
12:51:09 PM: └──────────────────────────────────────────────┘
12:51:09 PM: ​
12:51:09 PM:   Error message
12:51:09 PM:   Error: SentryCLI failed to set commits. You likely need to set up a repository or repository integration.
12:51:09 PM:            Read more: https://docs.sentry.io/workflow/releases/?platform=python#install-repo-integration

When running the command locally to replicate the issue, we get a bit more information around why this is failing:

$ sentry-cli releases set-commits ac28e1c49ac9312242e09696c2046c53c3926835 --commit theworkshop/web-app@ac28e1c49ac9312242e09696c2046c53c3926835

error: Unknown repo 'theworkshop/web-app'

The error we're running into seems to be due to how whitespace is handled in the repository name with the Gitlab integration

Modifying the command locally to the following fixes the issue:

$ sentry-cli releases set-commits ac28e1c49ac9312242e09696c2046c53c3926835 --commit theworkshop\ /\ web-app@ac28e1c49ac9312242e09696c2046c53c3926835

It should also probably be documented somewhere that the what Sentry uses as 'name' is actually configurable on Gitlab - i.e. if a user has modified their repo name with Gitlab, then this script won't work as this script actually uses the repo 'slug' rather than name for matching.

Option to suppress verbose output

In typical usage, a lot of logs are generated about the status of uploads. In most successful cases this is just noise that doesn't add any value. A final summary "X files were uploaded" or similar would suffice, with a flag to disable full output.

Option to delete sourcemaps after upload

I've been using create-react-app to deploy with Netlify and this plugin has been very helpful in setting up the integration.

The problem I run into is that my sourcemaps get also deployed on Netlify and the full source is visible when opening the inspector.
I'd normally output sourcemaps in a separate directory from the one being deployed, but create-react-app doesn't give me that option without ejecting and having to manage a custom webpack config.

Would an option to delete sourcemaps after deployment be something worth adding to this plugin?
Happy to contribute the change if it's ok.

feat: set SENTRY_RELEASE env

I'm not sure if this is just my setup, but I found that new issues didn't get linked to any release created - it said Release: n/a in the sidebar.

Checking out the doc at Sentry.init({ release }) option I was wondering if this could be the reason - Sentry client didn't know where to link the issue. I scanned through the index.js file and didn't see anything is set for SENTRY_RELEASE.

I'm not aware if you can set env variable in Netlify through some API call, only thing I found is to set it through netlify.toml which means we need to update this file early before the build starts to insert some thing like SENTRY_RELEASE=process.env.COMMIT_REF CMIIW.

Improve error handling of releases creation

When releases are created and an error is thrown, there is currently some error handling code:

https://github.com/getsentry/sentry-netlify-build-plugin/blob/91d932960f4e1c1c8ba4648cb837000f590b06a0/index.js#L84-95

However, that code did not handle the following two errors which happened in production:

Command failed: /opt/buildhome/.netlify-build-plugins/node_modules/@sentry/cli/sentry-cli releases new d6678d230f575c70ada04dcdada4ada2e9f7dd54
error: API request failed
  caused by: [7] Couldn't connect to server
Command failed: /opt/buildhome/.netlify-build-plugins/node_modules/@sentry/cli/sentry-cli releases new 0c0e7d6430d4ac5cea7f0af6abbed6279d817547
error: API request failed
  caused by: [6] Couldn't resolve host name
Command failed: /opt/buildhome/.netlify-build-plugins/node_modules/@sentry/cli/sentry-cli releases new 0.1.0
error: project not found
Command failed: /opt/buildhome/.netlify-build-plugins/node_modules/@sentry/cli/sentry-cli releases new 
error: Invalid value for '<VERSION>': Invalid release version. Slashes and certain whitespace characters are not permitted.
Command failed: /opt/buildhome/.netlify-build-plugins/node_modules/@sentry/cli/sentry-cli releases new 8c567894abb89c92dd6957d25369f55537fee4ed
error: request failed because API URL was incorrectly formatted
  caused by: bad sentry url: not on URL root (https://[email protected]/1199386)
Command failed: /opt/buildhome/.netlify-build-plugins/node_modules/@sentry/cli/sentry-cli releases deploys 1e3b19a91fa15d94fae858e0d8709bfee5c8b793 new -e deploy-preview
error: API request failed
  caused by: [35] SSL connect error

Are those errors due to a user issue or a problem with Sentry? In the first case, would it be possible to add some additional logic to report those as user errors? Thanks!

Handle wrong API token

When the sentryAuthToken is invalid, the API returns:

Invalid token (http status: 401)

The first API call is currently:

await cli.releases.new(release)

That call does not have any try/catch/failBuild block, so it is currently being reported as a plugin bug. It would be nice to improve the error handling there, for when the API token is invalid. What do you think?

Prevents Deploy if Sentry Down

Right now Sentry is down:
image

and that is preventing being able to deploy on Netlify:

1:09:02 PM:   3. onPostBuild command from @sentry/netlify-build-plugin      
1:09:02 PM: ────────────────────────────────────────────────────────────────
1:09:02 PM: ​
1:09:02 PM: Creating new release with version:  5c5370d258279e0cb7ec7de10a651239f5fffb96
1:09:02 PM: ​
1:09:02 PM: ────────────────────────────────────────────────────────────────
1:09:02 PM:   Plugin "@sentry/netlify-build-plugin" internal error          
1:09:02 PM: ────────────────────────────────────────────────────────────────
1:09:02 PM: ​
1:09:02 PM:   Error message
1:09:02 PM:   Error: Command failed: /opt/build/repo/.netlify/plugins/node_modules/@sentry/cli/sentry-cli releases new 5c5370d258279e0cb7ec7de10a651239f5fffb96
1:09:02 PM:   error: API request failed
1:09:02 PM:     caused by: sentry reported an error: bad gateway (http status: 502)
1:09:02 PM: ​
1:09:02 PM:   Add --log-level=[info|debug] or export SENTRY_LOG_LEVEL=[info|debug] to see more output.
1:09:02 PM:   Please attach the full debug log to all bug reports.
1:09:02 PM: ​​
1:09:02 PM:   Plugin details
1:09:02 PM:   Package:        @sentry/netlify-build-plugin
1:09:02 PM:   Version:        1.0.4
1:09:02 PM:   Repository:     git+https://github.com/getsentry/sentry-netlify-build-plugin.git
1:09:02 PM:   npm link:       https://www.npmjs.com/package/@sentry/netlify-build-plugin
1:09:02 PM:   Report issues:  https://github.com/getsentry/sentry-netlify-build-plugin/issues
1:09:02 PM: ​
1:09:02 PM:   Error location
1:09:02 PM:   In "onPostBuild" event in "@sentry/netlify-build-plugin" from netlify.toml
1:09:02 PM:       at ChildProcess.exithandler (child_process.js:303:12)
1:09:02 PM:       at ChildProcess.emit (events.js:310:20)
1:09:02 PM:       at maybeClose (internal/child_process.js:1021:16)
1:09:02 PM:       at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
1:09:02 PM: ​
1:09:02 PM:   Error properties
1:09:02 PM:   {
1:09:02 PM:     killed: false,
1:09:02 PM:     code: 1,
1:09:02 PM:     signal: null,
1:09:02 PM:     cmd: '/opt/build/repo/.netlify/plugins/node_modules/@sentry/cli/sentry-cli releases new 5c5370d258279e0cb7ec7de10a651239f5fffb96'
1:09:02 PM:   }

Unknown inputs for plugin "@sentry/netlify-build-plugin": "deployPreviews"

Hey,
I want to use the plugin, but when configured with deployPreviews = false input, I get this error in Netlify:

2:38:27 PM: ────────────────────────────────────────────────────────────────────────
2:38:27 PM:   Plugin "@sentry/netlify-build-plugin" invalid input "deployPreviews"  
2:38:27 PM: ────────────────────────────────────────────────────────────────────────
2:38:27 PM: ​
2:38:27 PM:   Error message
2:38:27 PM:   Unknown inputs for plugin "@sentry/netlify-build-plugin": "deployPreviews"
2:38:27 PM:   Plugin inputs should be one of: "sentryOrg", "sentryProject", "sentryAuthToken", "sentryRelease", "sourceMapPath", "sourceMapUrlPrefix", "skipSetCommits", "skipSourceMaps", "releasePrefix"
2:38:27 PM:   Check your plugin configuration to be sure that:
2:38:27 PM:     - the input name is spelled correctly
2:38:27 PM:     - the input is included in the plugin's available configuration options
    - the plugin's input requirements have not changed
​
2:38:27 PM:   Plugin inputs
2:38:27 PM:   deployPreviews: false
2:38:27 PM:   sentryOrg: brandtotal
2:38:27 PM:   sentryProject: brandtotal-app-frontend
2:38:27 PM: ​
2:38:27 PM:   Plugin details
2:38:27 PM:   Package:        @sentry/netlify-build-plugin
2:38:27 PM:   Version:        1.0.4
2:38:27 PM:   Repository:     git+https://github.com/getsentry/sentry-netlify-build-plugin.git
2:38:27 PM:   npm link:       https://www.npmjs.com/package/@sentry/netlify-build-plugin
2:38:27 PM:   Report issues:  https://github.com/getsentry/sentry-netlify-build-plugin/issues
2:38:27 PM: ​
2:38:27 PM:   Error location
2:38:27 PM:   While loading "@sentry/netlify-build-plugin" from netlify.toml

Everything seems to be no typos, and I do see that Netlify are pulling v1.0.4 of this plugin, but looking at the actual npm package dist (click "manifest.yml" there), the deployPreviews input is NOT defined.
Also, the index.js file on npm doesn't have any reference to deployPreviews either, so I'm thinking that what npmjs.org has as 1.0.4 is not actually 1.0.4.

This, in practice, means that #14 is not fixed, at least not for [easy] public consumption.

Staging vs Production

We have both a staging and production environment that both look at the same repo but different branches. How can we control it so Sentry isn't run on our Netlify staging environment? I tried only installing the plugin via the Netlify UI on production, but build fail stating that there are required inputs which you can't seem to configure in Netlify UI. I had them set as environment variables (SENTRY_ORG and SENTRY_PROJECT) but the build still failed stating that inputs.sentryOrg is a required input.

Error handling

Uncaught exceptions are reported to users as plugin bugs.

We've got some utilities documented here like utils.build.failBuild() which help fine tune error reporting. Ideally, every user error (as opposed to plugin errors) should be caught in a try/catch and reported with a method like utils.build.failBuild().

This includes for example when there is no authorization token.
What do you think?

Error `unknown repo 'git'`

The following error is happening in some build:

Command failed: /opt/buildhome/.netlify-build-plugins/node_modules/@sentry/cli/sentry-cli releases set-commits 74c7...0f06 --commit [email protected]:the-hq/[email protected]
error: Unknown repo 'git'

Add --log-level=[info|debug] or export SENTRY_LOG_LEVEL=[info|debug] to see more output.
Please attach the full debug log to all bug reports.
 
    child_process.js:303:12 ChildProcess.exithandler
    events.js:310:20 ChildProcess.emit
    internal/child_process.js:1021:16 maybeClose
    internal/child_process.js:286:5 Process.ChildProcess._handle.onexit

I am not completely sure whether the Unknown repo 'git' is a user error or not. If it is a user error, then this falls under #3. Do you happen to have some insights on this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.