Open VFRoderick opened 4 months ago
some other weird phenomenon it looks as though updates are getting blended in with adds. when using first getting the latest servergen parameter using the latest values using:
changeTrackingInfo = flc.properties.changeTrackingInfo
last_sync_date, layer_server_gen = changeTrackingInfo.get('lastSyncDate', None), changeTrackingInfo.get('layerServerGens', [])
minserverGen = layer_server_gen[0]['minServerGen']
serverGen = layer_server_gen[0]['serverGen']
print(flc.extract_changes(layers=[0, 1, 2, 3], servergen=[minserverGen,serverGen], layer_servergen=None, return_inserts=True, return_updates=True, return_deletes=True, return_attachments=True, return_geometry_updates=True))
This will show true adds where the 'Name' field wasn't updated, but no updates. Below will show the updates but these will be in the 'adds' array.
print(flc.extract_changes(layers=[0, 1, 2, 3], servergen=[minserverGen,serverGen], layer_servergen=None, return_inserts=True, return_updates=True, return_deletes=False, return_attachments=True, return_geometry_updates=True))
@VFRoderick Are you using ArcgisOnline or Enterprise for this workflow?
@nanaeaubry I'm using AGOL with a standard Notebook. That being said I'm seeing the same issues with connecting to data with our 11.1 Enterprise Portal environments.
Describe the bug A clear and concise description of what the bug is. Extract_Changes should return features of adds, updates, and deletes when the appropriate boolean parameter is set for edit type. If all parameters are set to true should return all. When a single serverGen number is used should return the appropriate edit type for all changes up until that server generation. When using a list range should return changes between server Gens. Adds and updates seem to return properly but updates do not. Tested using various servergen parameters [minServerGen],[serverGen],[minServerGen,serverGen] and the latest layers Server Gens. Furthermore, serverGens were periodically polled to receive the latest after edits were made to test layers.
To Reproduce Steps to reproduce the behavior: Create a new feature layer collection of point and table layers, with sync and change tracking enabled. Add a new string field 'Name' to both. check feature layer collection to make sure extract_changes can be conducted. return latest server gens. Examine Extract_Changes for various parameters, all payloads should be empty since they're are no features in point layer or table. Add features to layers and table. Return latest server gens and extract changes. SHOULD ONLY SEE ADDS Create new features and update previous features. Return latest server gens and extract changes. SHOULD ONLY SEE ADDS AND UPDATES. Finally, delete all features. Return latest server gens and extract changes. SHOULD SEE ADDS, UPDATES, and DELETES.
error:
Screenshots
Expected behavior when updates are applied to layers or tables Extract_changes method is not detecting or returning them.
Platform (please complete the following information):