Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

DEVPROD-949 Only surface build variant for current task on task history page #2129

Merged
merged 2 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
10 changes: 7 additions & 3 deletions src/constants/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,8 @@ const getHistoryRoute = (
failingTests?: string[];
passingTests?: string[];
},
selectedCommit?: number
selectedCommit?: number,
visibleColumns?: string[]
) => {
if (filters || selectedCommit) {
const failingTests = toArray(filters?.failingTests);
Expand All @@ -267,6 +268,7 @@ const getHistoryRoute = (
[TestStatus.Failed]: failingTests,
[TestStatus.Passed]: passingTests,
[HistoryQueryParams.SelectedCommit]: selectedCommit,
[HistoryQueryParams.VisibleColumns]: visibleColumns,
});
return `${basePath}?${queryParams}`;
}
Expand Down Expand Up @@ -302,14 +304,16 @@ export const getTaskHistoryRoute = (
passingTests?: string[];
};
selectedCommit?: number;
visibleColumns?: string[];
}
) => {
const { filters, selectedCommit } = options || {};
const { filters, selectedCommit, visibleColumns } = options || {};

return getHistoryRoute(
`${paths.taskHistory}/${encodeURIComponent(projectIdentifier)}/${taskName}`,
filters,
selectedCommit
selectedCommit,
visibleColumns
);
};

Expand Down
2 changes: 2 additions & 0 deletions src/pages/task/ActionButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export const ActionButtons: React.FC<Props> = ({
task,
}) => {
const {
buildVariant,
canAbort,
canDisable,
canOverrideDependencies,
Expand Down Expand Up @@ -178,6 +179,7 @@ export const ActionButtons: React.FC<Props> = ({
const HistoryLink = useLGButtonRouterLink(
getTaskHistoryRoute(projectIdentifier, displayName, {
selectedCommit: !isPatch && order,
visibleColumns: [buildVariant],
})
);

Expand Down
3 changes: 2 additions & 1 deletion src/pages/task/taskTabs/testsTable/LogsColumn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const LogsColumn: React.FC<Props> = ({ task, testResult }) => {
urlParsley,
urlRaw,
} = testResult.logs ?? {};
const { displayName, displayTask, order, project } = task ?? {};
const { buildVariant, displayName, displayTask, order, project } = task ?? {};
const { sendEvent } = useTaskAnalytics();
const filters =
status === TestStatus.Fail
Expand Down Expand Up @@ -114,6 +114,7 @@ export const LogsColumn: React.FC<Props> = ({ task, testResult }) => {
to={getTaskHistoryRoute(project?.identifier, displayName, {
filters,
selectedCommit: order,
visibleColumns: [buildVariant],
})}
/>
)}
Expand Down