Giter Site home page Giter Site logo

ember-cli-deploy-sentry's Introduction

Ember-cli-deploy-sentry Circle CI

An ember-cli-deploy-plugin to upload javascript sourcemaps to Sentry.

What is an ember-cli-deploy plugin?

A plugin is an addon that can be executed as a part of the ember-cli-deploy pipeline. A plugin will implement one or more of the ember-cli-deploy's pipeline hooks.

For more information on what plugins are and how they work, please refer to the Plugin Documentation.

Quick Start

To get up and running quickly, do the following:

$ ember install ember-cli-deploy-sentry
  • For hosted accounts, generate your bearer/api key here: https://sentry.io/api/
  • Place the following configuration into config/deploy.js
ENV.sentry = {
  // the URL or CDN your js assets are served from
  publicUrl: 'https://your.awesome.site',
  // the sentry install you're using, https://sentry.io for hosted accounts
  sentryUrl: 'https://sentry.your.awesome.site',
  sentryOrganizationSlug: 'AwesomeOrg',
  sentryProjectSlug: 'AwesomeProject',
  
  // One of:
  sentryApiKey: 'awesomeApiKey',
  // or
  sentryBearerApiKey: 'awesomeApiKey'
}

Install ember-cli-sentry but import the raven service from ember-cli-deploy-sentry/services/raven, which will automatically handle setting up the release version for you. Sentry needs this to find the correct sourcemap for an error that occurs.

If you don't want to use ember-cli-sentry but set raven-js up manually see Manual integration with raven-js.

  • Build sourcemaps in production environment

ember-cli builds sourcemaps only in development environment by default. In order to build them always, just add the following to your EmberApp options.

sourcemaps: {
  enabled: true,
  extensions: ['js']
}

See also: ember-cli documentation

  • Run the pipeline
$ ember deploy

Installation

Run the following command in your terminal:

ember install ember-cli-deploy-sentry

For general information on how to setup Sentry and raven-js you probably want to check out the official Sentry Documentation especially on Sourcemaps.

ember-cli-deploy Hooks Implemented

For detailed information on what plugin hooks are and how they work, please refer to the Plugin Documentation.

  • configure
  • upload
  • didDeploy

Configuration Options

For detailed information on how configuration of plugins works, please refer to the Plugin Documentation.

publicUrl

The public url to the root of where your assets are stored. For instance, if your assets are stored on Cloudfront, it would be https://xxxx.cloudfront.net.

Required

sentryUrl

The url of the sentry installation that ember-cli-deploy-sentry shall upload sourcemaps and javascript files to. If you are deploying in your local network, keep in mind you might need to use the local hostname/IP address.

Required

sentryOrganizationSlug

The slug of the organization you want to upload sourcemaps for. You can specify this in organization settings in sentry.

Required

sentryProjectSlug

The slug of the project you want to upload sourcemaps for. You can specify this in project settings in sentry.

Required

sentryApiKey or sentryBearerApiKey

Either an HTTP Basic Auth username, or a bearer token. If you are uploading to the current Sentry API, use the latter. Use the former if you are using an older API.

You can create the api key in your organization settings. Make sure it has the project:write privilege.

Required

distDir

The root directory that all files matching the filePattern will be uploaded from. By default, this option will use the distDir property of the deployment context.

Default: context.distDir

filePattern

minimatch expression that is used to determine which files should be uploaded from the distDir.

Default: /**/*.{js,map}

revisionKey

The revision string that is used to create releases in sentry.

Default:

  revisionKey: function(context) {
    return context.revisionData && context.revisionData.revisionKey;
  }

revisionCommits

An array of revision commits allows us to associate commits with this Sentry release. See the Sentry docs here.

Default:

  revisionCommits: undefined

Examples:

  revisionCommits: function(context) {
    return [{
      repository:"owner-name/repo-name", // required
      id:"2da95dfb052f477380608d59d32b4ab9" // required
    }]
  }

enableRevisionTagging

Enable adding a meta tag with the current revisionKey into the head of your index.html.

Default true

replaceFiles

At deploy-time, the plugin will check your Sentry instance for an existing release under the current revisionKey. If a release is found and this is set to true, all existing files for the matching release will be deleted before the current build's files are uploaded to Sentry. If this is set to false, the files on Sentry will remain untouched and the just-built files will not be uploaded.

Default true

Prerequisites

The following properties are expected to be present on the deployment context object:

Manual integration with raven-js

By default a meta tag with the key name sentry:revision is inserted in your index.html:

<meta name="sentry:revision" content="(revision)">

When you setup raven-js you can retrieve it like this:

Raven.config({
    release: document.querySelector("meta[name='sentry:revision']").content
});

If you only want to use the sourcemap upload functionality of ember-cli-deploy-sentry, you can disable automatic meta tag insertion completely by setting enableRevisionTagging to false.

Last but not least make sure to setup proper exception catching like this.

Running Tests

  • npm test

TODO

  • use context.distFiles from ember-cli-deploy-build instead globbing distDir again?
  • automatically setup raven-js? If you want this, let me know.
  • add revision tagging file pattern
  • make meta name configurable and document service.releaseMetaName

State

It works. We use it in production at Hatchet.

ember-cli-deploy-sentry's People

Contributors

aledalgrande avatar begedin avatar dependabot[bot] avatar dschmidt avatar duizendnegen avatar ghedamat avatar janwerkhoven avatar kmiyashiro avatar lifeart avatar lolmaus avatar marcoow avatar mazondo avatar michalbryxi avatar msz avatar nullvoxpopuli avatar oscarni avatar patocallaghan avatar simonihmig avatar turbo87 avatar veelci avatar wlonk avatar yoranbrondsema 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

