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 lifecycle idea #93

Open
mmalecki opened this issue Aug 10, 2013 · 7 comments
Open

New lifecycle idea #93

mmalecki opened this issue Aug 10, 2013 · 7 comments

Comments

@mmalecki
Copy link
Contributor

Current lifecycle management is broken (for example, #82, #90). So, here's a proposal for new cycle:

  • only differentiate if a system is installed or not - don't rely on exact history to determine which script was ran (so, if you run install on a system which is installed, it'll fail, same for uninstall)
  • don't fetch new system version automatically - instead require user to quill upgrade it explicitely
  • when system is upgraded (not updated - update is a lifecycle script, not lifecycle action), uninstall on the old version is ran and install is ran on a new one (those could be different scripts too, e.g. pre-update and post-update).
  • configure, update or start call install implicitely, if the system isn't installed.

I feel like this is more intuitive.

/cc @indexzero @jcrugzz

@jcrugzz
Copy link
Member

jcrugzz commented Aug 10, 2013

I agree the current lifecycle management is broken. Let me respond to each of these points individually.

  1. Yea the exact history does not seem necessary.
  2. I can see upgrade and update possiblt being confusing. npm install has the same behavior of quill install except its usually referencing the package.json rather than installing the newest. The distinction to force the uninstall on upgrade may be worth it though.
  3. Totally agree with the last piece, install should be a basis for all those lifescycle events.

@mmalecki
Copy link
Contributor Author

Right, naming of upgrade and update is a problem. Let's break this up for multiple package managers:

  • yum, npm - upgrade and update mean all the same
  • pkgin, apt-get, brew - update means "update all the new metadata", upgrade means "upgrade actual software"

This makes me think that we could actually use update for the system update and upgrade for software update (as the lifecycle script). Thoughts?

@yawnt
Copy link

yawnt commented Aug 10, 2013

i've always hated this differentiation
.. something like sync for meta and up(grade|date) sounds better imho

@jcrugzz
Copy link
Member

jcrugzz commented Aug 10, 2013

@mmalecki also by removing this history portion we will be able to add a stop lifecycle event as well correct?

@mmalecki
Copy link
Contributor Author

@jcrugzz lifecycle script, but yes.

@indexzero
Copy link
Contributor

@mmalecki lgtm. Make sure all the tests pass and hopefully add more test coverage

@jcrugzz
Copy link
Member

jcrugzz commented Sep 12, 2013

so i think we should keep update and have that one automatically install new version. It would be more consistent with what we expect currently, but we do need a new word. I don't HATE sync, but I think there might be something better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants