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

Enable development mode by default and disable it in latest.zip #6536

Open
tsteur opened this issue Oct 28, 2014 · 14 comments
Open

Enable development mode by default and disable it in latest.zip #6536

tsteur opened this issue Oct 28, 2014 · 14 comments
Labels
c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. c: Usability For issues that let users achieve a defined goal more effectively or efficiently. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.

Comments

@tsteur
Copy link
Member

tsteur commented Oct 28, 2014

See #6533

I think we should enable development mode in Git repository by default and disable it when building latest.zip. This improves the usability for developers. They currently have to check out Piwik from Git and always have to enable development mode afterwards, every developer, always. If a developer does not read carefully that he has to enable development mode it can even lead to errors and to an unhappy / frustrated developer who might not want to develop plugins for Piwik.

It was mentioned that some people use Piwik from Git in production which I think is a bad idea. Not only because it is unstable but because it may contain files that are not supposed to be in production etc. This can be a security issue. If someone wants to do this it might be better to have a separate repository containing only the files that are supposed to be in production or alternatively to make the build script work for such users to bring the original repository in the same state as the latest.zip. If someone misuses it for production it would be only a bit slower for him as caching is not enabled etc. We could mention this in FAQ or guide or whatever.

As we consider us as a platform the advantage for developers overweigh the disadvantage for users who use Piwik from Git in production.

@tsteur tsteur added the c: Usability For issues that let users achieve a defined goal more effectively or efficiently. label Oct 28, 2014
@mattab
Copy link
Member

mattab commented Oct 28, 2014

Great idea 👍

@mattab mattab modified the milestones: Piwik 2.9.0, Short term Oct 28, 2014
@tsteur
Copy link
Member Author

tsteur commented Oct 28, 2014

I am wondering what the best way is to implement it. Disabling development mode and merged assets in build.sh via bash sounds a bit fragile.

Could we maybe use the common.config.ini.php to overwrite default values for development (meaning this would be in the GIT repository) and in build.sh simply remove this file which would be less fragile and better documented (meaning difference between GIT and latest.zip)? Any other ideas?

Content of file common.config.ini.php would be

[Development]
enabled = 1
disable_merged_assets = 1

I don't know if creating this file would cause any possible side effects.

@mattab
Copy link
Member

mattab commented Oct 28, 2014

I don't know if creating this file would cause any possible side effects.

When Piwik is used as composer dependency then Piwik would have development mode enabled. I think using Piwik as composer dependency is legitimate use case so maybe it is risky to change this behavior. Unfortunately I can't think of ideal solution yet.

@mnapoli
Copy link
Contributor

mnapoli commented Oct 28, 2014

Out of curiosity do people use Piwik as a dependency and then use it like a real application? I mean I get why you would install it with Composer to reuse some classes, but running the whole application like this doesn't make sense to me, why allow that?

@mattab
Copy link
Member

mattab commented Oct 28, 2014

@mnapoli it was real users who asked us for this. When it wasn't working they sent pull requests to make PIwik work when included as composer dependency. I don't know for sure how or why they do this, but for sure it's useful to them. Actually we even use this ourselves at Piwik PRO (see WIP misc-EnterpriseComposerFiles).

@tsteur
Copy link
Member Author

tsteur commented Oct 28, 2014

We should really have a separate repository for this containing only the files of latest.zip or use split build.sh script in two parts to make it possible to bring the repository in the same state as latest.zip. Everything else would be kinda careless / can lead to an error

@mattab
Copy link
Member

mattab commented Oct 28, 2014

@tsteur This is important topic, we need to get it right! Maybe we can discuss and take decisions in the next sprint? (I'm referring to how misc-EnterpriseComposerFiles should work and whether we should load piwik as composer dependency and how we can test the 'composed' releases etc.)

See also: #6757

@mattab mattab added the Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change. label Nov 3, 2014
@mattab
Copy link
Member

mattab commented Apr 7, 2015

This was done months ago

@mattab mattab closed this as completed Apr 7, 2015
@mattab mattab added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Apr 7, 2015
@mattab
Copy link
Member

mattab commented Apr 7, 2015

actually it was not done, now that I read again the issue description, but I dont think we should care much about this. feel free to reopen

@mattab mattab modified the milestones: Mid term, Short term Apr 7, 2015
@tsteur
Copy link
Member Author

tsteur commented Apr 7, 2015

It means a lot to me. It removes one complicated step in all manuals etc. Considered we are a platform and we want to focus on this it is a must. Reopen :)

@tsteur tsteur reopened this Apr 7, 2015
@mattab
Copy link
Member

mattab commented Apr 7, 2015

Makes sense.

We should do this also:

@mattab mattab added c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. and removed not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. labels Apr 7, 2015
@mnapoli
Copy link
Contributor

mnapoli commented Apr 7, 2015

@mattab we could also stop supporting deploying in production with git? I know some will do it anyway but we could not document it anymore, etc. what do you think? Is there a big value to offer support for git?

@mattab mattab added the Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. label Apr 7, 2015
@tsteur
Copy link
Member Author

tsteur commented Apr 7, 2015

👍 I had this discussion already with @mattab a while ago. Not sure whether on Github or here. We should be stop supporting / recommending it and the FAQ should recommend not to do this and that users will do it on their own risk.

If we or users still wanna do this, then they (or we) can create another repo or branch or whatever that contains only the released files for each version. It is a security risk to use Piwik from Git on production as for example many files that are supposed to be removed are not etc.

@tsteur
Copy link
Member Author

tsteur commented Apr 7, 2015

When working on this we could do the same for #7640 and enable logging of SQL statements by default but disable it in latest.zip

@mattab mattab removed the Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. label Sep 23, 2015
@mattab mattab modified the milestones: Long term, Mid term Dec 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. c: Usability For issues that let users achieve a defined goal more effectively or efficiently. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Projects
None yet
Development

No branches or pull requests

3 participants