Giter Site home page Giter Site logo

webpack-sentry-plugin's Introduction

Sentry plugin

Build Status

A webpack plugin to upload source maps to Sentry. The current version 2 is compatible with webpack 4 and 5 and requires at least NodeJS 6.

If you are running on webpack 1, 2 or 3, please use the dedicated version 1 of the module (latest is currently 1.16.0), which provides the same API.

Installation

Using npm:

$ npm install webpack-sentry-plugin --save-dev

Using yarn:

$ yarn add webpack-sentry-plugin --dev

Usage

  1. Require webpack-sentry-plugin:
var SentryPlugin = require('webpack-sentry-plugin');
  1. Configure webpack to output source maps. Recommended reading: webpack docs, Sentry docs.

  2. Add to webpack config:

var config = {
 plugins: [
   new SentryPlugin({
     // Sentry options are required
     organization: 'your-organization-name',
     project: 'your-project-name',
     apiKey: process.env.SENTRY_API_KEY,

     // Release version name/hash is required
     release: process.env.GIT_SHA
   })
 ]
}

Options

  • organization (alias organisation): Required, Sentry organization in which to create releases/upload source maps. Must provide the organization short name (visit Organization settings and find the value in the Short name field; this is also the segment that appears in URLs in Sentry).

  • project: Required, Sentry project(s) in which to create releases/upload source maps (Sentry allows a release to be associated with one or multiple projects). Can be a string project slug or an array of project slugs if the release should be associated with multiple projects. Must provide the project short name (visit Project settings and find the value in the Short name field; this is also the segment that appears in URLs in Sentry).

  • apiKey: Required, Sentry auth token (generate one here, ensure that project:releases is selected under scopes). (This field also accepts a Sentry API key, but Sentry has deprecated API keys in favor of auth tokens.)

  • release: Required, string or function that returns the release name. See What is a release? below for details.

    • If a function is provided, it is given one argument: hash, the compilation hash of the webpack build. (This is useful if you want to use the webpack build hash as the Sentry release name.)
  • exclude: RegExp to match for excluded files

var config = {
  plugins: [
    new SentryPlugin({
      // Exclude uploading of html
      exclude: /\.html$/,
      ...
    })
  ]
}
  • include: RegExp to match for included files
var config = {
  plugins: [
    new SentryPlugin({
      // Only upload foo.js & foo.js.map
      include: /foo.js/,
      ...
    })
  ]
}
  • filenameTransform: Function to transform filename before uploading to Sentry. Defaults to prefixing filename with ~/, which is used by Sentry as a host wildcard
var config = {
  plugins: [
    new SentryPlugin({
      filenameTransform: function(filename) {
        return 'a-filename-prefix-' + filename
      }
    })
  ]
}
  • releaseBody: Object or function that returns the body that will be sent to Sentry. Defaults to sending the version and projects (which is sufficient to create a basic new release in Sentry).
    • The function is given two arguments: version and projects. version is the result of the release object (string or function output); projects is the project configuration parameter (converted to an array if a single string is provided).
    • The most common use case for overriding this field is Sentry's release commits feature. To use this, define releaseBody per the example below (providing the most recent commit hash through whatever means works best for your build setup). See the Sentry documentation for more details and options.
var config = {
  plugins: [
    new SentryPlugin({
      releaseBody: function(version, projects) {
        return {
          version,
          projects,
          refs: [{
             repository: 'project-repo',
             commit: process.env.GIT_SHA
          }]
        }
      }
    })
  ]
}
  • suppressErrors: Display warnings for any errors instead of failing webpack build

  • suppressConflictError: Similar to suppressErrors, but only supresses release conflict errors - useful in case webpack compilation is done during deploy on multiple instances. (Release conflict errors are HTTP 409 errors thrown by Sentry when the same source map file is uploaded to the same release multiple times.)

  • baseSentryURL: Fully qualified URL of Sentry instance. Defaults to https://sentry.io/api/0 for sentry.io. If self-hosting, set this to the fully qualified domain name of your instance, e.g. https://mysentryinstance.com/api/0

  • deleteAfterCompile: Boolean determining whether source maps should be deleted on the build server after the webpack compile finishes. Defaults to false

  • createReleaseRequestOptions: Object of options or function returning object of options passed through to the underlying request call on release creating; see the request library documentation for available options.

    • If a function is provided, it is given one argument: req, an object of options (including url, auth, and body) that the plugin is sending to the underlying request call. (This is useful if you want to configure the request dynamically based on request data such as the filename.)
  • uploadFileRequestOptions: Object of options or function returning object of options passed through to the underlying request call on file uploading; see the request library documentation for available options.

    • If a function is provided, it is given one argument: req, an object of options (including url, auth, and body) that the plugin is sending to the underlying request call. (This is useful if you want to configure the request dynamically based on request data such as the filename.)
  • uploadFilesConcurrency: Number of maximum concurrent uploads of source files to the Sentry API. Use this when the number of source files to upload to Sentry is high and you encounter the RequestError: Error: getaddrinfo ENOTFOUND sentry.io sentry.io:443 error.

What is a release?

A release is a concept that Sentry uses to attach source maps to a known version of your code. The plugin creates one for you, but you need to provide a "name" for a particular version of your code, which is just a string. Sentry can then use the release to record that an error was found in a specific known version of your code. Releases are also used to "version" your source maps -- source maps are uploaded to a specific release, and when a raw JavaScript error is reported, the release reported with the error is used to locate and apply the correct source maps.

Passing the string to the plugin really depends on your setup. There are three main approaches:

A git commit hash is very useful for releases - it is a string that defines a particular version of your code. For example, deploying to Heroku with a git hook, you can access a SOURCE_VERSION environment variable that is the latest commit's hash. CircleCI provides the git hash in a CIRCLE_SHA1 environment variable. Travis provides TRAVIS_COMMIT. To supply it to the plugin you can configure the release option to be a function that returns the hash:

new SentryPlugin({
  // ...
  release: function() {
    // Note: this is just an example, it depends on your deployment pipeline
    return process.env.SOURCE_VERSION;
  }
});

Alternatively you can use the webpack build hash. This is generated by webpack and is based on the contents of the build - so if you change the code, the hash also changes. This also is useful for Sentry releases as it identifies a particular version of your code. The plugin provides the webpack hash to you as the first argument to the release function:

new SentryPlugin({
  // ...
  release: function(hash) {
    return hash; // webpack build hash
  }
});

If you use the webpack build hash as your release name, you will also likely need to expose the build hash to your source code in order to configure Raven (see the Post deployment section). The easiest way to do so is with webpack's ExtendedAPIPlugin.

The final option is to manually provide a string to the release option:

new SentryPlugin({
  // ...
  release: 'foo-release'
});

Keep in mind that this string will need to change when you update your code. The other options above are recommended.

Post deployment

After you deploy you need to tell the Sentry client (Raven) which release is the current release. There is an option called release that you pass when configuring it:

Raven.config({
  release: 'YOUR-RELEASE-STRING-HERE'
});

Thanks

Contributing

Contributions are welcome πŸ˜„. To run the tests, please ensure you have the relevant environment variables set up. You can cp .env.example .env and fill it in with test account credentials. An API key can be created here, assuming you are signed in.

Commands to be aware of

Warning ⚠️: The test suite will create releases & upload files. They should be cleaned up afterward, but ensure that you are not overwriting something important!

  • npm start: List available commands (in green at bottom)
  • npm test: Runs the test suite
  • npm start lint: Runs linting
  • npm start format: Formats code with prettier-eslint

webpack-sentry-plugin's People

Contributors

11bit avatar 40thieves avatar appden avatar borisirota avatar cadebward avatar dependabot[bot] avatar fuckingusername avatar guillaumet avatar hkdobrev avatar jharris4 avatar jpreynat avatar koshov avatar lagunovsky avatar nicolasartman avatar rhys-vdw avatar schneidmaster avatar tryggvigy avatar zackify 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

webpack-sentry-plugin's Issues

What is 'release' ?

Hey guys,

Sorry for the (possibly) dump question but what exactly you expect the release to be? Is it the hash that is created with the output files or is it latest commit?

If it's the commit, how am I supposed to supply it to you?

An example would be great!

Thanks!

409 Errors

When setting the CI flag to true, webpack treats warnings as errors. So even if we set suppressConflictError to true, it still reports a warning, which is then treated as an error. I see a couple options:

  1. allow a "overwriteExistingArtifcats" flag, or similar
  2. Do not warn or error on the conflict error if the suppressConflictError flag is set to true

Any thoughts?

Source code not found for webpack:///....

Firstly, thanks for this awesome plugin. It's been working great for us in production for some months!

I'm not sure if something on Sentry's end changed recently, but we're no longer seeing our code in Sentry from the uploaded sourcemaps.

Source code was not found for webpack:///../node_modules/angular/angular.js
Source code was not found for webpack:///../node_modules/@uirouter/angularjs/release/stateEvents.min.js
Source code was not found for webpack:///./apps/instances/modules/pixark/app.js

is what Sentry is reporting on any issues reported from our website, for example.

Our filenameTransform function is as follows:

filenameTransform: function(filename){
	return '~/assets/' + filename;
},

Again, this has been working just fine for months so I imagine something on Sentry's end changed? Would changing our filenameTransform function to be prefixed with webpack:// perhaps work?

Missing path

WebpackSentryPlugin: unable to delete 'static/2.1.13/js/59.afdcc3b4.chunk.js.map'. File does not exist; it may not have been created due to a build error.

webpack config.output.path = 'build'

So the file is located at build/static/2.1.13/js/59.afdcc3b4.chunk.js.map

switch from api key to auth header

Looks like api keys are deprecated for the purposes of releases:

Once added, Sentry will automatically collect commits for the repository, and you can begin referencing it in releases. To do so, you’ll need to send refs along when you create a release. Note: You need to make sure you’re using Auth Tokens not API Keys, which are deprecated. - source

I don't know the API very well, so I'm not sure if they're only deprecated for the purposes of logging commits, but I just stumbled onto this in the docs so wanted to leave a note here.

ERROR in Sentry Plugin: StatusCodeError: 502

I build my project with Netlify and sometimes (not always) build fails with the following error:

4:22:10 PM: ERROR in Sentry Plugin: StatusCodeError: 502 - "<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body>\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>nginx/1.15.8</center>\r\n</body>\r\n</html>\r\n"

Set up CI

@schneidmaster's comment:

Part of the problem currently is that the tests locally require/run against a real Sentry instance, which makes it a pain to run because you have to set up a test account, an auth token, etc. I would like to rewrite the tests to use mocks for the external service calls instead, which then makes it much easier to expect full test coverage for new code.

How do I use the webpack build hash outside of the callback?

I obviously need to send it to Raven as a config param, but I'm not sure how to go about it. Do you guys have a recommended way?

Ideally I'd be able to somehow access the hash in the context of the DefinePlugin since that's where I'm passing env values to the js app.

Change "organisation" spelling from BE to AE

Thanks for this plugin, it's really helpful!

I've noticed that the organisation option is spelled in British English, whereas Sentry uses the American English version (organization).

To avoid confusing errors, it could be helpful to switch to the AE spelling or at least accept it as an alias. What do you think?

Plugin must run twice on Heroku before release is created

We just switched to using this plugin from the Sentry Heroku integration so that we can upload sourcemaps to Sentry. Although the plugin works as expected when run locally, no release is initially created when running it on Heroku. But if we redeploy the branch on Heroku, the release is created on Sentry as expected. Unfortunately, this seems to be the case for every deployment to Heroku.

We're not getting any errors in the build output and the environment variables that we're using for the Sentry auth token and the latest commit should always be available on every build.

Do you have any idea what might be causing this and what we can do to fix it?

Development tools behave unexpectedly

Trying to open a PR for #17. Linter is doing some weird stuff in my fork.

-> npm link

> [email protected] prepublish /Users/rhys/Projects/usability-hub/webpack-sentry-plugin
> nps prepublish

nps is executing `prepublish`: nps validate && nps build
nps is executing `validate`: nps format lint test
nps is executing `format`: prettier-eslint --write "{src,test}/**/*.js"
● Validation Warning:

  Unknown option "semi" with value true was found.
  This is probably a typing mistake. Fixing it will remove this message.

● Validation Warning:

  Unknown option "useTabs" with value false was found.
  This is probably a typing mistake. Fixing it will remove this message.

● Validation Warning:

  Unknown option "semi" with value true was found.
  This is probably a typing mistake. Fixing it will remove this message.

● Validation Warning:

  Unknown option "useTabs" with value false was found.
  This is probably a typing mistake. Fixing it will remove this message.

● Validation Warning:

  Unknown option "semi" with value true was found.
  This is probably a typing mistake. Fixing it will remove this message.

● Validation Warning:

  Unknown option "useTabs" with value false was found.
  This is probably a typing mistake. Fixing it will remove this message.

● Validation Warning:

  Unknown option "semi" with value true was found.
  This is probably a typing mistake. Fixing it will remove this message.

● Validation Warning:

  Unknown option "useTabs" with value false was found.
  This is probably a typing mistake. Fixing it will remove this message.

...

After running any npm script command I get the above errors and end up with all the dangling commas stripped from the source files. For some reason prettier-eslint seems to be using the wrong config? Not sure what's going on here but it's annoying.

413 Entity Too Large

Referring to: https://docs.sentry.io/clients/javascript/sourcemaps/#uploading-source-maps-to-sentry

indicates that we should be able to upload up to 40mb. Currently, i am getting a 413 error when uploading more than 20mb. I have narrowed the issue down to this:

When using https://docs.sentry.io/api/releases/post-organization-release-files/ , the request limit seems to be lower than when using https://docs.sentry.io/api/releases/post-project-release-files/ (which is what the initial link at the top of this post seems to use). I believe this is a recent issue as a result of #36

Handle already existing release hash

As discussed in #16 (comment), currently creation of releases will crash if the release hash stays the same.

Potential options:

  1. Crash with better error message
  2. Overwrite the existing release's files (how does Sentry api handle this?)
  3. Delete the existing release and try again

Error when deleteFiles is called

I'm encountering the following error from inside this plugin when I run my webpack build:

[ERR_INVALID_ARG_TYPE]: The "path" argument must be one of type string, Buffer, or URL. Received type undefined
    at Object.unlinkSync (fs.js:949:3)
    at /root/project/js/webapp/node_modules/webpack-sentry-plugin/dist/index.js:261:22

Node version: 10.15.1
Webpack Version: 4.28.3
babel-core version: 7.0.0
webpack-Sentry-plugin version: 1.16.0
OS: MacOS 10.14.3

My config:

plugins : [
        ...configuration.plugins, 
        new SentryPlugin({
            organization       : 'my_org_name',
            project            : 'my_project_name',
            apiKey             : SENTRY_RELEASE_API_KEY,
            deleteAfterCompile : true,
            filenameTransform  : (filename) => {
                return `~/static/dist/${filename}`;
            },
            release : (hash) => {
                return hash; // webpack build hash
            },
            suppressConflictError : true,
        }),
    ],

Any thoughts on what could be happening here?

support webpack4

When I upgrade webpack4 from webpack3, have a problem
ERROR in Sentry Plugin: RequestError: Error: getaddrinfo ENOTFOUND fse.int.xiaohongshu.com fse.int.xiaohongshu.com:80

ERROR in Sentry Plugin: RequestError: Error: connect ECONNRESET 192.168.1.193:9005

This is a weird issue
After deploy the sentry server at my own server, i use webpack-sentry-plugin to upload my project's sourcemap file.
Sometimes, i get the error message that shows me ERROR in Sentry Plugin: RequestError: Error: connect ECONNRESET 192.168.1.193:9005,
image

but i checkout the releases , it shows me that my files was uploaded succussfully, but still show me the error message
image
i don't know how to figure it out
Thanks!

upload source-map to sentry succeed but the source-map does not work.

export default (config: any) => {
console.log(process.env.BUILD_ENV);
config
.plugin('sentry')
.use(SentryPlugin, [
{
organization: 'sentry',
project: 'ant-design-pro',
apiKey: '2b47868d3cb14f02bde0b39e0c87478d0f91b854356142fe9fd785f40735343e',
baseSentryURL: 'http://localhost:9000/api/0',
release: '1.1.1',
deleteAfterCompile: true,
},
])
.end();
};

ERROR in Sentry Plugin: RequestError: Error: getaddrinfo ENOTFOUND sentry.io sentry.io:443

Hi,

When running the module locally, I get the following error:
ERROR in Sentry Plugin: RequestError: Error: getaddrinfo ENOTFOUND sentry.io sentry.io:443

After a bit of search, it looks like the request-promise module sometimes fails randomly on the DNS lookup using the Node native API.

I tried passing the family: 4 option in the requests of the local node_modules version of this plugin as described in the linked issue above with no luck. Clearing my DNS cache didn't do the work either.

Did anyone else also encounter this issue?
One solution might be to use another library like axios to perform the requests to the Sentry API.

My current configuration is:
[email protected]
[email protected]
[email protected]
[email protected]

Specify all required permissions for api token in documentation

Documentation specifies:

apiKey: Sentry api key (Generate one here, ensure that project:write is selected under scopes)

However, when I create a token with only specified scope, I get permissions errors. Then I created a token with the default scopes plus the project:write added and I don't get the permission errors anymore.

Webpack process exits with exit code 154

After adding the plugin webpack started exiting with code 154.

Any idea what we can do to debug this? Searching the issue tracker here did not bring any meaningful results.

Webpack 5 compatibility

Hi!

First off, thank you for this plugin - it is much easier, more convenient and more flexible to use than the official Sentry plugin.

Unfortunately, it doesn't seem to work with Webpack 5 due to this issue. Would it be possible to provide a fix?

Thank you!

Release body syntax error in readme.md

Just noticed a syntax error in the readme.

...

refs: [
    repository: 'project-repo',
    commit: process.env.GIT_SHA
]

...

should be...

...

refs: {
    repository: 'project-repo',
    commit: process.env.GIT_SHA
}

...

I think?

Call for collaborators

I've become quite burned out on this project (and other OSS projects). It would be great if there were some volunteers for collaborators. Please reply to this thread if you'd like to volunteer.

(Disclaimer: I've actually never had collaborators so I don't actually know what I'm doing. Help in these regards would be nice πŸ™‚)

ERROR in Sentry Plugin: RequestError: Error: getaddrinfo ENOTFOUND http http:443

I add uploadFilesConcurrency in my SentryPlugin as follow:
config.plugins.push(
new SentryPlugin(Object.assign({
release: '[email protected]',
deleteAfterCompile: true,
exclude: /(.css.map| .css | .html)$/,
include: /(.js.map | .js)$/, //
filenameTransform: function(filename) {
return '~/dist/' + filename
},
uploadFilesConcurrency: Infinity
}, require('./sentry.config.js')))
);

still has the 443 problem. how can i fix it?

Deprecate baseSentryURL with /projects

Currently, the baseSentryURL option is expected to have a /projects suffix, e.g. https://sentry.io/api/0/projects.

This is somewhat counterintuitive (you would expect the base API URL not to include part of the path) and because of #36 the plugin will start using an /organizations URL to create releases which requires some awkward string replacing.

As a result, the /projects style URL config will be deprecated as of 1.12.0 and may be removed in a future major version release. You should update your config to remove /projects from the end of the baseSentryURL for custom installations.

Before

var config = {
  plugins: [
    new SentryPlugin({
      ...
      baseSentryURL: 'https://sentry.io/api/0/projects'
    })
  ]
}

After

var config = {
  plugins: [
    new SentryPlugin({
      ...
      baseSentryURL: 'https://sentry.io/api/0'
    })
  ]
}

[question] do we have to upload *.js alone with *.js.map

Hi there,

I'm new to Sentry.
I have a question to ask, abusing the github issues though πŸ˜‚

image

According to the docs: https://docs.sentry.io/clients/javascript/sourcemaps/#uploading-source-maps-to-sentry

I'm not sure whether we have to upload *.js alone with *.js.map to Sentry?
If not, I could then remove some bandwidth expense on it lol.


Found a related topic from the forum: https://forum.sentry.io/t/uploading-sourcemaps-without-js-files-using-cli/1739

Some js.map files are not uploaded

Hi,I have some problems: some js.map files are not uploaded.
This is my config
image
This is the uploaded souceMap file
image
Now you can see some sourceMap files are not uploaded.Can you tell me how to solve this problem?

Plugin receiving 404

ERROR in Sentry Plugin: StatusCodeError: 404 - "{\"detail\": \"\"}"

Have tried auth tokens with limited scope and full permissions. Leaving this here for now, can investigate further this afternoon.

Update documentation request

I got tripped up three times getting this setup on premise:

  1. According to the Sentry documentation:
organisation: Required, Sentry organisation to upload files to
project: Required, Sentry project to upload files to

I was continually getting 401s, I didn't realize these were supposed to be the slugs, until reading through the code. Would be helpful to mention that fact.

  1. Mentioning the apiKey is the same as the new Auth Tokens would be nice, since API Keys were previously a completely different thing in Sentry.

  2. baseSentryURL needs to have the suffix /api/0/projects

DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead

When running Webpack for a production build, I'm getting the following error in the console if I set process.traceDeprecation = true; in my config :

(node:16768) DeprecationWarning: Tapable.plugin is deprecated. Use new API on .hooks instead at SentryPlugin.apply <PROJECT PATH>\node_modules\webpack-sentry-plugin\dist\index.js:94:16)

