Skip to content
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

New automated test to detect when piwik.js minified file is out of sync with original piwik.js #8195

Closed
mattab opened this issue Jun 24, 2015 · 3 comments
Assignees
Labels
c: Tests & QA For issues related to automated tests or making it easier to QA & test issues.
Milestone

Comments

@mattab
Copy link
Member

mattab commented Jun 24, 2015

Issue: it's happened a few times that we modify js/piwik.js (the original piwik.js) and that we forget to commit to git the minified version piwik.js of this file.

Usually we detect these problems before the stable release, but it is likely that in the future we will forget and release a new Piwik version with some "missing bug fix" in the Javascript client.

Goal: create an automated test that will fail when the minified of js/piwik.js is different from the piwik.js found in git.

@mattab mattab added the c: Tests & QA For issues related to automated tests or making it easier to QA & test issues. label Jun 24, 2015
@mnapoli
Copy link
Contributor

mnapoli commented Jun 24, 2015

It might be better to automate the creation of that minified file during the release process for example? Having a minified file open to modification is not the best for security issues (reviewing a pull request affecting those is not easy), it's error prone to keep it up to date and every minification tool works differently.

@mattab
Copy link
Member Author

mattab commented Jun 25, 2015

automating the creation of minified piwik.js sounds best solution! I think we have the requirement of keeping /piwik.js minified in the git repo as people may rely on this (somehow it is API). So doing the minification at release would be too late.

maybe we could automatically commit the minified piwik.js when it is modified in any commit? (the same trick we did to keep travis.yml auto updated could be used to push the minified piwik.js)

@thomaszbz
Copy link

Would assetic be an option for you? It works great with symfony. https://github.com/kriswallsmith/assetic

Assetic is running a yuicompressor.jar. This needs to be done before deployment (of course, there's a symfony command).

@mattab mattab added this to the Mid term milestone Jul 15, 2015
@mattab mattab added the Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. label Jul 15, 2015
@mattab mattab self-assigned this Mar 30, 2016
@mattab mattab modified the milestones: 2.16.1, Long term Mar 30, 2016
@mattab mattab removed the Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. label Mar 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Tests & QA For issues related to automated tests or making it easier to QA & test issues.
Projects
None yet
Development

No branches or pull requests

3 participants