-
Notifications
You must be signed in to change notification settings - Fork 7
[PLA-2309] Add command to retry abandoned beam batch transactions #131
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
base: master
Are you sure you want to change the base?
Conversation
Add platform:beam:retry-abandoned-batches command that resets failed claims and batches whose transactions were abandoned after runtime upgrades, allowing them to be reprocessed by BatchProcess. Options: - --dry-run: preview changes without writing - --force: retry even if transaction is not abandoned - --yes: skip confirmation prompt
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Can we have it as action in Nova? |
…ndoned transactions
- Use whereHas to filter abandoned transactions in SQL instead of PHP loop - Remove unused Transaction import - Remove verbose per-batch logging - Cleaner and more efficient query flow
…s claims Covers scenario where: - Batch has completed_at, processed_at, and transaction_id set - Transaction state is ABANDONED - Claims are in FAILED or IN_PROGRESS state - Verifies all claims reset to PENDING and batch cleared for reprocessing
The Nova is only on the internal platform. We can implement it there, but we can also use the command runner. |
User description
Summary
Adds
platform:beam:retry-abandoned-batchescommand to recover beams whose batch transactions became invalid after a runtime/spec upgrade.Problem
After a runtime upgrade, old transaction encoded data can fail validation and the daemon marks them as ABANDONED. These abandoned transactions never recover automatically, leaving beam claims stuck.
Solution
New artisan command that:
Usage
After running, execute
platform:process-beam-claims --testor wait for the worker to create new transactions.Linear
https://linear.app/enjin/issue/PLA-2309
PR Type
Enhancement, Tests, Configuration
Description
Add command to retry abandoned batches
Reset failed/in-progress claims to pending
Register command in service provider
Add feature tests and test env tweaks
Diagram Walkthrough
File Walkthrough
BeamServiceProvider.php
Register new retry-abandoned-batches commandsrc/BeamServiceProvider.php
RetryAbandonedBatchescommand.BatchProcess.RetryAbandonedBatches.php
Implement abandoned batch recovery commandsrc/Commands/RetryAbandonedBatches.php
platform:beam:retry-abandoned-batches.transaction_idandprocessed_at; support--dry-run.RetryAbandonedBatchesTest.php
Feature tests for retry-abandoned-batches commandtests/Feature/Commands/RetryAbandonedBatchesTest.php
phpunit.xml
Bump PHPUnit memory limitphpunit.xml
testbench.yaml
Tune testbench environment settingstestbench.yaml