-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: Create initial Coordinator V2 service #444
Merged
Merged
Changes from 39 commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
8e6e95d
feat: Create crate for coordinator control service
morgsmccauley c2f857b
feat: Fetch and print registry contract
morgsmccauley dd26099
feat: Used shared registry types
morgsmccauley 025b315
refactor: Extract registry fetch to own mod
morgsmccauley 3e05d9a
refactor: Use structured logging
morgsmccauley 4ba5296
feat: Start all streams with stubbed data
morgsmccauley 126296d
feat: Start stream with filter specified in registry
morgsmccauley 64d835b
feat: Add `update_at`/`created_at` fields to registry
morgsmccauley c91f814
chore: Temporarily mock registry
morgsmccauley b19c607
feat: Write `last_indexed_block` per block stream
morgsmccauley 0db45b0
feat: Start block stream from desired height
morgsmccauley a849a1a
refactor: Abstract block stream handling away
morgsmccauley 32ca6b7
refactor: Allow mocking of `Registry`
morgsmccauley 34b21f7
refactor: Allow mocking of `BlockStreamHandler`
morgsmccauley 574b629
test: Add unit test for control loop
morgsmccauley b8cbcee
refactor: Rename for clarity
morgsmccauley 19fe056
test: Test starting of block streams
morgsmccauley dd4f587
feat: Add `version` to block streams
morgsmccauley d011a22
feat: Write block stream version from coordinator
morgsmccauley bb157e7
feat: Stop streams not in registry
morgsmccauley fbc71d5
feat: Ignores streams with matching versions
morgsmccauley b803a03
feat: Restart streams with mismatched versions
morgsmccauley e0c3714
refactor: Avoid `.clone()`
morgsmccauley 09cca2b
feat: Add support for `ActionFunctionCallRule`
morgsmccauley 124cec9
feat: Log block stream requests
morgsmccauley a0568ed
fix: Map correct status values
morgsmccauley b70b25d
feat: Skip historical/delta lake processing for function/event rules
morgsmccauley 4a81033
chore: Pin `near-lake-framework` to `0.7.5`
morgsmccauley dbdc1df
feat: Continuously loop registry config synchronization
morgsmccauley b2d8720
chore: Remove stubbed registry contract
morgsmccauley 6e89697
chore: Use `near-primitives` feature for `registry-types`
morgsmccauley 67e60fd
refactor: Rename `synchronise_registry_config` -> `synchronise_block_…
morgsmccauley 83a2d92
feat: Start executors
morgsmccauley 2977df0
feat: Add error context
morgsmccauley 20b0fb4
feat: Restart executors with mismatched versions
morgsmccauley 73609d8
feat: Stop executors not in registry
morgsmccauley a9cf247
refactor: Configure block stream redis stream from coordinator
morgsmccauley 240ba3d
fix: Enable (hack) mocking by pinning lake framework version
morgsmccauley 165111f
ci: Add checks for Coordinator
morgsmccauley 62a3334
refactor: Rename to `last_published_block` as it has not been executed
morgsmccauley d7aa296
chore: Remove "historical" name references from logging
morgsmccauley e373d4c
fix: Publish blocks to correct redis stream
morgsmccauley abc7272
chore: Fix spelling
morgsmccauley 762a078
fixup! fix: Publish blocks to correct redis stream
morgsmccauley d250f1f
refactor: Rename for clarity
morgsmccauley 46745d2
fix: Fix rate limiting on protoc setup
morgsmccauley File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: Coordinator | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- "coordinator/**" | ||
pull_request: | ||
paths: | ||
- "coordinator/**" | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Protoc | ||
uses: arduino/setup-protoc@v2 | ||
- name: Check | ||
working-directory: ./coordinator | ||
run: cargo check | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Protoc | ||
uses: arduino/setup-protoc@v2 | ||
- name: Test | ||
working-directory: ./coordinator | ||
run: cargo test | ||
|
||
|
||
format: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Install Protoc | ||
uses: arduino/setup-protoc@v2 | ||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: 1.70.0 | ||
override: true | ||
profile: minimal | ||
components: rustfmt | ||
- name: Check formatting | ||
working-directory: ./coordinator | ||
run: | | ||
cargo fmt -- --check | ||
clippy: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Install Protoc | ||
uses: arduino/setup-protoc@v2 | ||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: 1.70.0 | ||
override: true | ||
profile: minimal | ||
components: clippy | ||
- name: Clippy check | ||
working-directory: ./coordinator | ||
run: | | ||
cargo clippy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The existing mocks for
near-lake-framework
depend on behaviour which does not exist in the next version.I'm pinning this for now, when we upgrade we'll need to find another way to mock it.