Skip to content

fix: batch transform failure handling#1573

Merged
CalebMartinUiPath merged 5 commits intomainfrom
caleb/fix-batchrag-failed-error
Apr 24, 2026
Merged

fix: batch transform failure handling#1573
CalebMartinUiPath merged 5 commits intomainfrom
caleb/fix-batchrag-failed-error

Conversation

@CalebMartinUiPath
Copy link
Copy Markdown
Contributor

@CalebMartinUiPath CalebMartinUiPath commented Apr 17, 2026

failed batch transforms were being incorrectly handled as in progress. Causing the agent to loop waiting for it to finish. With this change agent execution will end properly.

@github-actions github-actions Bot added the test:uipath-langchain Triggers tests in the uipath-langchain-python repository label Apr 17, 2026
@CalebMartinUiPath CalebMartinUiPath force-pushed the caleb/fix-batchrag-failed-error branch from b00d64f to c1c63d9 Compare April 17, 2026 00:35
batch_transform = self.retrieve_batch_transform(
id=id, index_name=index_name
)
if batch_transform.last_batch_rag_status == BatchTransformStatus.FAILED:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

does the same logic apply to DeepRAG?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

deeprag already has similar logic

if batch_transform.last_batch_rag_status == BatchTransformStatus.FAILED:
raise BatchTransformFailedException(
batch_transform_id=id,
status=batch_transform.last_batch_rag_status,
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.

isn't the status redundant?

)
except BatchTransformFailedException as e:
raise UiPathFaultedTriggerError(
ErrorCategory.USER,
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.

why is this a user error? can't it be marked as failed due to other conditions in ecs?

in ecs we have:

try {
// do various async things
} catch (Exception ex)
            {
                ex = ex.Unwrap();

                if (info != null)
                {
                    var errorMessage = (ex as LocalizedException)?.Message
                                       ?? ErrorMessages.BatchRag_InternalFailure;
                    await Workflow.ExecuteLocalActivityAsync(
                        (IBatchRagReportingActivities a) => a.ReportFailureAsync(batchRagId, errorMessage),
                        new LocalActivityOptions
                        {
                            StartToCloseTimeout = TimeSpan.FromMinutes(1),
                            RetryPolicy = new RetryPolicy { MaximumAttempts = 3 }
                        });
                }
            }

@CalebMartinUiPath CalebMartinUiPath force-pushed the caleb/fix-batchrag-failed-error branch from 5ac6bfa to ace5740 Compare April 24, 2026 20:49
@CalebMartinUiPath CalebMartinUiPath merged commit f82df05 into main Apr 24, 2026
122 checks passed
@CalebMartinUiPath CalebMartinUiPath deleted the caleb/fix-batchrag-failed-error branch April 24, 2026 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:uipath-langchain Triggers tests in the uipath-langchain-python repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants