Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BCF-3052 - Job Based KV Store and juelsFeePerCoin reboot persistence #12392

Merged
merged 22 commits into from
Mar 12, 2024

Conversation

ilija42
Copy link
Contributor

@ilija42 ilija42 commented Mar 12, 2024

  • Add KV store that uses psql and is tied to jobs
  • Use KV store for persisted backup value for inMemoryDataSourceCache (used for juelsFeePerCoin datasource)
  • Improve log severity errors in inMemoryDataSourceCache. Now log ERR severity when there are continuous cache update errors. Also log ERR severity if value failed to get stored in KV store

Copy link
Contributor

I see that you haven't updated any README files. Would it make sense to do so?

@ilija42 ilija42 changed the title Job Based key value store and juelsFeePerCoin reboot persistence BCF-3052 - Job Based key value store and juelsFeePerCoin reboot persistence Mar 12, 2024
@ilija42 ilija42 changed the title BCF-3052 - Job Based key value store and juelsFeePerCoin reboot persistence BCF-3052 - Job Based KV Store and juelsFeePerCoin reboot persistence Mar 12, 2024
@ilija42 ilija42 requested a review from samsondav March 12, 2024 14:26
"chainlink": patch
---

Add kv store tied to jobs and use it for juels fee per coin cache to store persisted values for backup
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we phrase this in a way that node ops will understand? e.g. by referencing the relevant job spec field

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Job spec changes are already refferenced in previous changeset when the cache was added

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do I even need to add changesets that aren't useful for NOPs?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yea, according to the new process every change needs a changeset. Releng will filter out NOP relevant changes to add to the changelog.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We now almost always require changeset because of new CI

samsondav
samsondav previously approved these changes Mar 12, 2024
core/services/job/kv_orm_test.go Show resolved Hide resolved
@ilija42 ilija42 added this pull request to the merge queue Mar 12, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 12, 2024
@ilija42 ilija42 added this pull request to the merge queue Mar 12, 2024
Merged via the queue into develop with commit 8626f1b Mar 12, 2024
97 checks passed
@ilija42 ilija42 deleted the jfpc-caching branch March 12, 2024 17:53
ilija42 added a commit that referenced this pull request Mar 12, 2024
…12392)

* Add kv store migration

* Add kv store implementation

* Init kv store in ocr2 delegate and pass into median service

* Update ds cache to have kv store fallback for final observation value

* Prettify ds cache updateCache, add ERR log severity on consecutive errs

* Add ds cache test for cache value persistence

* Remove unused field in jobKVStore

* Make sonar SQL migration lint happy

* Rename TestJobKVStore

* Add kv store mock

* Add changeset file

* Fix sonar sql lint

* Change kv orm to use raw json message instead of jsonText

* minor change

* minor change

* Fix SQ SQL lint

* Add comments in KVStore

* Rename jobKVStore to kVStore and return struct from constructor

* Update core/store/migrate/migrations/0227_kv_store_table.sql

Co-authored-by: Sam <[email protected]>

* Update kVStore sql to match migration

* Add more kv_orm tests

---------

Co-authored-by: Sam <[email protected]>
ogtownsend pushed a commit that referenced this pull request Mar 14, 2024
…12392)

* Add kv store migration

* Add kv store implementation

* Init kv store in ocr2 delegate and pass into median service

* Update ds cache to have kv store fallback for final observation value

* Prettify ds cache updateCache, add ERR log severity on consecutive errs

* Add ds cache test for cache value persistence

* Remove unused field in jobKVStore

* Make sonar SQL migration lint happy

* Rename TestJobKVStore

* Add kv store mock

* Add changeset file

* Fix sonar sql lint

* Change kv orm to use raw json message instead of jsonText

* minor change

* minor change

* Fix SQ SQL lint

* Add comments in KVStore

* Rename jobKVStore to kVStore and return struct from constructor

* Update core/store/migrate/migrations/0227_kv_store_table.sql

Co-authored-by: Sam <[email protected]>

* Update kVStore sql to match migration

* Add more kv_orm tests

---------

Co-authored-by: Sam <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request Apr 8, 2024
* Add MetricsRegistry to automation  (#12359)

* Pin to metrics registry automation PR

* Add missing go.sum

* Pin to latest automation version

* BCF-3052 - Job Based KV Store and juelsFeePerCoin reboot persistence (#12392)

* Add kv store migration

* Add kv store implementation

* Init kv store in ocr2 delegate and pass into median service

* Update ds cache to have kv store fallback for final observation value

* Prettify ds cache updateCache, add ERR log severity on consecutive errs

* Add ds cache test for cache value persistence

* Remove unused field in jobKVStore

* Make sonar SQL migration lint happy

* Rename TestJobKVStore

* Add kv store mock

* Add changeset file

* Fix sonar sql lint

* Change kv orm to use raw json message instead of jsonText

* minor change

* minor change

* Fix SQ SQL lint

* Add comments in KVStore

* Rename jobKVStore to kVStore and return struct from constructor

* Update core/store/migrate/migrations/0227_kv_store_table.sql

Co-authored-by: Sam <[email protected]>

* Update kVStore sql to match migration

* Add more kv_orm tests

---------

Co-authored-by: Sam <[email protected]>

* Fix in memory data source cache error logging and add err log when cache is over 24h old (#12586)

* Fix in memory data source cache error logging

* Add stale jfcp cache error log and lower other logs to warn

* Update logger warnw to warnf function

Co-authored-by: Jordan Krage <[email protected]>

---------

Co-authored-by: Jordan Krage <[email protected]>

* Handle zkSync "known transaction" error (SHIP-1233) (#12338)

* Handle zkSync "known transaction" error (SHIP-1233)

* add test case for zkSync specific known transaction error

---------

Co-authored-by: Jim W <[email protected]>
Co-authored-by: Prashant Yadav <[email protected]>

* fix: trigger operator-ui-ci with specific tag (#12601)

* fix: trigger operator-ui-ci with specific tag

* fix path

* add checkout step

* update operator-ui tag

* make operator-ui

* update operator-ui-ci tag conditional (#12607)

* update operator-ui-ci tag conditional

* use main branch as default tag

* fix: check for target branch name instead of current for operator-ui-ci (#12618)

* add rebalancer support for feeds manager ocr2 plugins (#12344)

* [Functions] Fix bug in comparing subscriptions (#12379) (#12576)

Co-authored-by: Sneha Agnihotri <[email protected]>

* Add cascade delete to kv store table fk (#12629)

* Add cascade delete to kv store table fk

* Add changeset

(cherry picked from commit 3ec8cc9)

* Fix InMemoryDataSourceCache cleanup (#12647)

* Fix InMemoryDataSourceCache cleanup

* Add changeset

* Make linter happy

* Handle data source cache unit test cleanup

* Use services.StopChan in inMemoryDataSourceCache

* Move ctxWithTimeout into updateCache

Co-authored-by: Jordan Krage <[email protected]>

---------

Co-authored-by: Jordan Krage <[email protected]>

* Bump operator-ui (#12684) (#12687)

* Finalize date on changelog for 2.10.0

* fix spacing

Signed-off-by: Sneha Agnihotri <[email protected]>

* Remove old operator-ui assets

---------

Signed-off-by: Sneha Agnihotri <[email protected]>
Co-authored-by: george-dorin <[email protected]>
Co-authored-by: ilija42 <[email protected]>
Co-authored-by: Sam <[email protected]>
Co-authored-by: Jordan Krage <[email protected]>
Co-authored-by: Friedemann Fürst <[email protected]>
Co-authored-by: Jim W <[email protected]>
Co-authored-by: Prashant Yadav <[email protected]>
Co-authored-by: frank zhu <[email protected]>
Co-authored-by: Margaret Ma <[email protected]>
Co-authored-by: Bolek <[email protected]>
Co-authored-by: chainchad <[email protected]>
Co-authored-by: george-dorin <[email protected]>
Co-authored-by: krehermann <[email protected]>
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.

6 participants