Skip to content

CROSSLINK-264 retry-action#622

Open
adamdickmeiss wants to merge 37 commits into
mainfrom
CROSSLINK-264-ask-retry-action
Open

CROSSLINK-264 retry-action#622
adamdickmeiss wants to merge 37 commits into
mainfrom
CROSSLINK-264-ask-retry-action

Conversation

@adamdickmeiss

Copy link
Copy Markdown
Contributor

Copilot AI review requested due to automatic review settings May 29, 2026 11:58
@adamdickmeiss adamdickmeiss marked this pull request as draft May 29, 2026 11:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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-retry event on requester SENT, transitioning to NEW.
  • Adds ask-retry action on supplier VALIDATED, transitioning to NEW.
  • 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.

Comment thread misc/returnables.yaml Outdated
Comment thread misc/returnables.yaml Outdated
Copilot AI review requested due to automatic review settings June 1, 2026 12:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

Comment thread misc/returnables.yaml
Comment thread misc/returnables.yaml
Comment thread broker/patron_request/service/statemodels/returnables.json
Comment thread broker/patron_request/service/statemodels/returnables.json
Comment thread misc/returnables.yaml
Comment thread broker/patron_request/service/statemodel_capabilities.go
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Copilot AI review requested due to automatic review settings June 1, 2026 12:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

Comment thread broker/patron_request/service/statemodels/returnables.json
Comment thread misc/returnables.yaml
Comment thread misc/returnables.yaml
Comment thread misc/returnables.yaml
Comment thread broker/patron_request/service/statemodel_capabilities.go
Comment thread broker/patron_request/service/statemodels/returnables.json
Copilot AI review requested due to automatic review settings June 2, 2026 13:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Comment thread broker/patron_request/service/statemodel_capabilities.go
Comment thread broker/patron_request/service/message-handler.go
Comment thread misc/returnables.yaml Outdated
Copilot AI review requested due to automatic review settings June 8, 2026 15:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 21 out of 21 changed files in this pull request and generated 3 comments.

Comment thread broker/patron_request/service/action.go Outdated
Comment thread broker/patron_request/service/message-handler.go Outdated
Comment thread broker/test/patron_request/api/api-handler_test.go
Copilot AI review requested due to automatic review settings June 14, 2026 13:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 21 out of 21 changed files in this pull request and generated 3 comments.

Comment thread broker/patron_request/service/action.go Outdated
Comment thread broker/patron_request/service/message-handler.go Outdated
Comment thread broker/test/patron_request/api/api-handler_test.go Outdated
Copilot AI review requested due to automatic review settings June 15, 2026 08:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 22 out of 22 changed files in this pull request and generated 2 comments.

Comment thread broker/patron_request/service/action.go Outdated
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}
}
@adamdickmeiss adamdickmeiss marked this pull request as ready for review June 15, 2026 09:27
Copilot AI review requested due to automatic review settings June 15, 2026 09:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 21 out of 21 changed files in this pull request and generated 2 comments.

Comment thread broker/patron_request/service/action.go Outdated
Comment thread broker/patron_request/service/action.go
Copilot AI review requested due to automatic review settings June 17, 2026 09:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 22 out of 22 changed files in this pull request and generated 2 comments.

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.*,
status, result := logActionErrorAndReturnResult(ctx, "failed to clone IllRequest for retry", err)
return actionExecutionResult{status: status, result: result, pr: pr}
}
clone.State = BorrowerStateValidated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

@jakub-id

Copy link
Copy Markdown
Contributor

Co-pilot comments?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants