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
Plugins should move quickly and break things #785
Comments
Prefer Proposal 2 |
Proposal 2 + I'd add only one thing on the warning message, some way to the user read a document explaining the impacts of the update and how it can be done. Maybe this document could be a markdown commited together with the plugin files and in version.yml file this document is linked together with the version descriptions. On Fri, Nov 21, 2014 at 4:32 AM, Samuel Georges notifications@github.com
|
Prefer proposal 2. The way I see it, most developers using October will not author their own plugins, and do not closely follow the octoberCMS dev roadmap (let alone every plugin's development), so they should be explicitly notified. 2 ideas:
|
One more vote for proposal 2, also with the second point @connecteev mentioned. It's possible the plugin developer may release a critical security update to v1 after the release of v2. Perhaps there could be a way of blacklisting major updates, while continuing to update This starts to leak over into proposal 1 though. I guess the ideal scenario would be one similar to how composer itself works, whereby you can specify a branch or tag to follow, for instance "dev-master" or "1.x.x". The downside to this is it assumes plugin developers tag their releases in Git, |
+1 to proposal 2 |
+1 for proposal 2, but I do agree with @connecteev definitely if you go this route. I'm hesitant to even give my clients control over software updates though as I worry if they update when they shouldn't, it could break things and then I have to fix them. This is why @dshoreman's point seems very valid though too. If we end up keeping the client off v2.0 and unbeknownst to me, a huge security flaw happens on v1.0, the package controller should be able to still update v1.0 to fix it for those who chose not to update. I don't think it would hurt to have it work similarly to composer and bring in some more structure with tagging your releases in Git. |
+1 for proposal 2 and +1 for the point @connecteev made. |
+1 proposal 2 I would also not mind seeing some sort of a changelog when updating a plugin. I can usually get a decent idea of if I can update fine with such a thing. |
@dubcanada The Changelog plugin would be a great place to add that sort of thing. I'd be happy to merge a PR if you want to add functionality that scans plugins. Pull requests can be made to the |
+1 proposal 2, but thats assuming people are being good and using semantic versioning :( |
+1 proposal 2, I loved it :) |
Reference: rainlab/user-plugin#73
Story
Charlie has released an amazing affiliate marketing plugin for OctoberCMS. Over 100 websites are using the plugin to manage click tracking and pay commissions.
Later, Charlie realises that perhaps he could have coded the plugin a little better. Unfortunately it means he needs to introduce features that may break websites already using the plugin.
Charlie wants to create Version 2 of the plugin and without hurting the developers who rely on the older code in the original version (Version 1).
Proposal 1
Charlie is able to log in to the OctoberCMS website and create a new "build" for his plugin. The current build (Version 1) is called
stable
by default. All the current users are allocated to thestable
build.Charlie renames
stable
toversion1
[complex: data integrity]. He creates another build calledversion2
.Charlie also creates a
version1
andversion2
branch in his git repo. The git branches are then linked to the October builds.Charlie can continue to maintain both versions easily. New users will receive the
version2
build by default, exisiting users will remain onversion1
unless they voluntarily decide to opt-in forversion2
.Users can opt-in via some form of GUI:
The benefits of this proposal are that Charlie can continue to maintain
version1
in the future. The downsides are the complexity of this solution is significant.Proposal 2
Plugins currently use a version.yaml file to define their history, these follow semantic versioning with MAJOR, MINOR and PATCH numbers, where
v1.2.3
is major version 1, minor version 2 and patch version 3. This proposal places greater importance on the MAJOR segment of the version number.Charlie has so far kept his plugin at v1.0.78. Now that he has decided to release a new version, he bumps the plugin to v2.0.0. This is a significant event for the plugin management process.
When the build server sees an increase in a MAJOR version, it will retain a locked snapshot of the previous version.
When October's update process sees a plugin is attempting to increase a MAJOR version (eg: v1.x to v2.x, or v1.x to v4.x) it will prompt the user.
If the user selects "NO", the plugin is added to a Do not update list and future updates will be ignored. If the user selects "YES" then the plugin is updated as normal.
When a project, plugin or theme depends on Version 1 of the plugin, the server will deliver the locked snapshot version.
The benefits of this proposal are the greater simplicity. The downsides are that once a plugin enters a new version, the old [locked snapshot] version can no longer be maintained.
Proposal 3
If an update.yaml comment begins with three !!! then it will be considered "Important" and will require the user to confirm before updating, the plugin will present 3 choices:
Example:
The text was updated successfully, but these errors were encountered: