stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Akila Ravihansa Perera <>
Subject Improvements to Python cartridge agent artifact distribution
Date Thu, 17 Sep 2015 19:01:02 GMT

There were few issues in PCA related to artifact distribution;
 - If an artifact is deleted PCA fails to push the delete commit to remote
repo because checkout job gets executed first causing deleted file to
bepulled again
 - When cloning the Git repo, PCA will delete the whole directory in
repository.path causing potential data losses. It could affect the
application process running in the cartridge instance since some required
files may get removed at the server startup

Few improvements were made to resolve these issues.
 - Now PCA will run the commit job first. If the Git clone has not been
done it will skip in that iteration.
 - When Git checkout job is running, if there are any modifications in the
working directory, checkout job will be skipped, allowing commit job to
push those changes to remote repo first. Earlier when running the checkout
job PCA will do a "git reset --hard" causing all modifications to vanish
thus leading to potential data losses.
 - When commit job is running it will stage all untracked files and commit
the changes and do a "git pull --rebase" before pushing to remote repo.
This will resolve any possible conflicts with the remote repo to a certain
 - PCA will now clone the remote repo to a temporary location first instead
of directly cloning at repository path. After clone is complete it will
move all the files to repository path overwriting any existing files. The
priority will be given to remote repo. This will avoid any potential
problems that could arise because of missing artifacts when starting up the
application process.

Also I've written an integration test to PCA to cover these scenarios. It
will assert whether a file gets removed from the remote repo when it is
deleted locally.

JIRAs can be found at [1] and [2]. Please try it out and let me know your



Akila Ravihansa Perera
WSO2 Inc.;


View raw message