This repository was archived by the owner on Jun 2, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Conversation
This file contains hidden or 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
…subnet-api into add/tasking-service
…subnet-api into add/tasking-service
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.
Pull Request Overview
This PR introduces a combined round and tasking service by consolidating tests and updating service interfaces.
- Removed the previous round service tests.
- Added new tests covering both round and tasking services.
- Updated TaskingService and configuration to use "maxTasksPerSubnet" for task sampling.
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
test/round-service.test.js | Removed old tests for round service. |
test/round-and-tasking-service.test.js | Added comprehensive tests for both round and tasking functionalities. |
lib/tasking-service.js | Updated task sampler typedef, registration, and task generation/storage logic. |
lib/config.js | Updated tasking configuration to use maxTasksPerSubnet instead of maxTasks. |
Files not reviewed (1)
- migrations/004.do.checker-subnet-tasks.sql: Language not supported
Closed
pyropy
commented
Apr 14, 2025
checkRoundIntervalMs: 200 | ||
} | ||
|
||
describe('round and tasking service', () => { |
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.
I had to merge round and tasking service tasks together as splitting them up causes flaky tests due to concurrent database reads writes.
…subnet-api into add/tasking-service
This reverts commit e4dd5df.
…subnet-api into add/tasking-service
…subnet-api into add/tasking-service
…subnet-api into add/tasking-service
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This pull request includes changes to the tasking service, focusing on adding task generation logic and adding tests. The implementing task generation logic, creating a new database table for subnet tasks, and adding tests for the round and tasking services.
Tasking service is triggered on the round creation. Once the service is triggered it will call all registered task sampling functions for each subnet, generate tasks for each of them and save them to the database.
Tasks definition is saved in the database using
JSONB
types which enables us to have dynamic task definitions for different subnets.Change log:
migrations/004.do.checker-subnet-tasks.sql
: Created a new tablechecker_subnet_tasks
to store tasks for subnets.lib/tasking-service.js
: UpdatedTaskSamplingFn
andTaskingConfig
typedefs, added logic for registering task samplers, generating tasks for subnets, and storing tasks in the database. [1] [2]lib/config.js
: ChangedmaxTasks
tomaxTasksPerSubnet
in thetaskingServiceConfig
.test/round-and-tasking-service.test.js
: Added comprehensive tests for the round and tasking services, including tests for round creation, round transitions, task sampler registration, and task generation.test/round-service.test.js
: Removed redundant tests for the round service, as they are now included inround-and-tasking-service.test.js
.Closes:
Related to: