Skip to content

Fix ProcessObserver to use DB-assigned updated_at timestamps#4935

Open
philippthun wants to merge 1 commit intocloudfoundry:mainfrom
sap-contributions:fix-process-observer-updated-at-drift
Open

Fix ProcessObserver to use DB-assigned updated_at timestamps#4935
philippthun wants to merge 1 commit intocloudfoundry:mainfrom
sap-contributions:fix-process-observer-updated-at-drift

Conversation

@philippthun
Copy link
Member

Reload the process model before passing it to the runner in ProcessObserver#react_to_state_change and #react_to_instances_change.

Without the reload, the in-memory updated_at value is stale (set before the DB update). ProcessesSync compares this timestamp against the LRP annotation to detect drift, causing unnecessary re-syncs when the values don't match.

  • I have reviewed the contributing guide

  • I have viewed, signed, and submitted the Contributor License Agreement

  • I have made this pull request to the main branch

  • I have run all the unit tests using bundle exec rake

  • I have run CF Acceptance Tests

Reload the process model before passing it to the runner in
ProcessObserver#react_to_state_change and #react_to_instances_change.

Without the reload, the in-memory updated_at value is stale (set before
the DB update). ProcessesSync compares this timestamp against the LRP
annotation to detect drift, causing unnecessary re-syncs when the values
don't match.
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