-
Notifications
You must be signed in to change notification settings - Fork 65
FAI-15182 | CircleCI optimization for tests stream API calls #1928
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
base: main
Are you sure you want to change the base?
Conversation
dbe82e1
to
b33edcd
Compare
@chalenge wdyt? |
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.
Looks fine, see comment
} | ||
} | ||
|
||
getUpdatedState( |
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 no longer need state?
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.
On the connector version using memoize, the memoized values corresponds to the pipelines stream state (the one that was used for making the API calls 1 2). So even if it's needed it wasn't being used.
In theory on a successful sync, this state would end up matching with the one saved on the pipelines stream. The only problem is that if a sync breaks before finishing the tests stream. The state for pipelines stream will be already saved, losing tests records. Not sure how to handle that case. I decided to do this instead of combining the streams, because it seemed faster and easier, but it has this problem (that also happens with the memoized version)
|
Description
Prevent calling the same API calls for
pipelines
andtests
streams (both call pipelines -> workflows -> jobs). Memoization was removed on #1918 to prevent OOM issues. It was thought to not be used, but it was useful after all (memoize by default uses only the first function param as key).This change stores, when the
pipelines
stream runs, just the necessary jobs data to be used later on thetests
stream.Type of change
Related issues
Migration notes
Extra info