-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If used with ember-cli-deploy-gzip the uploaded files won't work. #26
Comments
I dont have time to look into this right now :-( |
Are you using master or the release version btw? |
Release. I can submit a PR, just need some guidance on what is the best solution. |
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. |
Hehe, ok mate no problem I'll give it a try then. |
We should also push this convo to @urbany there are (from my point of view) 3 options, sorted in order of preference:
|
@duizendnegen thank you for replying, I agree with all your points and priorities. |
So I just spent a few hours trying to solve this and looking at @duizendnegen priorities:
Right now I decided to stop GZIPping my files and let cloudfront do it for me. |
Could you open a ticket on the |
@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. |
Any update on this, did support get back to you? |
@duizendnegen nothing yet, still waiting. |
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 |
@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. |
@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. |
It's happening 🎉 getsentry/sentry#4677 |
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 |
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 👍 |
Looks like the sentry PR has been merged. |
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 |
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 |
This issue hasn't been updated in 6 months. Is there any chance we will be able to use ember-cli-deploy-gzip? |
I asked about this yesterday: getsentry/sentry#4566 |
I went the route of unzipping and renaming the unzipped files |
@kmiyashiro care to share? This would help at least the 6 contributors of this thread and probably many more! |
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 /* 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`);
});
},
};
}
}; |
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:
Any idea on how to solve this? Is it possible to check if the file is gzipped before uploading and if so?
Thank you very much in advance
The text was updated successfully, but these errors were encountered: