nopCommerce
nopCommerce copied to clipboard
Do not store LimitedToStores / LimitedToRoles in plugin.json because of CI/CD
nopCommerce version: any
Steps to reproduce the problem:
- As of today, we have setup CI/CD Pipelines for nearly all of our customers, where we deploy nopCommerce from Bitbucket Pipelines to their hosting Server (Mostly Azure)
- During deployment the plugin.json for every plugin is overridden, which would require us to save LimitedToStores / LimitedToRoles inside our repo, which doesn't make a lot of sense.
- Also if the customer decides to make a change to LimitedToStores / LimitedToRoles during runtime, nobody will notice, and we would override the file with the old information during the next deployment.
As CI/CD pipelines become much more common these days, we think that we can't be the only ones having this problem.
Also we haven't figured out a viable workaround for this, expect to override the appropriate PluginManager, which cause some work.
It seems to me easier to set up the СD in such a way that it does not overwrite the configuration files. Historically, we don't store any information about plugins in the database and allow users to change plugins through the file system, otherwise the plugin system would be very inflexible. I do not see a way to transfer this functionality without global changes.
But not deploying the plugin.json would bring other problems. What about if we update the plugin version locally to add a new migration? If we don't overrwrite the plugin.json, the migration would not be executed.
I see your point, but as you suggest, I think this would require global changes.
Well, that's a good clarification. I was thinking that we could consider a fairly simple migration of the LimitedToStores / LimitedToRoles properties to the root plugins.json file. I guess it won't be too hard and will solve the CI/CD problem
Yep, I think that should work out. We initially also tried to deploy the plugins.json, but we have stopped that trough all customers, because of other issues.
So deploying the plugins.json is not a good idea in itself, so I think your idea should work out!
Is there any update on this?
We also experienced this with Widget-Display order, so the problem is bigger than initially expected
@AndreiMaz @skoshelev Are there any plans to incorporate this into the next version?
If not we will be required to find a custom solution for our customers for this general problem! Thanks for your opinion!