Storing schema is rejected despite no changes being made since last fetch
If I create and store a Synapse Table, then call the table.schema.addColumn method on the object returned by syn.store and attempt to store the newly updated schema, I see an exception that the schema has been updated since I last fetched it.
Here is code to reproduce the exception:
and here is the full exception:
python 3.6.7 and 3.7.3
reports that she fixed a similar issue with FileEntity. The fix might apply here as well, we have to check.
Ok, great! That indicates that syn.store() doesn’t return the object with the correct etag. I have seen this problem happened in other entity types, and has fixed File Entity specifically. To fix this problem for other entity type, it requires me to refactor syn.store() and make sure that it has deterministic behavior. I’m tagging this issue with syn.store label as working on syn.store would fix this problem.
Yes, refetching the schema with syn.get will avoid the exception.
Btw, I really appreciate the detailed ticket with minimal reproducible example!
, thank you so much for reporting this issue. I saw it in a more complicated setup and haven’t got a chance to dig into it yet. While you already have the minimal written test, may I ask you to try 1 more test for me? Can you replace:
to see if the problem persist.
I’m trying to determine the priority of this ticket. If the code only fail in the your example, and not in the one I suggested, then there is a work around. Otherwise, I think addColumn then store is broken and this ticket would have a higher priority.