Re: "application_version" is changed although source code is not changed.


Gerhard
 

I have only ever needed the app version when counting requests served by a
specific app build. It's not a common use case and it was easy to work
around, so it wasn't really an issue. I was not expecting this behaviour
from the application_version value, but it makes sense now.

Cheers, Gerhard.

On Friday, 16 October 2015, Matthew Sykes <matthew.sykes(a)gmail.com> wrote:

The application version really represents the versioned metadata for the
application. It changes regularly. [1] The only guarantee for version is
that it will change if the app restarts (could be due to package changes or
explicit operation), the health check changes, or the memory changes.

The droplet hash is not an appropriate representation of "application"
version since it doesn't take enough into account. It is something that
could be added to VCAP_APPLICATION but I think people would want to
understand why it's needed there.

Out of curiosity, are people acting on the application version in a way
that breaks things if it changes when the app bits or droplet did not? If
so, how?

Thanks.

[1]:
https://github.com/cloudfoundry/cloud_controller_ng/blob/master/app/models/runtime/app.rb#L164-L178

On Fri, Oct 16, 2015 at 3:15 AM, Gerhard Lazu <gerhard(a)cloudcredo.com
<javascript:_e(%7B%7D,'cvml','gerhard(a)cloudcredo.com');>> wrote:

I was also assuming that app version would not change between app
restarts (when the same droplet is used). I was wrong.

Would it make more sense if the app version was the droplet shasum?

On Thursday, 15 October 2015, CF Runtime <cfruntime(a)gmail.com
<javascript:_e(%7B%7D,'cvml','cfruntime(a)gmail.com');>> wrote:

application_version is mostly an internal cloud foundry concern. The
DEAs broadcast the application version they are running, and the health
manager uses that with what version it expects to be running to converge
the system on the desired state.

Restarting the app is supposed to terminate the old instances and start
the new ones, so they new ones get a new application version so they are
separate from the old.

Joseph
CF Release Integration Team

On Thu, Oct 15, 2015 at 2:00 AM, Hiroaki Ukaji <dt3snow.w(a)gmail.com>
wrote:

Hi.
I have a question about a json field "application_version" in an
environment
variable "VCAP_APPLICATION".

By intuition, "application_version" should be only changed when there is
some update for an application.
Actually, when an application is terminated for some reasons and
restarted
automatically, "application_version" remain unchanged.

As far as I see it, however, "application_version" is changed when I "cf
restart" my application i.e. CCNG should use the same droplet so there
are
no differences from the one before deployment.

If it is possible, could someone please tell me the intention about this
implementation?


Thanks.

Hiroaki UKAJI



--
View this message in context:
http://cf-dev.70369.x6.nabble.com/cf-dev-application-version-is-changed-although-source-code-is-not-changed-tp2262.html
Sent from the CF Dev mailing list archive at Nabble.com.

--
Matthew Sykes
matthew.sykes(a)gmail.com
<javascript:_e(%7B%7D,'cvml','matthew.sykes(a)gmail.com');>

Join cf-dev@lists.cloudfoundry.org to automatically receive all group messages.