CROSSLINK-264 retry-action#622
Open
adamdickmeiss wants to merge 37 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds retry-related entries to the returnables patron-request state model for CROSSLINK-264, introducing a requester-side retry event and supplier-side retry action.
Changes:
- Adds
accept-retryevent on requesterSENT, transitioning toNEW. - Adds
ask-retryaction on supplierVALIDATED, transitioning toNEW. - Keeps generated runtime JSON in sync with
misc/returnables.yaml.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
misc/returnables.yaml |
Adds retry event/action declarations to the source state model. |
broker/patron_request/service/statemodels/returnables.json |
Updates the generated embedded runtime state model with the same retry declarations. |
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Comment on lines
+573
to
+577
| _, err = a.prRepo.CreatePatronRequest(ctx, pr_db.CreatePatronRequestParams(clone)) | ||
| if err != nil { | ||
| status, result := logActionErrorAndReturnResult(ctx, "failed to create patron request for retry", err) | ||
| return actionExecutionResult{status: status, result: result, pr: pr} | ||
| } |
Comment on lines
+581
to
+587
| _, err = a.prRepo.CreatePatronRequest(ctx, pr_db.CreatePatronRequestParams(clone)) | ||
| if err != nil { | ||
| status, result := logActionErrorAndReturnResult(ctx, "failed to create patron request for retry", err) | ||
| return actionExecutionResult{status: status, result: result, pr: pr} | ||
| } | ||
| pr.NextReqID = getDbTextPtr(&clone.ID) | ||
| return actionExecutionResult{status: events.EventStatusSuccess, result: &result, pr: pr} |
Comment on lines
+5
to
+9
| DROP VIEW IF EXISTS patron_request_search_view; | ||
|
|
||
| CREATE VIEW patron_request_search_view AS | ||
| SELECT | ||
| pr.*, |
jakub-id
requested changes
Jun 18, 2026
| status, result := logActionErrorAndReturnResult(ctx, "failed to clone IllRequest for retry", err) | ||
| return actionExecutionResult{status: status, result: result, pr: pr} | ||
| } | ||
| clone.State = BorrowerStateValidated |
Contributor
There was a problem hiding this comment.
@adamdickmeiss this is fragile. What if there's no BorrowerStateValidate in the state model? Also, there's no trace of this operation in the event log. I think we should create the new request in the initial state and run the auto-actions on it so it behaves like a regular request.
Contributor
|
Co-pilot comments? |
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.
https://index-data.atlassian.net/browse/CROSSLINK-264