Repository navigation
Conversation
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
erain
marked this pull request as ready for review
October 14, 2026 14:10
This was referenced Oct 14, 2026
mayawang
reviewed
Oct 14, 2026
| } | ||
| } | ||
|
|
||
| func waitingForWorker(task *v1alpha1.Task) bool { |
Collaborator
There was a problem hiding this comment.
#463 will need a SubstrateUnavailable reason picked up here too, so it'd help to make this a small set of waiting reasons rather than one hard-coded reason.
| } | ||
|
|
||
| func (s *Server) retryPendingTasks(ctx context.Context, now time.Time, retries map[string]schedulingRetry, opts SchedulingOptions) { | ||
| tasks, err := s.store.ListTasks(ctx, "", math.MaxInt64, 0) |
Collaborator
There was a problem hiding this comment.
Fine for now. Worth a TODO to index Pending tasks, since this lists every task each interval.
Member
|
We shouldn't merge this. We don't want AX to deal with a standalone queuing system. Substrate itself will eventually introduce some queueing itself and we can expand AX to use it. |
Member
|
Closing this PR, see my comment on #367 (comment). |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #367.
A task that cannot find a free Substrate worker now waits and retries instead of becoming permanently
Failed.When a user resumes a task:
PendingwithReady=False, reason=WaitingForWorker. The CLI reports that it is waiting for a worker.Running.The shorter default cap helps waiting tasks use newly freed workers promptly. Operators can tune both delays with ax-server flags:
The interval must be positive and the maximum must be at least the interval. Invalid settings fail at startup. These settings control retry pacing, not how long a task may wait for capacity.
Waiting tasks remain in the existing store, so they survive a server restart. Each retry checks the latest task state under its resource lock: suspending or deleting a waiting task cancels its pending resume. Other errors still follow the existing failure behavior.
The change adds the retry loop, regression tests, and a live test runnable with
make test-e2e-scheduling. Setup instructions are in test/e2e/README.md.End-to-end test
The test uses a real AX server, Redis, and Substrate. It creates an isolated pool with one worker and four tasks whose actors each need the worker's full CPU capacity.
Pendingacross retries.All scenarios passed. The fixture pre-creates actors to pin them to the test pool; generated-template compatibility is outside this test's coverage.
make test, targeted race tests,go vet ./..., the build, and ShellCheck passed. Tests cover the default and custom retry timings, invalid configuration, and the actual retry loop. The live scenarios above also passed with the new defaults. Module files are unchanged.Implemented with AI coding assistance.