[Core] Add retry for failed upserts and handle circular dependencies #6548
Triggered via pull request
December 23, 2024 14:53
ivankalinovski
synchronize
#1241
Status
Success
Total duration
14s
Artifacts
–
pr-labeler.yml
on: pull_request_target
triage
4s
size-label
2s
Annotations
3 errors and 2 warnings
test_sync_raw.test_sync_raw_mixin_dependency:
port_ocean/tests/core/handlers/mixins/test_sync_raw.py#L379
AssertionError: Expected one failed entity callback due to retry logic
assert 7 == 5
+ where 7 = len([Entity(identifier='entity_1', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_2'}), Entity(identifier='entity_2', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_1'}), Entity(identifier='entity_1', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_3'}), Entity(identifier='entity_2', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_4'}), Entity(identifier='entity_3', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': ''}), Entity(identifier='entity_4', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_3'}), ...])
+ where [Entity(identifier='entity_1', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_2'}), Entity(identifier='entity_2', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_1'}), Entity(identifier='entity_1', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_3'}), Entity(identifier='entity_2', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_4'}), Entity(identifier='entity_3', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': ''}), Entity(identifier='entity_4', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_3'}), ...] = EntityTopologicalSorter(entities=[Entity(identifier='entity_1', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_2'}), Entity(identifier='entity_2', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_1'}), Entity(identifier='entity_1', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_3'}), Entity(identifier='entity_2', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_4'}), Entity(identifier='entity_3', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': ''}), Entity(identifier='entity_4', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_3'}), Entity(identifier='entity_5', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_1'})]).entities
+ where EntityTopologicalSorter(entities=[Entity(identifier='entity_1', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_2'}), Entity(identifier='entity_2', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_1'}), Entity(identifier='entity_1', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_3'}), Entity(identifier='entity_2', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_4'}), Entity(identifier='entity_3', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': ''}), Entity(identifier='entity_4', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_3'}), Entity(identifier='entity_5', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_1'})]) = EventContext(event_type='resync', trigger_type='machine', attributes={}, _aborted=False, _port_app_config=PortAppConfig(enable_merge_entity=True, delete_dependent_entities=True, create_missing_related_entities=False, resources=[ResourceConfig(kind='project', selector=Selector(query='true'), port=PortResourceConfig(entity=MappingsConfig(mappings=EntityMapping(identifier='.id | tostring', title='.name', blueprint='"service"', team=None, properties={'url': '.web_url'}, relations={})), items_to_parse=None))]), _parent_event=None, _event_id='287d9fe9-bd88-4abf-886e-46cc8985231a', _on_abort_callbacks=[<function SyncRawMixin.sync_raw_all.<locals>.<lambda> at 0x7f9a0867b240>]).entity_topological_sorter
|
test_sync_raw.test_sync_raw_mixin_dependency:
port_ocean/tests/core/handlers/mixins/test_sync_raw.py#L379
AssertionError: Expected one failed entity callback due to retry logic
assert 7 == 5
+ where 7 = len([Entity(identifier='entity_1', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_2'}), Entity(identifier='entity_2', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_1'}), Entity(identifier='entity_1', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_3'}), Entity(identifier='entity_2', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_4'}), Entity(identifier='entity_3', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': ''}), Entity(identifier='entity_4', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_3'}), ...])
+ where [Entity(identifier='entity_1', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_2'}), Entity(identifier='entity_2', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_1'}), Entity(identifier='entity_1', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_3'}), Entity(identifier='entity_2', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_4'}), Entity(identifier='entity_3', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': ''}), Entity(identifier='entity_4', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_3'}), ...] = EntityTopologicalSorter(entities=[Entity(identifier='entity_1', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_2'}), Entity(identifier='entity_2', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_1'}), Entity(identifier='entity_1', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_3'}), Entity(identifier='entity_2', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_4'}), Entity(identifier='entity_3', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': ''}), Entity(identifier='entity_4', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_3'}), Entity(identifier='entity_5', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_1'})]).entities
+ where EntityTopologicalSorter(entities=[Entity(identifier='entity_1', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_2'}), Entity(identifier='entity_2', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_1'}), Entity(identifier='entity_1', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_3'}), Entity(identifier='entity_2', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_4'}), Entity(identifier='entity_3', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': ''}), Entity(identifier='entity_4', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_3'}), Entity(identifier='entity_5', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_1'})]) = EventContext(event_type='resync', trigger_type='machine', attributes={}, _aborted=False, _port_app_config=PortAppConfig(enable_merge_entity=True, delete_dependent_entities=True, create_missing_related_entities=False, resources=[ResourceConfig(kind='project', selector=Selector(query='true'), port=PortResourceConfig(entity=MappingsConfig(mappings=EntityMapping(identifier='.id | tostring', title='.name', blueprint='"service"', team=None, properties={'url': '.web_url'}, relations={})), items_to_parse=None))]), _parent_event=None, _event_id='81306aad-86ac-4156-b761-334204196e4b', _on_abort_callbacks=[<function SyncRawMixin.sync_raw_all.<locals>.<lambda> at 0x7f16a4bb71a0>]).entity_topological_sorter
|
test_sync_raw.test_sync_raw_mixin_dependency:
port_ocean/tests/core/handlers/mixins/test_sync_raw.py#L379
AssertionError: Expected one failed entity callback due to retry logic
assert 7 == 5
+ where 7 = len([Entity(identifier='entity_1', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_2'}), Entity(identifier='entity_2', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_1'}), Entity(identifier='entity_1', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_3'}), Entity(identifier='entity_2', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_4'}), Entity(identifier='entity_3', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': ''}), Entity(identifier='entity_4', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_3'}), ...])
+ where [Entity(identifier='entity_1', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_2'}), Entity(identifier='entity_2', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_1'}), Entity(identifier='entity_1', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_3'}), Entity(identifier='entity_2', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_4'}), Entity(identifier='entity_3', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': ''}), Entity(identifier='entity_4', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_3'}), ...] = EntityTopologicalSorter(entities=[Entity(identifier='entity_1', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_2'}), Entity(identifier='entity_2', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_1'}), Entity(identifier='entity_1', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_3'}), Entity(identifier='entity_2', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_4'}), Entity(identifier='entity_3', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': ''}), Entity(identifier='entity_4', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_3'}), Entity(identifier='entity_5', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_1'})]).entities
+ where EntityTopologicalSorter(entities=[Entity(identifier='entity_1', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_2'}), Entity(identifier='entity_2', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_1'}), Entity(identifier='entity_1', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_3'}), Entity(identifier='entity_2', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_4'}), Entity(identifier='entity_3', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': ''}), Entity(identifier='entity_4', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_3'}), Entity(identifier='entity_5', blueprint='service', title=None, team=[], properties={'mock_is_to_fail': False}, relations={'service': 'entity_1'})]) = EventContext(event_type='resync', trigger_type='machine', attributes={}, _aborted=False, _port_app_config=PortAppConfig(enable_merge_entity=True, delete_dependent_entities=True, create_missing_related_entities=False, resources=[ResourceConfig(kind='project', selector=Selector(query='true'), port=PortResourceConfig(entity=MappingsConfig(mappings=EntityMapping(identifier='.id | tostring', title='.name', blueprint='"service"', team=None, properties={'url': '.web_url'}, relations={})), items_to_parse=None))]), _parent_event=None, _event_id='89b5a205-a447-4902-8964-0c47388dfd4e', _on_abort_callbacks=[<function SyncRawMixin.sync_raw_all.<locals>.<lambda> at 0x7f58e5433740>]).entity_topological_sorter
|
size-label
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
triage
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|