Watchers

 avatar  avatar  avatar

ember-cli-deploy-sentry's Issues

Add an option to be able to upload files with relative path

Reading through the Sentry doc and their forum, sometimes it's mandatory to upload files with ~ instead of the full path with host and protocol.

So instead of uploading the files like:
https://xxx.cloudfront.net/assets/vendor-7d31c95933a91ffe617f81efb6478c75.js

it should be uploaded as:
~/assets/vendor-7d31c95933a91ffe617f81efb6478c75.js

This allow to ignore the the host and protocol. This can be useful in some case for example, when you want to access assets from multiple origins.

Associate commits with a release

Apologies if this is already possible but I couldn't easily find the information how to do it.

We're looking to associate our releases with a specific Git commit. See the Sentry documentation here on how to do it.

If you were using Sentry CLI you'd do something like the following to associate your release with a commit (where $VERSION is the revisionKey).

sentry-cli releases set-commits --auto $VERSION

Is it possible to do this with ember-cli-deploy-sentry? If not any suggestions how to add this functionality? I'd be interested in adding it if it's something you're interested in having.

Help with Sentry release id not matching Ember deploy S3 revision id

Hi.

I deploy my Ember app to S3 using https://github.com/ember-cli-deploy/ember-cli-deploy-s3, which gives me a revision id for each deployment to production. In the attached screenshot you can see that on Sentry my revision id (the longer id) does not match the release id that Sentry is receiving errors on. Therefore, my source maps are not being matched correctly and I can't see my code to debug it correctly in Sentry.

In the guide I read the following tip that seems to suggest that ember-cli-deploy-sentry will handle the matching for me but this is not working for me (how would ember-cli-deploy-sentry know what revision id ember-cli-deploy-s3 is using?)

Install ember-cli-sentry but import the raven service from ember-cli-deploy-sentry/services/raven, which will automatically handle setting up the release version for you.

I'm sorry if this is a dumb question but how do I ensure that my s3 deploy revision id matches my sentry release id? Is there some way I can manually configure the behaviour I need?

Any help would be appreciated.

Thanks.

Releases - acceptacard-ltd - Sentry

Fastboot Issues due to jQuery dependency

We're having an issue with FastBoot since this plugin relies on jQuery to read the revision version.

I've supressed the error with a custom service like this:

import RavenService from 'ember-cli-sentry/services/raven';
import computed from 'ember-computed';
import $ from 'jquery';

export default RavenService.extend({
    releaseMetaName: 'sentry:revision',
    release: computed('releaseMetaName', {
        get: function() {
          if (typeof(FastBoot) === 'undefined') {
            return $(`meta[name='${this.get('releaseMetaName')}']`).attr('content');
          }
        }
    })
});

But this basically just means that fastboot errors will have no version. Anyone have ideas on a better way to handle this?

Not able to handle an existing release with existing artifacts

Issue

When I try to deploy a certain version multiple times I am getting the following error:

StatusCodeError: 409 - {"detail":"A file matching this name already exists for the given release"}

because artifacts already are associated with that release.

I also get the following error log

SilentError: Creating release failed

Looking through the source code it looks to me like this should be handled in handleExistingRelease but looking at the logs it doesn't seem to be following that code path in the instances that it fails.

It leads me to suspect that something in doesReleaseExist is throwing an exception when it should be returning a 200.

My ideal solution in this case the one described in handleExistingRelease where we delete all the existing artifacts and upload new ones.

I'm on v0.7.0 and in cases where a release doesn't already exist, deploying creates one and uploads artifacts fine.

bearerApiKey don't wokrs

I'm using bearerApiKey, but i have this error

STAGING_SENTRY_API_KEY=Bearer d649f01f5f1746099cedc74f385833
****999

|
+- didFail
Error: no auth mechanism defined
Error: no auth mechanism defined
    at Auth.onRequest (/Users/villander/Projects/web_app/node_modules/request/lib/auth.js:133:32)
    at Request.auth (/Users/villander/Projects/web_app/node_modules/request/request.js:1270:14)
    at Request.init (/Users/villander/Projects/web_app/node_modules/request/request.js:379:10)
    at Request.RP$initInterceptor [as init] (/Users/villander/Projects/web_app/node_modules/ember-cli-deploy-sentry/node_modules/request-promise/lib/rp.js:123:25)
    at new Request (/Users/villander/Projects/web_app/node_modules/request/request.js:128:8)
    at request (/Users/villander/Projects/web_app/node_modules/request/index.js:54:10)
    at Class.doesReleaseExist (/Users/villander/Projects/web_app/node_modules/ember-cli-deploy-sentry/index.js:103:16)
    at Class.didPrepare (/Users/villander/Projects/web_app/node_modules/ember-cli-deploy-sentry/index.js:88:21)
    at Object.fn (/Users/villander/Projects/web_app/node_modules/ember-cli-deploy/lib/tasks/pipeline.js:93:21)
    at Pipeline._notifyPipelinePluginHookExecution (/Users/villander/Projects/web_app/node_modules/ember-cli-deploy/lib/models/pipeline.js:173:19)
    at tryCatch (/Users/villander/Projects/web_app/node_modules/rsvp/dist/rsvp.js:525:12)
    at invokeCallback (/Users/villander/Projects/web_app/node_modules/rsvp/dist/rsvp.js:538:13)
    at /Users/villander/Projects/web_app/node_modules/rsvp/dist/rsvp.js:606:14
    at flush (/Users/villander/Projects/web_app/node_modules/rsvp/dist/rsvp.js:2415:5)
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)
|
Pipeline aborted
➜  web_app git:(feature/sentry) ✗ 