Currently running:

  • Webpack v4.12.0
  • Node v8.11.3
  • NPM 6.1.0
  • webpack-sentry-plugin v1.15.0

Update peer dependency to allow webpack 3

Right now there is "webpack@^1.14.0 || ^2.2.0" in peer dependencies, but webpack 3 is already released. Can you please update peed dependencies to allow using webpack 3?

400 Invalid project slugs

Hi,

I am using the following project configuration:

  new SentryPlugin({
    organization: '<SHORT_NAME>',
    project: '<PROJECT>,
    apiKey: '<API_KEY>',
    release: (hash) => hash
  })

However I am getting the following error:

ERROR in Sentry Plugin: StatusCodeError: 400 - "{\"projects\": [\"Invalid project slugs\"]}"

Sentry Plugin - StatusCodeError: 401 - "{\"detail\": \"Invalid token\"}"

I've followed the documentation but cannot get past this error.

  • I've added the package to my package.json.
  • I've required the package at the top of my webpack.prod.conf.js.
  • I've configured the output of webpack for source maps:
   output: {
      path: config.build.assetsRoot,
      filename: utils.assetsPath('js/[name].js'),
      chunkFilename: utils.assetsPath('js/[id].js')
   },
  • I've added my new SentryPlugin to the array of plugins
      new SentryPlugin({
         // Sentry options are required
         organization: 'devmountain',
         project: 'basecamphub',
         apiKey: 'my_key',

         // Release version name/hash is required
         release: function(hash) {
            return hash // webpack build hash
         }
      })

I generated an API key under my User Settings -> Auth Tokens and gave my token all the possible scopes.

I'm not sure what I'm doing wrong here. I've read material that Auth Tokens are the new API keys? API keys were the old way?

Any help would be much appreciated. My build fails and always outputs:

ERROR in Sentry Plugin: StatusCodeError: 401 - "{\"detail\": \"Invalid token\"}"

  Build failed with errors.

error Command failed with exit code 1.

release hash sharing

If front end wants to report via sentry, it should get config of release hash, but the hash generated by compilation.hash based on front end source code

The git commit id may be not a good choice for difference between multi build in diff machines for the updating of dependencies

So is there any prictices or ideas to sharing hash code between source code and this plugin

very thanks πŸ˜ƒ

Implicit character limit for `release` parameter

I noticed that the plugin will throw an error if provided with a full, 40 character git hash as the release parameter. This occurs if I provide a string or a function that returns a 40 character string.

I notice this error won't be thrown if I slice my git hash to 10 chars.

If this is a limitation, it would be useful to put this in the README.

Thanks,

Request: option to no-op when source map uploads fail

When source map upload fails, we would like to log an error but continue with the webpack build and our CI release.

We use CircleCI as our CI pipeline. An engineer merged a branch to master and the deploy leg failed initially with this error: ERROR in Sentry Plugin: RequestError: Error: Client network socket disconnected before secure TLS connection was established.

Subsequently, when rerunning the failed deploy leg, we get this error: ERROR in Sentry Plugin: StatusCodeError: 409 - "{\"detail\": \"A file matching this name already exists for the given release\"}"

So, we cannot deploy this build anymore. We need to submit a new one with a dummy commit to get a deploy out. Instead, we'd prefer if we could rerun the initial build and have it succeed.

The fix here could take several forms:

  • log but do not fail on all upload source map errors
  • log but do not fail on failure to upload source maps specifically due to "file matching this name already exists"
  • add an overwrite option to overwrite existing files with the same name
    etc.

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.