Skip to content

[APIPUB-113] - Add option --processDeletesAndKeyChangesOnFullPublish#137

Open
ea-mtenhoor wants to merge 1 commit into
Ed-Fi-Alliance-OSS:mainfrom
edanalytics:feature/processDeletesAndKeyChangesOnFullPublish
Open

[APIPUB-113] - Add option --processDeletesAndKeyChangesOnFullPublish#137
ea-mtenhoor wants to merge 1 commit into
Ed-Fi-Alliance-OSS:mainfrom
edanalytics:feature/processDeletesAndKeyChangesOnFullPublish

Conversation

@ea-mtenhoor

Copy link
Copy Markdown
Contributor

This PR adds a new option to the API Publisher allowing for deletes and key changes to be processed even when publishing from change version 1. The original code attempts to optimize the first publish by skipping these steps. This works under the assumption that the target ODS is empty when publishing from change version 1, and thus there would be no keys to change and no records to delete.

However, this assumption is wrong quite often in the field. For example, if the first full publish fails for any reason, the data in the target ODS remains and the API Publisher does not store a value for lastChangeVersionsProcessed. Then, as source systems like a SIS continue to make updates to the source ODS, it's possible (and increasingly likely over time) that data will be deleted or have its keys changed. When the second (or any subsequent) full publish happens there are now deletes and/or keyChanges that need to be processed, but the API Publisher continues to skip these steps under the assumption that the target ODS is empty, because it is starting from change version 1.

The code in this PR defaults to the original behavior to ensure that this is a non-breaking change. However, it is our intention to enable this option everywhere we use API Publisher. It might be worth considering changing the default.

This code has been tested and is in use in Education Analytics production systems.

@stevenarnold-ed-fi stevenarnold-ed-fi changed the title Add option --processDeletesAndKeyChangesOnFullPublish [APIPUB-113] - Add option --processDeletesAndKeyChangesOnFullPublish Mar 20, 2026
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