Skip to content

ENT-14702: Reuse watcher state between policy reload - #6376

Merged
larsewi merged 2 commits into
cfengine:masterfrom
victormlg:cf-reactor.ReusePolicyState
Oct 13, 2026
Merged

larsewi merged 2 commits into
cfengine:masterfrom
victormlg:cf-reactor.ReusePolicyState

Conversation

@victormlg

Copy link
Copy Markdown
Contributor

Between each policy reload, the watcher state is discarded, however, if the promise is identitical, we would like to be able to detect the changes that happened during the reload. Thus, we need to pass the watcher states.

@victormlg victormlg changed the title Reuse watcher state between policy reload ENT-14702: Reuse watcher state between policy reload Oct 5, 2026
@victormlg
victormlg force-pushed the cf-reactor.ReusePolicyState branch from a982c7d to a63277f Compare October 5, 2026 11:43
Comment thread cf-agent/agent_operations.c Fixed
@victormlg
victormlg marked this pull request as draft October 5, 2026 12:07
@victormlg
victormlg force-pushed the cf-reactor.ReusePolicyState branch from a63277f to 4d3df52 Compare October 8, 2026 09:12
@victormlg
victormlg marked this pull request as ready for review October 8, 2026 09:14
Comment thread cf-reactor/watcher.c Outdated
Comment thread cf-reactor/watcher.h Outdated
@victormlg
victormlg force-pushed the cf-reactor.ReusePolicyState branch 2 times, most recently from 292b20d to 32f2782 Compare October 9, 2026 12:55
@victormlg

Copy link
Copy Markdown
Contributor Author

@cf-bottom jenkins, please :)

@cf-bottom

Copy link
Copy Markdown

Instead of destroying all watchers, it now keeps the state, such that, even if an event
happens during policy reload, it will get detected by comparing the previous state.

Ticket: ENT-14702
Signed-off-by: Victor Moene <victor.moene@northern.tech>
Signed-off-by: Victor Moene <victor.moene@northern.tech>
@victormlg
victormlg force-pushed the cf-reactor.ReusePolicyState branch from 32f2782 to e10206a Compare October 12, 2026 10:05
@victormlg
victormlg requested a review from larsewi October 12, 2026 10:40
@victormlg

Copy link
Copy Markdown
Contributor Author

@cf-bottom jenkins, please :)

@cf-bottom

Copy link
Copy Markdown

@larsewi
larsewi merged commit 1cf917e into cfengine:master Oct 13, 2026
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants