Skip to content

Improve handling of unavailable logs in completed workflows - #1625

Open
hazdl wants to merge 6 commits into
mainfrom
hz/no-logs-s3
Open

hazdl wants to merge 6 commits into
mainfrom
hz/no-logs-s3

Conversation

@hazdl

@hazdl hazdl commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Return “Log not available” immediately for completed workflows without archived logs AP-1319

Summary

Improve log handling for completed workflows where archived task logs are unavailable.

Previously, when a user selected a task in a completed workflow that had already been archived, the frontend would repeatedly attempt to retrieve logs, displaying "Waiting for logs" and retrying up to 10 times before eventually showing "Log not available".

This change avoids unnecessary retries when it is already known that a completed workflow has no archived logs available.

workflow_name,
]);

let workflow = reqwest::Client::new()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

suggest to use the public static client if possible:

pub(self) static ref CLIENT: reqwest::Client = reqwest::Client::new();

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.

CLIENT is currently declared as pub(self) in graphql/mod.rs, so it isn't accessible from subscription.rs. Should I widen its visibility and reuse it here?

Comment thread backend/graph-proxy/src/graphql/subscription.rs
Comment thread backend/graph-proxy/src/graphql/subscription.rs
import React from "react";

export function getTaskStatusIcon(status: TaskStatus, size: number = 25) {
const pulse = keyframes`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is this intentional? These look like style changes that are unrelated to the problem (fixing logs for completed workflows).

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.

Intentional. I added the running status indicator to make it clearer to users that a task is still active while logs may not yet be available. That said, it's not strictly required for the completed-workflow log fix, so I'm happy to move it into a separate PR if you'd prefer to keep this change focused.

}}
data-testid="handle-target"
onClick={(event) => {
event.preventDefault();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is this intentional? This seems unrelated to the logs.

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.

Intentional. I found that task selection did not reliably respond while a workflow was running. This change ensures clicks are handled consistently so users can select a task and view its logs.

}}
data-testid="handle-source"
onClick={(event) => {
event.preventDefault();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

As above.

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.

Same as above. I found that clicks on running workflow tasks were not consistently handled. This change ensures task selection works reliably while the workflow is running so users can access task logs.

@hazdl
hazdl requested a review from davehadley September 21, 2026 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants