mikelangelo-project / capstan

Capstan, a tool for packaging and running your application on OSv.
http://osv.io/capstan/
Other
19 stars 7 forks source link

Implement `capstan package update` command #84

Closed miha-plesko closed 6 years ago

miha-plesko commented 6 years ago

With this command user is now able to update all her local packages with those on the S3 repository. Usage is following:

$ capstan package update -v
[01/28] apache.spark-2.1.1                                ... already latest
[02/28] erlang-7.0                                        ... already latest
[03/28] mysql-5.6.21                                      ... already latest
[04/28] node-4.4.5                                        ... already latest
[05/28] node-4.8.2                                        ... already latest
[06/28] node-6.10.2                                       ... already latest
[07/28] ompi-1.10                                         ... already latest
[08/28] openfoam.core-2.4.0                               ... already latest
[09/28] openfoam.pimplefoam-2.4.0                         ... already latest
[10/28] openfoam.pisofoam-2.4.0                           ... already latest
[11/28] openfoam.poroussimplefoam-2.4.0                   ... already latest
[12/28] openfoam.potentialfoam-2.4.0                      ... already latest
[13/28] openfoam.rhoporoussimplefoam-2.4.0                ... already latest
[14/28] openfoam.rhosimplefoam-2.4.0                      ... already latest
[15/28] openfoam.simplefoam-2.4.0                         ... already latest
[16/28] openjdk7                                          ... already latest
[17/28] openjdk8-zulu-compact1                            ... already latest
[18/28] openjdk8-zulu-compact3-with-java-beans            ... already latest
[19/28] osv.bootstrap                                     ... already latest
[20/28] osv.cli                                           ... already latest
[21/28] osv.cloud-init                                    ... already latest
[22/28] osv.compose-remote-base                           ... package does not exist in remote repository
[23/28] osv.compose-remote                                ... package does not exist in remote repository
[24/28] osv.httpserver-api                                ... already latest
[25/28] osv.httpserver-html5-gui                          ... already latest
[26/28] osv.nfs                                           ... already latest
[27/28] python-2.7                                        ... already latest
[28/28] sample-0.1                                        ... updating 0.0 -> 0.1
Downloading sample-0.1.yaml...
 179 B / 179 B [===================================================] 100.00% 0s
Downloading sample-0.1.mpm...
 735 B / 735 B [===================================================] 100.00% 0s
package successfully updated
Updated 1 packages (out of 28 that were found locally)

Capstan checks if there is higher version on S3 repository for each package in user's local repository and pulls such packages. By default all local packages are updated, but "search" argument can be passed to update only packages with specific name. Also, by default only package version is compared to that of S3, but also Create field can be used by setting --created flag:

$ capstan package update spark --created

The command above will update any package containing "spark" in its name if a more recent version is found (i.e. with higher version or more recent Created time).

Fixes https://github.com/mikelangelo-project/capstan/issues/47

miha-plesko commented 6 years ago

Merge conflict resolved, hoping for green.

miha-plesko commented 6 years ago

Strange error, I kicked Travis again to see if she just got confused somehow...

miha-plesko commented 6 years ago

Kicked again. Only go: tip is failing and there are two dozens of commits on go master since last run, hopefully the issue is resolved.

miha-plesko commented 6 years ago

@gberginc green. After another kick, Travis returned much better message on the tip container telling us that we had fmt.Errorf() with more arguments than format expects. In fact, Capstan didn't even want to compile anymore for that reason - seems like Go master branch had a bad day, but eventually recovered 😄

miha-plesko commented 6 years ago

@gberginc can we merge this one, then we release?