[
https://issues.apache.org/jira/browse/IVY-492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495655
]
Xavier Hanin commented on IVY-492:
----------------------------------
Thanks for sharing your experience, and we are looking forward to seeing your
patch!
About the missing artifacts, the problem is that the publish task allow to
avoid halting on missing files. So changing the method contract is not a
problem, I indeed prefer using a specific exception, but we will still have to
be able to deal with it in a backward compatible way from the IvyPublishTask
point of view.
Then we have to answer another question: do we have to rollback the transaction
when there are missing files. IMO it depends, when someone set haltonmissing to
false on the publish task, I would like to commit the transaction, otherwise I
would like to rollback. So maybe we could add a rollbackOnMissing attribute to
the PublishOptions (defaulting to true) to be able to configure what need to be
done before throwing the exception.
> support atomic publish operation
> --------------------------------
>
> Key: IVY-492
> URL: https://issues.apache.org/jira/browse/IVY-492
> Project: Ivy
> Issue Type: New Feature
> Components: Core
> Reporter: Geoff Reedy
>
> Some resolver types (e.g. one that uses subversion) could benefit from
> publishing a module as a single atomic transaction. Currently, each artifact
> (and it's checksums) are published as separate operations, if one of the
> artifact uploads fail (perhaps an artifact is missing or another user is
> trying to publish the same version at the same time) the ivy repository can
> be in an inconsistent state with a half published module. In addition, if
> uploads are logged many entries in the log are generated for a single logical
> operation.
> A possible implementation strategy is to add three new methods to the
> resolver interface:
> beginPublish(ModuleRevisionId)
> abortPublish()
> commitPublish()
> beginPublish would be called before publishing the artifacts of the module,
> abortPublish would be called if there is an error while publishing the
> module, commitPublish would be called if all artifacts were successfully
> published. Existing resolvers could simple implement these methods as no-ops
> to retain the present behavior.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.