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

Add command to upgrade all packages #4

Open
bfirsh opened this issue Jan 27, 2017 · 6 comments
Open

Add command to upgrade all packages #4

bfirsh opened this issue Jan 27, 2017 · 6 comments
Projects

Comments

@bfirsh
Copy link
Member

bfirsh commented Jan 27, 2017

Iterate through all the packages and run docker pull on them:

$ whalebrew upgrade

Ref #3

@bfirsh bfirsh added this to Backlog in Kanban Jan 30, 2017
@nithin-bose
Copy link
Contributor

Could there be a better way than to docker pull all installed images in a loop??

@nithin-bose
Copy link
Contributor

Updates might require the package file to be regenerated. You know if the labels have changed or something?
Thoughts??

@bfirsh
Copy link
Member Author

bfirsh commented Mar 15, 2017

@nithin-bose Yeah, that's an issue. Particularly if the user has edited the package file.

Perhaps the package file could be blank by default (except for image), then all the options could be figured out at runtime by inspecting the image. Then, the package file is only user-editable stuff.

@nithin-bose
Copy link
Contributor

nithin-bose commented Mar 20, 2017

Hmm that makes sense but would that add a significant delay to command execution??

Also existing users might never get the updated label values in the image, unless they reinstall the app.

@bfirsh
Copy link
Member Author

bfirsh commented Mar 26, 2017

An image inspect is extremely fast. (On the order of 10ms with Docker for Mac IIRC, but we could benchmark it.)

Backwards compatibility is certainly an issue. Perhaps Whalebrew could remove labels which match the value in the image to convert them to this new format. To make it a one-off, we could add a version: 1 key, then that'd give us an opportunity to make changes like this in the future.

@nithin-bose
Copy link
Contributor

How about we use image inspect as default values?? That is when a command is run the following steps happen:

  1. Read the package file to get the image name (only mandatory field in the pkg file)
  2. Inspect the image to get labels set
  3. Override the values taken from image with that defined in the package file. If something is not defined in the pkg file, the value from image inspect would be used. This way, a user would be able to override any value by editing the pkg file and yet any new labels introduced in a later version of the image would still be applied
  4. Run the container with the values after step 3

If we use the the above method, we should be able to support current installs as well without a version number. The only corner case for existing installs is if the value of a label has changed or if a label has been removed in a newer version, in which case the user will have to reinstall the app.

Even with a version number, its not trivial to update the version of a pkg file of an installed app and is probably easier to just reinstall the app.

Thoughts??

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

No branches or pull requests

2 participants