Skip to content

Commit

Permalink
Fixing run state and interval timing (#2927)
Browse files Browse the repository at this point in the history
* Fixing run state.

Signed-off-by: phixMe <[email protected]>

* Putting limit and offset in the correct place.

Signed-off-by: phixMe <[email protected]>

---------

Signed-off-by: phixMe <[email protected]>
  • Loading branch information
phixMe authored Oct 16, 2024
1 parent 5ba7503 commit 05d16aa
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
9 changes: 2 additions & 7 deletions api/src/main/java/marquez/db/JobDao.java
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,6 @@ default Optional<Job> findWithDatasetsAndRun(String namespaceName, String jobNam
jobs_view AS j
WHERE
j.namespace_name = :namespaceName
ORDER BY
j.name
LIMIT
:limit
OFFSET
:offset
),
job_versions_temp AS (
SELECT
Expand Down Expand Up @@ -249,7 +243,8 @@ job_tags as (
WHERE
(r.current_run_state IN (<lastRunStates>) OR r.uuid IS NULL)
ORDER BY
j.name
j.updated_at DESC
LIMIT :limit OFFSET :offset
""")
List<Job> findAll(
String namespaceName,
Expand Down
1 change: 1 addition & 0 deletions web/src/components/dashboard/SplitButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export default function SplitButton({ options, onClick }: Props) {
index: number
) => {
setSelectedIndex(index)
onClick(options[index])
setOpen(false)
}

Expand Down
5 changes: 2 additions & 3 deletions web/src/routes/dashboard/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const INTERVAL_TO_MS_MAP: Record<RefreshInterval, number> = {
}

const states: { label: RunState; color: string; bgColor: string }[] = [
{ label: 'NEW', color: theme.palette.info.main, bgColor: 'secondary' },
{ label: 'RUNNING', color: theme.palette.info.main, bgColor: 'secondary' },
{ label: 'COMPLETED', color: theme.palette.primary.main, bgColor: 'primary' },
{ label: 'FAILED', color: theme.palette.error.main, bgColor: 'error' },
{ label: 'ABORTED', color: theme.palette.secondary.main, bgColor: 'secondary' },
Expand Down Expand Up @@ -141,8 +141,7 @@ const Dashboard: React.FC = ({
}, intervalTime)
return () => clearInterval(intervalId)
}

return
return () => clearInterval(0)
}, [intervalKey, searchParams])

const metrics = lineageMetrics.reduce(
Expand Down
2 changes: 1 addition & 1 deletion web/src/routes/dashboard/JobRunItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const JobRunItem: React.FC<Props> = ({ job }) => {
key={run.id}
title={
<>
<MqStatus label={job.latestRun?.state} color={runStateColor(run.state)} />
<MqStatus label={run?.state} color={runStateColor(run.state)} />
<MqText sx={{ textAlign: 'center' }} subdued>
{run && run.durationMs ? stopWatchDuration(run.durationMs) : 'N/A'}
</MqText>
Expand Down

0 comments on commit 05d16aa

Please sign in to comment.