Skip to content

Conversation

@ro-tex
Copy link
Contributor

@ro-tex ro-tex commented Aug 6, 2025

This PR decouples making observations on individual streams and populating them into the cache from the Observe action. The individual stream observations happen on a background thread, in a loop. This keeps the internal cache warm all the time and as a result of that, the Observe action always uses cached values and completes without waiting for any external calls.

Requires

Supports

@brunotm brunotm added the build-publish Build and Publish image to SDLC label Aug 12, 2025
@brunotm brunotm force-pushed the ivo/observation_loop branch from 408b825 to df9adbe Compare August 15, 2025 16:14
jmank88
jmank88 previously approved these changes Aug 21, 2025
@cl-sonarqube-production
Copy link

@ro-tex ro-tex requested review from brunotm and justinfranco August 22, 2025 08:29
@ro-tex ro-tex added this pull request to the merge queue Aug 22, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 22, 2025
@ro-tex ro-tex added this pull request to the merge queue Aug 22, 2025
Merged via the queue into develop with commit 9d6bd73 Aug 22, 2025
197 of 209 checks passed
@ro-tex ro-tex deleted the ivo/observation_loop branch August 22, 2025 17:23
krehermann added a commit that referenced this pull request Aug 22, 2025
krehermann added a commit that referenced this pull request Aug 22, 2025
github-merge-queue bot pushed a commit that referenced this pull request Aug 22, 2025
akuzni2 added a commit that referenced this pull request Aug 22, 2025
ro-tex added a commit that referenced this pull request Aug 25, 2025
brunotm pushed a commit that referenced this pull request Aug 25, 2025
* Remove seqNr eviction policy from the observation cache.

* Perform observations in a loop.

* Adjust tests to endlessly looping observations.

* Minor adjustments.

* Lint

* Fix data race

* Rollback changes and try a simpler approach - Observe() only uses the cache and starts the background loop.

* Remove the concurrency from Observe().

* Fix the tests.

* Lint

* We don't need that defere, that was the whole point of moving it.

* wip

* Clean up logging. Mock the OutputCodec.

* Address lint issues.

* Fix context lifetime, add closer implementation.

* Pointer receiver.

* concurrency fixes

* add comment for values copy

* bump

* ensure maxObservationDuration is respected, add metrics

* lint fix

* w

* setObservableStreams

* Test race

* Remove the temporary version bump.

* Clean up the close.

* Use a context based on the stop channel.

* lint

---------

Co-authored-by: Bruno Moura <brunotm@gmail.com>

llo/observation: ensure close waits for the observation loop to complete
github-merge-queue bot pushed a commit that referenced this pull request Aug 25, 2025
* Reapply "DS-631 Observation loop (#18843)" (#19079)

This reverts commit 81ebe55.

* Wait for the observation loop goroutine to exit.

* lint

* Address comments.
HashWrangler pushed a commit that referenced this pull request Aug 25, 2025
* Reapply "DS-631 Observation loop (#18843)" (#19079)

This reverts commit 81ebe55.

* Wait for the observation loop goroutine to exit.

* lint

* Address comments.
JoshC2k added a commit that referenced this pull request Sep 3, 2025
ro-tex added a commit that referenced this pull request Sep 4, 2025
ro-tex added a commit that referenced this pull request Sep 4, 2025
ro-tex added a commit that referenced this pull request Sep 4, 2025
github-merge-queue bot pushed a commit that referenced this pull request Sep 4, 2025
* Revert "Handle nil opts, no observable streams or other errors in observation loop (#19105)"

This reverts commit f09f384.

* Revert "Reapply "DS-631 Observation loop (#18843)" (#19079) (#19086)"

This reverts commit 0b1cc20.

* Reapply "DS-631 Observation loop (#18843)" (#19079)

This reverts commit 81ebe55.

* Revert "DS-631 Observation loop (#18843)"

This reverts commit 9d6bd73.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build-publish Build and Publish image to SDLC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants