-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Core] reduce port system load #1318
base: main
Are you sure you want to change the base?
Conversation
return { | ||
"combinator": "and", | ||
"rules": [ | ||
{ | ||
"combinator": "or", | ||
"rules": [ | ||
{ | ||
"property": "$identifier", | ||
"operator": "=", | ||
"value": entity.identifier, | ||
} | ||
for entity in entities | ||
] | ||
} | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the first layer is redundant as eventually we are constructing a query for finding the entity identifiers therefor only the or
part is of interest for us.
return { | |
"combinator": "and", | |
"rules": [ | |
{ | |
"combinator": "or", | |
"rules": [ | |
{ | |
"property": "$identifier", | |
"operator": "=", | |
"value": entity.identifier, | |
} | |
for entity in entities | |
] | |
} | |
] | |
} | |
return | |
{ | |
"combinator": "or", | |
"rules": [ | |
{ | |
"property": "$identifier", | |
"operator": "=", | |
"value": entity.identifier, | |
} | |
for entity in entities | |
] | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we add on this query after , in the search_entities function, so you have that the first layer will be 'and' layer
… , the entire batch will have
…he search api because we wont find the entities
Description
What - reduce the amount of upserts we send to port api
Why - many of the upserts does not contain an actual change, reduce load from port api
How - check if the entity from the third party has a change from the entity in port, and only if there is an actual change, upsert the entity
Type of change
Please leave one option from the following and delete the rest:
All tests should be run against the port production environment(using a testing org).
Core testing checklist