Skip to content
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

runner improvements (multiple tabs)-[INS-4779] #8244

Open
wants to merge 6 commits into
base: feat/multiple-tab
Choose a base branch
from

Conversation

CurryYangxx
Copy link
Member

@CurryYangxx CurryYangxx commented Dec 11, 2024

Changes

  • runnerId: use for save runner test result and query runner execution state
    • collection runner use workspaceId as runnerId
    • folder runner use folderId as runnerId
  • maintain all the runner states in a Context, so that we can keep the state when switching between runner tabs
    • request list (we need to keep order)
    • selected request
    • iteration count/delay
    • upload data
    • advanced config
  • change runner execution status display logic
    • not return redirect in runCollectionAction
    • if there is an error, store it in runnerExecutions
image

@CurryYangxx CurryYangxx marked this pull request as draft December 11, 2024 08:23
@CurryYangxx CurryYangxx changed the title runner improvements runner improvements (multiple tabs) Dec 16, 2024
@@ -160,6 +128,8 @@ export const Runner: FC<{}> = () => {
const [bail, setBail] = useState<boolean>(true);
const [isRunning, setIsRunning] = useState(false);

const runnerId = targetFolderId ? `${workspaceId}-${targetFolderId}` : workspaceId;
Copy link
Member Author

Choose a reason for hiding this comment

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

collection runner: workspaceId
folder runner: runnerId
If move the folder, the result will not be found

@CurryYangxx CurryYangxx changed the title runner improvements (multiple tabs) runner improvements (multiple tabs)-[INS-4779] Dec 17, 2024

useInterval(() => {
refreshPanes();
}, isRunning ? 1000 : null);
Copy link
Member Author

Choose a reason for hiding this comment

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

only start interval when runner is running

} catch (e) {
// the error could be from third party
const errMsg = encodeURIComponent(e.error || e);
return redirect(`/organization/${organizationId}/project/${projectId}/workspace/${workspaceId}/debug/runner?refresh-pane&error=${errMsg}&folder=${targetFolderId}`);
Copy link
Member Author

@CurryYangxx CurryYangxx Dec 17, 2024

Choose a reason for hiding this comment

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

do not return redirect, because we can not receive the redirect response if we navigate to another route

@CurryYangxx CurryYangxx marked this pull request as ready for review December 17, 2024 09:00
@CurryYangxx CurryYangxx force-pushed the fix/tab-runner-execution branch from 1e7e3b3 to 8cdb0ab Compare December 18, 2024 08:57
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.

1 participant