Comments (27)
Hehe, ok mate no problem I'll give it a try then.
from ember-cli-deploy-sentry.
That's right @alexjpong. There are alternative paths for when Sentry decides it doesn't want to support gzipping, but it's clumsier and much more work (convincing -gzip
to keep the non-encrypted files, rename files after uploading to Sentry so that also S3 and azure-blob also find things like they expect...) - I'd rather wait a bit.
from ember-cli-deploy-sentry.
I see this issue has been brought up before in #8 and #9 but keeping the zipped files isn't a possibility for me. Any ideas on how to fix this for good?
from ember-cli-deploy-sentry.
I dont have time to look into this right now :-(
from ember-cli-deploy-sentry.
Are you using master or the release version btw?
from ember-cli-deploy-sentry.
Release. I can submit a PR, just need some guidance on what is the best solution.
from ember-cli-deploy-sentry.
It would be a start to try master, I'm afraid I can't give any guidance atm. I haven't done any Ember or Node.js work lately - you're probably all on your own here.
from ember-cli-deploy-sentry.
We should also push this convo to ember-cli-deploy-gzip
, there's cases where we want to keep both the processed files (possibly in distFiles: []
) and unprocessed files (possibly in rawFiles: []
).
@urbany there are (from my point of view) 3 options, sorted in order of preference:
- see if Sentry accepts gzipped assets if we're smarter with headers that we sent to them;
- see if we can get the raw/unprocessed files from
ember-cli-deploy-gzip
; - unzip the files separately again, writing a
ember-cli-deploy-ungzip
. I vaguely recall other plugins have travelled this route, it would not be my preference at all.
from ember-cli-deploy-sentry.
@duizendnegen thank you for replying, I agree with all your points and priorities.
from ember-cli-deploy-sentry.
So I just spent a few hours trying to solve this and looking at @duizendnegen priorities:
- could not make it work, tried using the following headers during upload and it doesn't fix the problem:
Transfer-Encoding: gzip
,Content-Encoding: gzip
- ember-cli-deploy-gzip has an option to keeo the original files, but then the gzipped files have a different name so it's not what we need, and doing something there to keep the originals seems overkill.
- This is the only option I can see working now, I can take the idea from #9 and adapt to current master if you guys are interested.
Right now I decided to stop GZIPping my files and let cloudfront do it for me.
from ember-cli-deploy-sentry.
Could you open a ticket on the Sentry
side of things and see if they're seeing similar issues? According to getsentry/sentry#934 this should just work out of the box (but obviously it doesn't)
Thanks for spending some cycles on investigating!
from ember-cli-deploy-sentry.
@duizendnegen I opened a ticket yesterday getsentry/sentry#4566 and I'm currently in contact with their support via email. Current status is: it should work but it's not working, so they are going to fix it. I'll keep you posted when I have an update.
from ember-cli-deploy-sentry.
Any update on this, did support get back to you?
from ember-cli-deploy-sentry.
@duizendnegen nothing yet, still waiting.
from ember-cli-deploy-sentry.
Funny since Sentry explicitly says they do not support gzipped artifacts: https://docs.sentry.io/clients/javascript/sourcemaps/#verify-artifacts-are-not-gzipped
If getsentry/sentry#4566 actually gets fixed and you can send gzipped artifacts with a header, this plugin will have to support setting the header for this to work. As far as I can tell, this is not supported yet: https://github.com/dschmidt/ember-cli-deploy-sentry/blob/master/index.js#L171-L174
from ember-cli-deploy-sentry.
@kmiyashiro when they fix it I'll add a PR with a configurable option for the user to indicate if the sourcemaps are gzipped, in which case the header will be sent.
PS: thanks for pinging the sentry issue.
from ember-cli-deploy-sentry.
@urbany would it be possible to submit the PR before Sentry fixes their side? Since it's supposed to be supported, I don't see why we couldn't add support for it now.
from ember-cli-deploy-sentry.
It's happening 🎉 getsentry/sentry#4677
from ember-cli-deploy-sentry.
Excellent!
fyi we don't need to add an extra configurable option to indicate if the sourcemaps are gzipped, we can simply look at whether context.gzippedFiles
is present. See https://github.com/ember-cli-deploy/ember-cli-deploy-s3/blob/master/index.js#L32
from ember-cli-deploy-sentry.
Sure, I will accept a PR as soon as it has landed on sentry master. Feel free to send it before the sentry PR is merged.
Great work everyone 👍
from ember-cli-deploy-sentry.
Looks like the sentry PR has been merged.
from ember-cli-deploy-sentry.
So it looks like we're still waiting for sentry to merge the gzip code? In the mean time, would it be best to rely on something like Cloudfront to gzip instead of ember-cli-deploy-gzip
?
from ember-cli-deploy-sentry.
This issue hasn't been updated in 6 months. Is there any chance we will be able to use ember-cli-deploy-gzip?
from ember-cli-deploy-sentry.
I asked about this yesterday: getsentry/sentry#4566
No response yet.
from ember-cli-deploy-sentry.
I went the route of unzipping and renaming the unzipped files *.gz
before uploading them to sentry with an in-repo addon, I couldn't wait for the fix.
from ember-cli-deploy-sentry.
@kmiyashiro care to share? This would help at least the 6 contributors of this thread and probably many more!
from ember-cli-deploy-sentry.
Sure, here is the in-repo addon, be sure to put this right before the upload to sentry and after you upload your gzipped files where they need to go. In this case, I'm running after s3
which uploads the gzipped files.
/* eslint-env node */
const fs = require('fs');
const glob = require('glob');
module.exports = {
name: 'ember-cli-deploy-unzip-sentry',
createDeployPlugin: function(options) {
return {
name: options.name,
runBefore: 'sentry',
runAfter: ['gzip', 's3'],
upload: function() {
let jsFiles = glob.sync('./dist/**/*.js');
jsFiles.forEach((file) => {
let fileData = fs.readFileSync(file, 'utf-8');
fs.writeFileSync(`${file}.gz`, fileData);
console.log(`✔ copied ${file} to ${file}.gz`);
});
},
};
}
};
from ember-cli-deploy-sentry.
Related Issues (20)
- How is the revision meta tag supposed to be used? HOT 2
- DEPRECATION: `ember-cli/ext/promise` HOT 5
- Sentry wants ember.prod.js as well as the vendor files HOT 3
- Ability to disable in `config/deploy.js` HOT 2
- sentryApiKey required even if using sentryBearerApiKey HOT 6
- Fastboot Issues due to jQuery dependency HOT 3
- 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? HOT 7
- Add an option to be able to upload files with relative path HOT 4
- DEPRECATION: ember-cli-babel 5.x has been deprecated HOT 1
- New Release HOT 3
- Make the options api consistent HOT 3
- bearerApiKey don't wokrs HOT 4
- Associate commits with a release HOT 2
- Migrate request-promise to v4 (fix LODASH vulnerabilities) HOT 3
- Help with Sentry release id not matching Ember deploy S3 revision id
- should we hook up renovate + semantic-release? HOT 1
- windows paths issue - File name must not contain special whitespace characters HOT 2
- Unable to Catch Global Catching Errors - Faulty Raven Service Setup.
- Not able to handle an existing release with existing artifacts HOT 3
- Ember global deprecation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-cli-deploy-sentry.