Skip to content

Generate a payload for deleted match event goals#1860

Open
vlbee wants to merge 2 commits into
mainfrom
var/test-deleted-flag
Open

Generate a payload for deleted match event goals#1860
vlbee wants to merge 2 commits into
mainfrom
var/test-deleted-flag

Conversation

@vlbee

@vlbee vlbee commented Jul 22, 2026

Copy link
Copy Markdown
Member

PA has indicated they may be able to add a deleted=true attribute flag to reversed goals on the /match/events endpoint we use. More info here: guardian/pa-football-client#123

What does this change?

This PR tests the Preview release of the pa-football-client library.

  • It uses the deleted flag to disregard deleted goals when calculating goals for a paylaod
  • It used the deleted flag to generate dervidedId for the payload UUID - this ensures that when the deleted flag changes, the same triggering event will have a unique UUID and NOT be filtered out by the event filter so we can send a follow up payload for a deleted event.
  • Parity with push notifications builder - we send "No Goal!", "Red card overturned", or "Penalty overturned" message on iOS when a deleted event payload is created.

TODO before release

  • Update the pa-football-client library

How has this change been tested?

TODO

  • code testing
  • e2e inegration test.

On unit tests, we can see the payload with unique UUID generated for a deleted=true goal at '37.

Live Activities

Left: deleted=false Right: deleted=true
image

Push Notifications

Left: deleted=false Right: deleted=true
image

How can we measure success?

Have we considered potential risks?

Images

Accessibility

@vlbee
vlbee force-pushed the var/test-deleted-flag branch from dcfc3e3 to b17b194 Compare July 22, 2026 12:37
@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

@github-actions

Copy link
Copy Markdown
Contributor

topic = topics,
matchStatus = status,
eventId = UUID.nameUUIDFromBytes(triggeringEvent.eventId.getBytes).toString,
eventId = s"${triggeringEvent.eventId}/${triggeringEvent.isDeleted}", // used to derive the uuid in the payload trait

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The payload UUID is derived from the trait Payload derivedId def here, so I don't think it's necessary to make a UUID from the event ID (which is either the PA eventID, or a UUID we already create once for synthetic events.)

Comment thread build.sbt
val catsVersion: String = "2.13.0"
val okHttpVersion: String = "4.12.0"
val paClientVersion: String = "7.0.12"
val paClientVersion: String = "7.0.18-PREVIEW.parse-deleted-event.2026-07-21T1518.accf3da8"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the proper release before merging.

@vlbee
vlbee marked this pull request as ready for review July 22, 2026 20:13
@vlbee
vlbee requested a review from a team as a code owner July 22, 2026 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant