Thank you, Yoav.

The changes involve move and rename, but I would like a roll back possibility in case some error occurs, to avoid leaving data in an inconsistent state. I think we'll have to add a layer which implements some crude transaction handling.

BR
Gunnar

On 11/01/13 21:32, Yoav Landman wrote:
Hi Gunnar,

User plugin REST executions currently do not run under a single transaction entry point (tough individual actions on the "repositories" object and other objects in a plugin script are transactional). We might add transactional control to plugins in the future. For now, you'd need to handle transaction semantics in the script; for example, by making changes in a side repo/folder and persisting them into the final target upon success (using move or copy) or discarding the changes in case of a failure. If you only change the name and not the content of promoted artifacts moving/copying should be a lightweight process due to storage de-duplication.

HTH,
Yoav


On Fri, Nov 1, 2013 at 12:25 PM, Gunnar Strand <[email protected] <mailto:[email protected]>> wrote:

    Hi,

    I am working on a build promotion script which will need to rename
    some
    artifacts during build promotion. I would like to be able to roll back
    any changes during the process if an error is encountered, e.g.
    the new
    name already exists. This would have been quite simple if there
    was some
    kind of transaction handling possibility in the REST API, e.g
    sending a
    batch job.

    I cannot find any transaction handling support in the REST API. I
    assume
    that it is not supported?

    Does anyone know if there is transaction support if I were able to
    implement the promotion as a User Plugin?

    BR
    Gunnar

    
------------------------------------------------------------------------------
    Android is increasing in popularity, but the open development
    platform that
    developers love is also attractive to malware creators. Download
    this white
    paper to learn more about secure code signing practices that can
    help keep
    Android apps secure.
    http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
    _______________________________________________
    Artifactory-users mailing list
    [email protected]
    <mailto:[email protected]>
    https://lists.sourceforge.net/lists/listinfo/artifactory-users




------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk


_______________________________________________
Artifactory-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/artifactory-users

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Artifactory-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/artifactory-users

Reply via email to