Reputation: 1955
When redeploying an application on service fabric (using Publish-UpgradedServiceFabricApplication
), why do I always see the files from previous deployment ? Some file of my application seems not deleted properly or cached somewhere.
For example
APPversionA
includes fileA
APPversionB
includes fileB
Result in target _VM "SF/_App" data directory:
APPversionA
: I got AppXX/MyService/Code/fileA
: OKAPPversionB
that replace APPversionA
:
AppYY/MyService/Code/fileA
AppYY/MyService/Code/fileB
Upvotes: 1
Views: 206
Reputation: 1955
Inside ApplicationManifest.xml
of my application I had "1.8-SNAPSHOT" as ApplicationTypeVersion
attribute value.
So I encounter the issue when updating and redeploying this SNAPSHOT version multiples times.
Seems like in this usecase - as ApplicationTypeVersion
is unchanged - SF overrides or append the deployment bundle content of the previous deployment instead of recreating a new one from scratch (for me it's an issue).
To fix it, I add build timestamp to ApplicationTypeVersion
value (ex. 1.8-SNAPSHOT-20160128_1113
) . This case, there is no more ServiceFabric cache effect. The version and deployment content is updated for each deployment.
Upvotes: 1