Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(site): watch build logs while job is pending or running#15341

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ethanndickson merged 1 commit intomainfromethan/insta-fail-logs-fix
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletionsite/src/modules/templates/useWatchVersionLogs.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,7 +20,10 @@ export const useWatchVersionLogs = (
return;
}

if (templateVersionStatus !== "running") {
if (
templateVersionStatus !== "running" &&
templateVersionStatus !== "pending"
) {
return;
}

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -324,14 +324,13 @@ test("display pending badge and update it to running when status changes", async
},
};

letcalls =0;
letrunning =false;
server.use(
http.get(
"/api/v2/organizations/:org/templates/:template/versions/:version",
() => {
calls += 1;
return HttpResponse.json(
calls > 1 ? MockRunningTemplateVersion : MockPendingTemplateVersion,
running ? MockRunningTemplateVersion : MockPendingTemplateVersion,
Copy link
MemberAuthor

@ethanndicksonethanndicksonNov 4, 2024
edited
Loading

Choose a reason for hiding this comment

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

This test was failing because as we end up queryingversions/{id} an extra time with this change. I think we should just manually update the status instead of relying on a specific number of api calls.

BrunoQuaresma reacted with thumbs up emoji
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you please leave a comment in the code about why we are usingrunning? I can see my self not remembering this in two months.

ethanndickson reacted with thumbs up emoji
);
},
),
Expand All@@ -348,6 +347,10 @@ test("display pending badge and update it to running when status changes", async
const status = await screen.findByRole("status");
expect(status).toHaveTextContent("Pending");

// Manually update the endpoint, as to not rely on the editor page
// making a specific number of requests.
running = true;

await waitFor(
() => {
expect(status).toHaveTextContent("Running");
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp