-
-
Notifications
You must be signed in to change notification settings - Fork 728
re2: New release concurrency system #1804
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
Merged
Merged
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
8b3551c
wip reserve concurrency system
ericallam 16546f1
dequeue message
ericallam a5b2b39
ack
ericallam 880538f
improve the dead letter queue stuff
ericallam 555d991
fixed some key producer tests
ericallam 1a233ef
the run engine now works with the new reserve concurrency system
ericallam e9fa4ce
Update delays to use a redis worker and work with the new reserve con…
ericallam 2b6ce16
remove unused method
ericallam 1362d82
Add batchId to the delayed enqueueRun call
ericallam d11d491
WIP release concurrency queue
ericallam c8b9972
Get all the release concurrency queue tests passing
ericallam bf41703
improve the consumer of the concurrency queue
ericallam b7ddf20
Correctly use the new release concurrency queue in the run engine
ericallam cce402d
If max tokens is 0, then don't do releasings
ericallam de9e296
Add configuration for the release concurrency queue
ericallam cf3b238
remove project and task current concurrency tracking
ericallam fd9b0bf
WIP new reacquire concurrency system
ericallam 61c0834
Implement reserve concurrency clearing when the child run is acked
ericallam 2048b72
go to QUEUE_EXECUTING state if reacquiring concurrency doesn't work
ericallam 063651c
Upgrade vitest in the run-engine package
ericallam 8c66ec3
Remove reserve concurrency system from run queue
ericallam 7d11e82
Remove reserve concurrency system from run engine
ericallam 1b61b95
WIP run engine systems
ericallam 717cec8
move startRunAttempt to RunAttemptSystem
ericallam 63b43ff
more system work
ericallam 363f066
Delayed run system
ericallam a4581f1
ttl system
ericallam 7866e95
waiting for worker system
ericallam 67d74f0
More tests passing, fixed the heartbeat issue
ericallam 42fb5d0
Fix more tests
ericallam 29371e9
Implement checkpoint tests, handle dequeuing QUEUED_EXECUTING runs
ericallam e7c8f94
implement the QUEUED_EXECUTING dequeuing, and creating a checkpoint w…
ericallam b170a62
fixed the create checkpoint valid snapshot logic
ericallam f9c7e95
Added updated execution states chart and updated readme
ericallam 7eaf81a
Use releaserId in case we don't end up using run IDs
ericallam 28b3ed0
Implement release concurrency system
ericallam e5ea9cb
move the release concurrency queue into the release concurrency syste…
ericallam 38e1887
Fixed failing redis worker tests
ericallam 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ | |
"url": "http://localhost:3333/sse" | ||
} | ||
} | ||
} | ||
} |
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
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
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
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
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
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
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
4 changes: 4 additions & 0 deletions
4
...e/prisma/migrations/20250314133612_add_queued_executing_status_to_snapshots/migration.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
-- AlterEnum | ||
ALTER TYPE "TaskRunExecutionStatus" | ||
ADD | ||
VALUE 'QUEUED_EXECUTING'; |
8 changes: 8 additions & 0 deletions
8
...ions/20250318163201_add_previous_snapshot_id_to_task_run_execution_snapshot/migration.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
-- DropIndex | ||
DROP INDEX "SecretStore_key_idx"; | ||
|
||
-- AlterTable | ||
ALTER TABLE "TaskRunExecutionSnapshot" ADD COLUMN "previousSnapshotId" TEXT; | ||
|
||
-- CreateIndex | ||
CREATE INDEX "SecretStore_key_idx" ON "SecretStore"("key" text_pattern_ops); |
5 changes: 5 additions & 0 deletions
5
...igrations/20250319103257_add_release_concurrency_on_waitpoint_to_task_queue/migration.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
-- AlterTable | ||
ALTER TABLE | ||
"TaskQueue" | ||
ADD | ||
COLUMN "releaseConcurrencyOnWaitpoint" BOOLEAN NOT NULL DEFAULT false; |
26 changes: 26 additions & 0 deletions
26
...prisma/migrations/20250319110754_add_org_and_project_to_execution_snapshots/migration.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
Warnings: | ||
|
||
- Added the required column `organizationId` to the `TaskRunExecutionSnapshot` table without a default value. This is not possible if the table is not empty. | ||
- Added the required column `projectId` to the `TaskRunExecutionSnapshot` table without a default value. This is not possible if the table is not empty. | ||
|
||
*/ | ||
ericallam marked this conversation as resolved.
Show resolved
Hide resolved
|
||
-- AlterTable | ||
ALTER TABLE | ||
"TaskRunExecutionSnapshot" | ||
ADD | ||
COLUMN "organizationId" TEXT NOT NULL, | ||
ADD | ||
COLUMN "projectId" TEXT NOT NULL; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE | ||
"TaskRunExecutionSnapshot" | ||
ADD | ||
CONSTRAINT "TaskRunExecutionSnapshot_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "Project"("id") ON DELETE RESTRICT ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE | ||
"TaskRunExecutionSnapshot" | ||
ADD | ||
CONSTRAINT "TaskRunExecutionSnapshot_organizationId_fkey" FOREIGN KEY ("organizationId") REFERENCES "Organization"("id") ON DELETE RESTRICT ON UPDATE CASCADE; |
5 changes: 5 additions & 0 deletions
5
...isma/migrations/20250319114436_add_metadata_to_task_run_execution_snapshots/migration.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
-- AlterTable | ||
ALTER TABLE | ||
"TaskRunExecutionSnapshot" | ||
ADD | ||
COLUMN "metadata" JSONB; |
5 changes: 5 additions & 0 deletions
5
...s/database/prisma/migrations/20250319131807_add_locked_queue_id_to_task_run/migration.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
-- AlterTable | ||
ALTER TABLE | ||
"TaskRun" | ||
ADD | ||
COLUMN "lockedQueueId" TEXT; |
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
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.
Uh oh!
There was an error while loading. Please reload this page.