Save commitCount when response says to #232
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Explanation of change
In the related issue, we are logging differences between the report title that is calculated according to the custom formula by Auth and by Web Expensify. I am pretty sure that this is happening because Web Expensify is using stale report data when it computes the title and Auth is using up-to-date data. In order to be able to ignore these logs, we are going to include the commit count when the report was loaded and the commit count that Auth used when computing the title. With that information, we can easily see when the title would have been computed correctly if not for the fact that it is using stale data.
Currently Bedrock-PHP only saves the commitCount for write commands, but in order to keep track of the commitCount when reports are loaded, it needs to be saved for all report load requests. Therefore, let's add a flag that can be set in an Auth response to explicitly tell BedrockPHP to save the commit count.
Related Issues
https://github.com/Expensify/Expensify/issues/540370
Tests
This PR will be tested along with the Web-E PR. Please see the tests there.