I created a API KEY on sentry api but this don't work as well

https://docs.sentry.io/api/projects/post-project-keys/

{
    "dateCreated": "2018-11-27T16:49:27.377Z",
    "id": "645bf3f548ce46ca8c8459f54a66480f",
    "browserSdk": {
        "choices": [
            [
                "latest",
                "latest"
            ],
            [
                "4.x",
                "4.x"
            ]
        ]
    },
    "name": "Sharing Quagga",
    "projectId": 1328216,
    "rateLimit": null,
    "label": "Sharing Quagga",
    "dsn": {
        "cdn": "https://js.sentry-cdn.com/645bf3f548ce46ca8c8459f54a66480f.min.js",
        "minidump": "https://sentry.io/api/1328216/minidump/?sentry_key=645bf3f548ce46ca8c8459f54a66480f",
        "csp": "https://sentry.io/api/1328216/csp-report/?sentry_key=645bf3f548ce46ca8c8459f54a66480f",
        "secret": "https://645bf3f548ce46ca8c8459f54a66480f:[email protected]/1328216",
        "unreal": "https://sentry.io/api/1328216/unreal/645bf3f548ce46ca8c8459f54a66480f/",
        "security": "https://sentry.io/api/1328216/security/?sentry_key=645bf3f548ce46ca8c8459f54a66480f",
        "public": "https://[email protected]/1328216"
    },
    "browserSdkVersion": "4.x",
    "secret": "802fd6e3e8ed4bb18a1728a2c9b0fab6",
    "isActive": true,
    "public": "645bf3f548ce46ca8c8459f54a66480f"
}

Make the options api consistent

I've noticed that you are namespacing the keys twice. Because these are already inside ENV.sentry I think this is not required.

ENV.sentry = {
  publicUrl: 'https://your.awesome.site',
  sentryUrl: 'https://sentry.your.awesome.site',
  sentryOrganizationSlug: 'AwesomeOrg',
  sentryProjectSlug: 'AwesomeProject',
  sentryApiKey: 'awesomeApiKey',
  sentryBearerApiKey: 'awesomeApiKey'
}

May be change these to:

ENV.sentry = {
  // we could call assetHost as cdn but it won't make sense
  // for people using their own servers to host the js files
  assetHost: 'https://your.awesome.site', 
  url: 'https://sentry.your.awesome.site',
  organizationSlug: 'AwesomeOrg',
  projectSlug: 'AwesomeProject',
  apiKey: 'awesomeApiKey',
  bearerApiKey: 'awesomeApiKey'
}

While we are at it maybe we should remove the apiKey and call it something else? I am not sure what the old usage was like so I am at a loss here for suggestions. We should ideally rename bearerApiKey to apiKey.

Let me know if you'd like a pull request with these changes. Thanks!

incompatibility with gzip plugin

sentry doesn't support gzipped source maps, so when used in combination with the gzip plugin, the source maps/js files aren't useful. Is there a way to make this plugin send the source files before they get gzipped?

Unable to Catch Global Catching Errors - Faulty Raven Service Setup.

TL/DR
Catching Global Exception is not working due to the this.get('isRavenUsable') in ember-cli-sentry that does not have any dependent key. Needed to overwrite using the ember-cli-deploy-sentry RavenService.

I wasn't sure if should post this here, or in the ember-cli-sentry repo, but they are too much related imho to make a good choice :)

Background
I was running into problems where I would only see "Error Error" as the error message in Sentry for Uncaught Global Exceptions. The following setting was set to true for my environment:

// config/environment.js 
/**
 * If set to true, addon will try to have Ember.onerror
 * and Ember.RSVP.on('error') captured by Raven.
 *
 * @type {Boolean}
 * @default true
 */
globalErrorCatching: true,

The 'ember-cli-sentry' plugin has a function that is called after the plugin is initialized, namely:
https://github.com/ember-cli-sentry/ember-cli-sentry/blob/v4.1.0/addon/services/raven.js#L175

enableGlobalErrorCatching() {
    // This guy here 'isRavenUsable' was never flipping from false to true after isSetup was done.
    if (this.get('isRavenUsable') && !this.get('globalErrorCatchingInitialized')) {
      const _oldOnError = Ember.onerror;

      Ember.onerror = (error) => {
        if (this._ignoreError(error)) {
          return;
        }

        .... etc ..

The Problem
After debugging I could work out why the following was always set to false: this.get('isRavenUsable') in the ember-cli-sentry code. It's a computed property that somehow never changes its value anymore (as it does not have any dependent keys).

My solution
Now, I made a solution for this is partly using the README of the ember-cli-sentry-deploy repo that suggest to use the 'RavenService' that comes with it, instead of the ember-cli-sentry raven service. So I made an app-initializer much like the one that looks like https://github.com/ember-cli-sentry/ember-cli-sentry/blob/v4.1.0/app/instance-initializers/raven-setup.js, but I've made some alterations here:

import { get, computed } from '@ember/object';

import Raven from 'raven';
import RavenService from 'ember-cli-deploy-sentry/services/raven';

import ENV from 'webapp/config/environment';

const UsableRavenService = RavenService.extend({
  // Overwriting 'isRavenUsable' to have a dependent key 'ravenOptions', No fastbooth check is done here, is not needed for my 
 // use case.
  isRavenUsable: computed('ravenOptions', function () {
    return Raven.isSetup() === true;
  })
});

export function initialize(container) {
  const config = ENV;

  if (get(config, 'sentry.development') === true) {
    if (get(config, 'sentry.debug') === true) {
      console.info('`sentry` is configured for development mode.');
    }

    return;
  }

  if (!config.sentry) {
    throw new Error('`sentry` should be configured when not in development mode.');
  }

  const raven = UsableRavenService.create();
  raven.setup(config);
  container.register('service:raven', raven, { instantiate: false })
}

export default {
  name: 'raven',
  initialize: initialize
};

TODO
Setup Raven correctly as part of ember-cli-deploy-sentry or document on how to this correctly to capture global exceptions.

Only upload JavaScript files and corresponding source maps

The addon currently seems to upload all files in the dist folder, but for sentry to work properly we only need to upload the JavaScript files and corresponding source maps. I guess we should add some sort of filter on the file extensions.

Ember global deprecation

With Ember 3.27.5 I get the following deprecation at build time. Can we get an update using the latest ember-cli-babel? Thank you!

WARNING: [DEPRECATION] [DEPRECATION] Usage of the Ember Global is deprecated. You should import the Ember module or the specific API instead.

See https://deprecations.emberjs.com/v3.x/#toc_ember-global for details.

Usages of the Ember Global may be caused by an outdated ember-cli-babel dependency. The following steps may help:

* Upgrade the following addons to the latest version:
  * ember-cli-deploy-sentry

setup raven.js

From the README:

automatically setup raven-js? If you want this, let me know.

I think this would be a great addition to the addon as it would allow a simpler setup and overall a better experience of Sentry+Ember.

If it appears relevant to the community, I can guess two options:

  • merge ember-cli-deploy-sentry and ember-cli-sentry
  • use ember-cli-sentry as a dependency for ember-cli-deploy-sentry

I'd be more than happy to discuss the options.

DEPRECATION: ember-cli-babel 5.x has been deprecated

Hey everyone,

Getting a deprecation with latest releases of ember and cli:

DEPRECATION: ember-cli-babel 5.x has been deprecated. Please upgrade to at least ember-cli-babel 6.6. Version 5.2.8 located: my-project -> ember-cli-deploy-sentry -> ember-cli-babel

New Release

Hi Dominik, any way we can get a release with the fixes currently in master?

Thanks for the addon!

windows paths issue - File name must not contain special whitespace characters

message: '400 - {"detail":"File name must not contain special whitespace characters"}',
  error: '{"detail":"File name must not contain special whitespace characters"}',
  options: {
    uri: 'https://sentry.io/api/0/projects/.../files/',
    method: 'POST',
    auth: {
      bearer: '....'
    },
    formData: {
      name: 'https://my-domain.com/spa/assets\\auto-import-fastboot-81f919f3d82c38703c7b0de8c4c4a874.map',
      file: [ReadStream]
    },

fixed by:

image

I get sourcemaps in sentry without this addon. Why would I need this addon to upload them? Does it do anything other than upload sourcemaps?

I setup ember-cli-sentry, and tested throwing an error, and it works, with sourcemaps. I saw in the docs for that addon that mentioned something about adding sourcemaps: true.

Here's the thing: everything works, sentry is getting sourcemaps just by setting sourcemaps: true, this addon states it "uploads sourcemaps to sentry" but I don't see why that is necessary right now. Maybe sentry added a feature where it reads the sourcemap url from the javascript and then grabs that itself.. but I haven't put anything on a public server, and I know it can't just read the sourcemap off my local server..

I haven't tested if doing a prod build of ember and seeing if a manually thrown error still appears in sentry.

Does this addon do anything other than upload sourcemaps to sentry? It would probably be great for notifying sentry of releases (https://docs.sentry.io/learn/releases/?_ga=2.81390295.1321994106.1516215236-590692524.1516215236)

Ability to disable in `config/deploy.js`

It would be fantastic if we could disable deploying to sentry in specific situations (such as local deploys/debugging). I've tried unsetting ENV.sentry but it will throw an exception for each missing property, making it impossible to easily disable this behaviour (and as a result littering our releases on the Sentry Dashboard).

Being able to unset ENV.sentry would be one way, or introducing a simple ENV.sentry.enabled flag which defaults to true but can be set to false to prevent running the plugin.

Thoughts?

If used with ember-cli-deploy-gzip the uploaded files won't work.

Hi, I'm using this addon alongside ember-cli-deploy-gzip and since gzip runs first, the files deploy-sentry uploads to sentry are gzipped and won't work properly.

I tried disabling gzip for map files but since the js files are still being gzipped (as I want them to be on my server) this is what I see on my sentry stacktrace:

screen shot 2016-11-03 at 21 58 24

Any idea on how to solve this? Is it possible to check if the file is gzipped before uploading and if so?

  1. Add a header to the file upload post which will make sentry properly handle the gzipped file?
  2. Or unzip the file before uploading?

Thank you very much in advance

400 error if release exists

In some cases (I can't isolate it yet), when my build server tries to deploy, it's dying if the release already exists, which is puzzling given the order of operations in the upload method.

I'm trying to isolate, but I thought I'd let you know. See below for output:

cd "./overhaul"
export AWS_ACCESS_KEY_ID="$DEPLOY_AWS_ACCESS_KEY_ID"
export AWS_SECRET_ACCESS_KEY="$DEPLOY_AWS_SECRET_ACCESS_KEY"
export AWS_BUCKET="$DEMO_AWS_BUCKET"
export AWS_REGION="$DEMO_AWS_REGION"
export SSH_TUNNEL_USERNAME="$DEPLOY_SSH_TUNNEL_USERNAME"
export SSH_TUNNEL_HOST="$DEPLOY_SSH_TUNNEL_HOST"
export SSH_TUNNEL_DESTINATION_HOST="$DEMO_REDIS_HOST"
export SSH_TUNNEL_DESTINATION_PORT="$DEMO_REDIS_PORT"
export FINGERPRINT_PREPEND_URL="$DEMO_FINGERPRINT_PREPEND_URL"
export SENTRY_DSN="$DEMO_SENTRY_EMBER_DSN"
export SENTRY_PROJECT="$DEMO_SENTRY_PROJECT"
export SENTRY_EMBER_SOURCEMAPS_KEY="$DEMO_SENTRY_EMBER_SOURCEMAPS_KEY"
./node_modules/ember-cli/bin/ember deploy demo --verbose
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
Registering hook -> configure[json-config]
Registering hook -> didBuild[json-config]
Registering hook -> configure[build]
Registering hook -> build[build]
Registering hook -> configure[display-revisions]
Registering hook -> configure[gzip]
Registering hook -> willUpload[gzip]
Registering hook -> configure[s3]
Registering hook -> upload[s3]
Registering hook -> configure[redis]
Registering hook -> fetchInitialRevisions[redis]
Registering hook -> upload[redis]
Registering hook -> willActivate[redis]
Registering hook -> activate[redis]
Registering hook -> fetchRevisions[redis]
Registering hook -> didDeploy[redis]
Registering hook -> configure[manifest]
Registering hook -> willUpload[manifest]
Registering hook -> configure[revision-data]
Registering hook -> prepare[revision-data]
Registering hook -> configure[sentry]
Registering hook -> prepare[sentry]
Registering hook -> upload[sentry]
Registering hook -> didDeploy[sentry]
Registering hook -> configure[ssh-tunnel]
Registering hook -> setup[ssh-tunnel]
Registering hook -> teardown[ssh-tunnel]
Executing pipeline
|
+- configure
|  |
|  +- json-config
|    - validating config
|    - Missing config: `fileInputPattern`, using default: `index.html`
|    - Missing config: `fileOutputPattern`, using default: `index.json`
|    - Missing config: `projectRoot`, using default: `[Function]`
|    - Missing config: `distDir`, using default: `[Function]`
|    - Missing config: `jsonBlueprint`, using default: `[object Object]`
|    - config ok
|  |
|  +- build
|    - validating config
|    - Missing config: `outputPath`, using default: `tmp/deploy-dist`
|    - config ok
|  |
|  +- display-revisions
|    - validating config
|    - Missing config: `amount`, using default: `[Function]`
|    - Missing config: `revisions`, using default: `[Function]`
|    - config ok
|  |
|  +- gzip
|    - validating config
|    - Missing config: `ignorePattern`, using default: `null`
|    - Missing config: `zopfli`, using default: `false`
|    - Missing config: `keep`, using default: `false`
|    - Missing config: `distDir`, using default: `[Function]`
|    - Missing config: `distFiles`, using default: `[Function]`
|    - config ok
|  |
|  +- s3
|    - validating config
|    - Missing config: `filePattern`, using default: `**/*.{js,css,png,gif,ico,jpg,map,xml,txt,svg,swf,eot,ttf,woff,woff2}`
|    - Missing config: `prefix`, using default: ``
|    - Missing config: `acl`, using default: `public-read`
|    - Missing config: `distDir`, using default: `[Function]`
|    - Missing config: `distFiles`, using default: `[Function]`
|    - Missing config: `gzippedFiles`, using default: `[Function]`
|    - Missing config: `manifestPath`, using default: `[Function]`
|    - Missing config: `uploadClient`, using default: `[Function]`
|    - Missing config: `s3Client`, using default: `[Function]`
|    - config ok
|  |
|  +- redis
|    - validating config
|    - Missing config: `host`, using default: `localhost`
|    - Missing config: `port`, using default: `[Function]`
|    - Missing config: `distDir`, using default: `[Function]`
|    - Missing config: `keyPrefix`, using default: `[Function]`
|    - Missing config: `activationSuffix`, using default: `current`
|    - Missing config: `activeContentSuffix`, using default: `current-content`
|    - Missing config: `revisionKey`, using default: `[Function]`
|    - Missing config: `didDeployMessage`, using default: `[Function]`
|    - Missing config: `redisDeployClient`, using default: `[Function]`
|    - Missing config: `maxRecentUploads`, using default: `10`
|    - Missing config: `revisionData`, using default: `[Function]`
|    - config ok
|  |
|  +- manifest
|    - validating config
|    - Missing config: `filePattern`, using default: `**/*.{js,css,png,gif,ico,jpg,map,xml,txt,svg,swf,eot,ttf,woff,woff2}`
|    - Missing config: `manifestPath`, using default: `manifest.txt`
|    - Missing config: `distDir`, using default: `[Function]`
|    - Missing config: `distFiles`, using default: `[Function]`
|    - config ok
|  |
|  +- revision-data
|    - validating config
|    - Missing config: `type`, using default: `file-hash`
|    - Missing config: `filePattern`, using default: `index.html`
|    - Missing config: `versionFile`, using default: `package.json`
|    - Missing config: `distDir`, using default: `[Function]`
|    - Missing config: `distFiles`, using default: `[Function]`
|    - Missing config: `scm`, using default: `[Function]`
|    - config ok
|  |
|  +- sentry
|    - validating config
|    - Missing config: `distDir`, using default: `[Function]`
|    - Missing config: `filePattern`, using default: `/**/*.{js,map}`
|    - Missing config: `revisionKey`, using default: `[Function]`
|    - Missing config: `didDeployMessage`, using default: `[Function]`
|    - config ok
|  |
|  +- ssh-tunnel
|    - validating config
|    - Missing config: `port`, using default: `22`
|    - Missing config: `srcPort`, using default: `[Function]`
|    - Missing config: `tunnelClient`, using default: `[Function]`
|    - config ok
|
+- setup
|  |
|  +- ssh-tunnel
|
+- willDeploy
|
+- willBuild
|
+- build
|  |
|  +- build
|    - building app to `tmp/deploy-dist` using buildEnv `production`...
|    - ✔  assets/img/icons/edit-a7b24b1cfa9cbc1cc05faa0d5fdc8e67.gif
|    - ✔  assets/img/icons/edit-bucket-34e62381612d48c3d5a5185ee5d4b6c5.png
|    - ✔  assets/img/icons/edit-tout-300c373703c9c2857e7164d82dc3f2b4.png
|    - ✔  assets/img/icons/status_draft-65767c0b6785c19a90e01e448181b2a3.png
|    - ✔  assets/img/icons/status_scheduled-ad9fffae77d3f664e7930bc60c17bd76.png
|    - ✔  assets/img/icons/status_submitted-de68fa84d5e6f4b56a046bbe1e899f9e.png
|    - ✔  assets/img/widgets/quote-2e0663645d09000a25cfb18ddaa55d7f.png
|    - ✔  assets/overhaul-09acfbe2b7a6b95eb8c2e89e6c30bf77.map
|    - ✔  assets/overhaul-128b66dd37656379c1b9a61c9dc49855.css
|    - ✔  assets/overhaul-7781c743c7b7af72d9e665bdefb1b310.js
|    - ✔  assets/vendor-628d67d5fa3b6165b149e0ce5e37a472.map
|    - ✔  assets/vendor-bcbf18b65e0fe959a99bab20e790716f.js
|    - ✔  assets/vendor-db1aae18a50d64dc7d57cc30890fa4a9.css
|    - ✔  crossdomain.xml
|    - ✔  index.html
|    - ✔  robots.txt
|    - build ok
|
+- didBuild
|  |
|  +- json-config
|    - generating `tmp/deploy-dist/index.json` from `tmp/deploy-dist/index.html`
|    - generated: `tmp/deploy-dist/index.json`
|    - added `index.json` to `context.distFiles`
|
+- willPrepare
|
+- prepare
|  |
|  +- revision-data
|    - creating revision data using `file-hash`
|    - generated revision data for revision: `ff1d82b79d0f8a4bc5c2747bf765868b`
|  |
|  +- sentry
|
+- didPrepare
|
+- fetchInitialRevisions
|  |
|  +- redis
|    - Listing initial revisions for key: `overhaul:index`
|
+- willUpload
|  |
|  +- gzip
|    - gzipping `**/*.{js,css,ico,map,xml,txt,svg,eot,ttf,woff,woff2}`
|    - ignoring `null`
|    - ✔  crossdomain.xml
|    - ✔  robots.txt
|    - ✔  assets/vendor-db1aae18a50d64dc7d57cc30890fa4a9.css
|    - ✔  assets/overhaul-128b66dd37656379c1b9a61c9dc49855.css
|    - ✔  assets/overhaul-7781c743c7b7af72d9e665bdefb1b310.js
|    - ✔  assets/overhaul-09acfbe2b7a6b95eb8c2e89e6c30bf77.map
|    - ✔  assets/vendor-bcbf18b65e0fe959a99bab20e790716f.js
|    - ✔  assets/vendor-628d67d5fa3b6165b149e0ce5e37a472.map
|    - gzipped 8 files ok
|  |
|  +- manifest
|    - generating manifest at `manifest.txt`
|    - generated manifest including 15 files ok
|
+- upload
|  |
|  +- s3
|    - Using AWS access key id and secret access key from config
|    - preparing to upload to S3 bucket `wnyc.org-demo-static`
|    - Downloading manifest for differential deploy from `manifest.txt`...
|    - Manifest found. Differential deploy will be applied.
|    - ✔  manifest.txt
|    - ✔  assets/overhaul-128b66dd37656379c1b9a61c9dc49855.css
|    - ✔  assets/overhaul-09acfbe2b7a6b95eb8c2e89e6c30bf77.map
|    - ✔  assets/vendor-bcbf18b65e0fe959a99bab20e790716f.js
|    - ✔  assets/vendor-628d67d5fa3b6165b149e0ce5e37a472.map
|    - ✔  assets/overhaul-7781c743c7b7af72d9e665bdefb1b310.js
|    - uploaded 6 files ok
|  |
|  +- redis
|    - Uploading `tmp/deploy-dist/index.json`
|    - Uploaded with key `overhaul:index:ff1d82b79d0f8a4bc5c2747bf765868b`
|  |
|  +- sentry
{ [StatusCodeError: 400 - [object Object]]
  name: 'StatusCodeError',
  statusCode: 400,
  message: '400 - [object Object]',
  error: { detail: 'Release with version already exists' },
  options: 
   { uri: 'https://sentry.wnyc.org/api/0/projects/sentry/www-demo-ember/releases/',
     method: 'POST',
     auth: { user: [redacted] },
     json: true,
     body: { version: 'ff1d82b79d0f8a4bc5c2747bf765868b' },
     resolveWithFullResponse: true,
     callback: undefined,
     simple: true },
  response: 
   { _readableState: 
      { objectMode: false,
        highWaterMark: 16384,
        buffer: [],
        length: 0,
        pipes: null,
        pipesCount: 0,
        flowing: true,
        ended: true,
        endEmitted: true,
        reading: false,
        sync: true,
        needReadable: false,
        emittedReadable: false,
        readableListening: false,
        defaultEncoding: 'utf8',
        ranOut: false,
        awaitDrain: 0,
        readingMore: false,
        decoder: null,
        encoding: null,
        resumeScheduled: false },
     readable: false,
     domain: null,
     _events: 
      { end: [Object],
        close: [Object],
        data: [Function],
        error: [Function] },
     _maxListeners: undefined,
     socket: 
      { _connecting: false,
        _hadError: false,
        _handle: null,
        _parent: null,
        _host: 'sentry.wnyc.org',
        _readableState: [Object],
        readable: false,
        domain: null,
        _events: [Object],
        _maxListeners: 0,
        _writableState: [Object],
        writable: false,
        allowHalfOpen: false,
        destroyed: true,
        bytesRead: 301,
        _bytesDispatched: 298,
        _pendingData: null,
        _pendingEncoding: '',
        _tlsOptions: [Object],
        _secureEstablished: true,
        _securePending: false,
        _newSessionPending: false,
        _controlReleased: true,
        _SNICallback: null,
        ssl: [Object],
        servername: null,
        npnProtocol: undefined,
        authorized: true,
        authorizationError: null,
        encrypted: true,
        parser: null,
        _httpMessage: [Object],
        read: [Function],
        _consuming: true,
        server: null,
        _requestCert: true,
        _rejectUnauthorized: true,
        _idleNext: null,
        _idlePrev: null,
        _idleTimeout: -1 },
     connection: 
      { _connecting: false,
        _hadError: false,
        _handle: null,
        _parent: null,
        _host: 'sentry.wnyc.org',
        _readableState: [Object],
        readable: false,
        domain: null,
        _events: [Object],
        _maxListeners: 0,
        _writableState: [Object],
        writable: false,
        allowHalfOpen: false,
        destroyed: true,
        bytesRead: 301,
        _bytesDispatched: 298,
        _pendingData: null,
        _pendingEncoding: '',
        _tlsOptions: [Object],
        _secureEstablished: true,
        _securePending: false,
        _newSessionPending: false,
        _controlReleased: true,
        _SNICallback: null,
        ssl: [Object],
        servername: null,
        npnProtocol: undefined,
        authorized: true,
        authorizationError: null,
        encrypted: true,
        parser: null,
        _httpMessage: [Object],
        read: [Function],
        _consuming: true,
        server: null,
        _requestCert: true,
        _rejectUnauthorized: true,
        _idleNext: null,
        _idlePrev: null,
        _idleTimeout: -1 },
     httpVersionMajor: 1,
     httpVersionMinor: 1,
     httpVersion: '1.1',
     complete: true,
     headers: 
      { allow: 'GET, POST, HEAD, OPTIONS',
        'content-language': 'en',
        'content-type': 'application/json',
        date: 'Fri, 29 Apr 2016 19:32:00 GMT',
        server: 'nginx/1.4.6 (Ubuntu)',
        vary: 'Accept-Language, Cookie',
        'content-length': '49',
        connection: 'Close' },
     rawHeaders: 
      [ 'Allow',
        'GET, POST, HEAD, OPTIONS',
        'Content-Language',
        'en',
        'Content-Type',
        'application/json',
        'Date',
        'Fri, 29 Apr 2016 19:32:00 GMT',
        'Server',
        'nginx/1.4.6 (Ubuntu)',
        'Vary',
        'Accept-Language, Cookie',
        'Content-Length',
        '49',
        'Connection',
        'Close' ],
     trailers: {},
     rawTrailers: [],
     _pendings: [],
     _pendingIndex: 0,
     upgrade: false,
     url: '',
     method: null,
     statusCode: 400,
     statusMessage: 'BAD REQUEST',
     client: 
      { _connecting: false,
        _hadError: false,
        _handle: null,
        _parent: null,
        _host: 'sentry.wnyc.org',
        _readableState: [Object],
        readable: false,
        domain: null,
        _events: [Object],
        _maxListeners: 0,
        _writableState: [Object],
        writable: false,
        allowHalfOpen: false,
        destroyed: true,
        bytesRead: 301,
        _bytesDispatched: 298,
        _pendingData: null,
        _pendingEncoding: '',
        _tlsOptions: [Object],
        _secureEstablished: true,
        _securePending: false,
        _newSessionPending: false,
        _controlReleased: true,
        _SNICallback: null,
        ssl: [Object],
        servername: null,
        npnProtocol: undefined,
        authorized: true,
        authorizationError: null,
        encrypted: true,
        parser: null,
        _httpMessage: [Object],
        read: [Function],
        _consuming: true,
        server: null,
        _requestCert: true,
        _rejectUnauthorized: true,
        _idleNext: null,
        _idlePrev: null,
        _idleTimeout: -1 },
     _consuming: true,
     _dumped: false,
     req: 
      { domain: null,
        _events: [Object],
        _maxListeners: undefined,
        output: [],
        outputEncodings: [],
        outputCallbacks: [],
        writable: true,
        _last: true,
        chunkedEncoding: false,
        shouldKeepAlive: false,
        useChunkedEncodingByDefault: true,
        sendDate: false,
        _removedHeader: [Object],
        _hasBody: true,
        _trailer: '',
        finished: true,
        _hangupClose: false,
        _headerSent: true,
        socket: [Object],
        connection: [Object],
        _header: 'POST /api/0/projects/sentry/www-demo-ember/releases/ HTTP/1.1\r\nhost: sentry.wnyc.org\r\nauthorization: Basic [redacted]\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 46\r\nConnection: close\r\n\r\n',
        _headers: [Object],
        _headerNames: [Object],
        agent: [Object],
        socketPath: undefined,
        method: 'POST',
        path: '/api/0/projects/sentry/www-demo-ember/releases/',
        parser: null,
        res: [Circular] },
     request: 
      { domain: null,
        _events: [Object],
        _maxListeners: undefined,
        uri: [Object],
        method: 'POST',
        body: '{"version":"ff1d82b79d0f8a4bc5c2747bf765868b"}',
        resolveWithFullResponse: true,
        readable: true,
        writable: true,
        explicitMethod: true,
        _qs: [Object],
        _auth: [Object],
        _oauth: [Object],
        _multipart: [Object],
        _redirect: [Object],
        _tunnel: [Object],
        _rp_resolve: [Function],
        _rp_reject: [Function],
        _rp_promise: [Object],
        _rp_callbackOrig: undefined,
        callback: [Function],
        _rp_options: [Object],
        headers: [Object],
        setHeader: [Function],
        hasHeader: [Function],
        getHeader: [Function],
        removeHeader: [Function],
        localAddress: undefined,
        pool: {},
        dests: [],
        __isRequestRequest: true,
        _callback: [Function: RP$callback],
        proxy: null,
        tunnel: true,
        setHost: true,
        originalCookieHeader: undefined,
        _disableCookies: true,
        _jar: undefined,
        port: 443,
        host: 'sentry.wnyc.org',
        path: '/api/0/projects/sentry/www-demo-ember/releases/',
        _json: true,
        httpModule: [Object],
        agentClass: [Object],
        agent: [Object],
        _rp_promise_in_use: true,
        _started: true,
        href: 'https://sentry.wnyc.org/api/0/projects/sentry/www-demo-ember/releases/',
        req: [Object],
        ntick: true,
        response: [Circular],
        originalHost: 'sentry.wnyc.org',
        originalHostHeaderName: 'host',
        responseContent: [Circular],
        _destdata: true,
        _ended: true,
        _callbackCalled: true },
     toJSON: [Function: responseToJSON],
     caseless: { dict: [Object] },
     read: [Function],
     body: { detail: 'Release with version already exists' } } }
|
+- didFail
SilentError: Creating release failed
undefined|
Pipeline aborted

cd "./overhaul"
export AWS_ACCESS_KEY_ID="$DEPLOY_AWS_ACCESS_KEY_ID"
export AWS_SECRET_ACCESS_KEY="$DEPLOY_AWS_SECRET_ACCESS_KEY"
export AWS_BUCKET="$DEMO_AWS_BUCKET"
export AWS_REGION="$DEMO_AWS_REGION"
export SSH_TUNNEL_USERNAME="$DEPLOY_SSH_TUNNEL_USERNAME"
export SSH_TUNNEL_HOST="$DEPLOY_SSH_TUNNEL_HOST"
export SSH_TUNNEL_DESTINATION_HOST="$DEMO_REDIS_HOST"
export SSH_TUNNEL_DESTINATION_PORT="$DEMO_REDIS_PORT"
export FINGERPRINT_PREPEND_URL="$DEMO_FINGERPRINT_PREPEND_URL"
export SENTRY_DSN="$DEMO_SENTRY_EMBER_DSN"
export SENTRY_PROJECT="$DEMO_SENTRY_PROJECT"
export SENTRY_EMBER_SOURCEMAPS_KEY="$DEMO_SENTRY_EMBER_SOURCEMAPS_KEY"
./node_modules/ember-cli/bin/ember deploy demo --verbose
 returned exit code 1

Action failed: ./node_modules/ember-cli/bin/ember deploy demo --verbose

Sentry wants ember.prod.js as well as the vendor files

I've got my js files being uploaded into sentry just fine, but I'm seeing nothing but invalid row/column errors in the sentry interface. when I chatted to their support team, they indicated that they're looking for assets/vendor/ember/ember.prod.js which isn't deployed anywhere and therefor doesn't exist.

The suggested solution was to upload ember.prod.js as an artifact alongside the vendor files. Anyone else seen this?

How is the revision meta tag supposed to be used?

The readme says:

When you setup raven-js you can retrieve it like this:

Raven.config({
    release: $("meta[name='sentry:revision']").attr('content')
});

How is this supposed to work with ember-cli-sentry?

Error: socket hang up

Hey,
Since updating ember-cli-deploy to the latest version uploading the sourcemaps doesn't seem to work. I've not changed any configuration on sentry, but I get this error while uploading sourcemaps:

RequestError: Error: socket hang up
RequestError: Error: socket hang up
    at new RequestError (/home/tom/PycharmProjects/doge/frontend/node_modules/request-promise/lib/errors.js:11:15)
    at Request.RP$callback [as _callback] (/home/tom/PycharmProjects/doge/frontend/node_modules/request-promise/lib/rp.js:56:32)
    at self.callback (/home/tom/PycharmProjects/doge/frontend/node_modules/request/request.js:199:22)
    at emitOne (events.js:95:20)
    at Request.emit (events.js:182:7)
    at Request.onRequestError (/home/tom/PycharmProjects/doge/frontend/node_modules/request/request.js:821:8)
    at emitOne (events.js:90:13)
    at ClientRequest.emit (events.js:182:7)
    at TLSSocket.socketOnEnd (_http_client.js:331:9)
    at emitNone (events.js:85:20)
    at TLSSocket.emit (events.js:179:7)
    at endReadableNT (_stream_readable.js:913:12)
    at _combinedTickCallback (node.js:377:13)
    at process._tickCallback (node.js:401:11)Pipeline aborted

It seems to create the release, but fails when uploading the sourcemaps. I've got no idea how to debug this - perhaps the error message could be improved?

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.