VAR reversals: add football match diffing to generate a synth state change event#1857
Draft
vlbee wants to merge 7 commits into
Draft
VAR reversals: add football match diffing to generate a synth state change event#1857vlbee wants to merge 7 commits into
vlbee wants to merge 7 commits into
Conversation
* add test coverage for FootballData.processMatch * improve test coverage for MatchStatusLiveActivityPayloadBuilder
vlbee
commented
Jul 16, 2026
| .isMatchStateIdentical(matchDay.id, footballMatchState) | ||
| .recover { case NonFatal(exception) => | ||
| logger.error(s"Error checking for for identical football match state ${matchDay.id}: ${exception.getMessage}") | ||
| true // assume identical // todo confirm this behaviour is desired. |
Member
Author
There was a problem hiding this comment.
Is this what should happen?
Contributor
vlbee
commented
Jul 17, 2026
| val payloadBuilder = new MatchStatusLiveActivityPayloadBuilder() | ||
| val toFootballEvent = FootballMatchEvent.fromPaMatchEvent(matchDay.homeTeam, matchDay.awayTeam) _ | ||
|
|
||
| if (events.isEmpty) Future.successful(true) // no stage change before a match has started. |
Member
Author
There was a problem hiding this comment.
verify this behaviour withing 2-hr create channel window
vlbee
commented
Jul 17, 2026
| .flatMap(row => footballStateFromPayload(row.payload)) | ||
| .forall(latest => ignoringArticleUrl(latest, state)) | ||
|
|
||
| // articleUrl is only added to the payload after isMatchStateIdentical is called, so we must ignore it. |
Member
Author
There was a problem hiding this comment.
Is it safer to compare a checksum?
This was referenced Jul 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Do not merge until after GSI is created by merging #1856
What does this change?
This PR adds football match state diffing at the point the football Lambda fetches PA data. If a state change is detected, a synthetic
state-changeevent is generated. We filter out those events from being processed by the twoEventConsumerclasses, so it should be safe to release this PR. There will be a subsequent PR to process and dedupe state change events in the event consumers.Draft.
How has this change been tested?
How can we measure success?
Have we considered potential risks?
Images
Accessibility