Duplicate handling during copy from one catalog to another
This issue is intended to centralize discussion around how to handle duplicate entries when using the functionality added by @danielballan in #735 to copy nodes from one catalog to another with tiled.client.sync.copy. The present behavior is that attempting to insert a node with an exactly-matching uuid to the destination catalog returns a HTTP 409 "Conflict". #737 is a basic stub that adds a feature setting to ignore such responses, but there are many (?) cases where performing a more principled sync, i.e, check for differences and do a differential update, always delete destination and overwrite, would be desirable.
Another question if implementing this is whether look-before-you-leap checking would be more performant, since asking the catalog for just node uuids is relatively cheap compared to accessing full metadata.
I imagine we'll eventually find use cases for ~all of the various rsync options here. I like that the approach in #737 leaves room for the API to grow.
Some things to consider and spin out into separate issues:
- a CLI like
tiled copy ... - a progress bar for the CLI and (maybe? optionally?) for the Python API
- batch upload via new endpoint
/nodes/metadata/that accepts a list of nodes - how look-before-you-leap and partial update would interact with batch