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

Start using InstigationTick.scheduledExecutionTimestamp when rendering the schedule timeline #26823

Open
wants to merge 1 commit into
base: consecutivefailurecount2
Choose a base branch
from
Open
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
16 changes: 8 additions & 8 deletions js_modules/dagster-ui/packages/ui-core/client.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const ASSET_DAEMON_TICK_FRAGMENT = gql`
id
timestamp
endTimestamp
scheduledExecutionTimestamp
status
instigationType
error {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ export const TICK_TAG_FRAGMENT = gql`
id
status
timestamp
scheduledExecutionTimestamp
skipReason
runIds
runKeys
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ export const HISTORY_TICK_FRAGMENT = gql`
status
timestamp
endTimestamp
scheduledExecutionTimestamp
cursor
instigationType
skipReason
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ const TickDetailsDialogImpl = ({tickId, tickResultType, instigationSelector}: In
<>
<span>Tick for {instigationSelector.name}: </span>
<TimestampDisplay
timestamp={tick.timestamp}
timestamp={tick.scheduledExecutionTimestamp ?? tick.timestamp}
Copy link
Collaborator

Choose a reason for hiding this comment

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

This all looks good but I want to sanity check the ordering here, I'd assumed from the PR description that the old behavior was the inverse of this -- the time it actually executed, if it did execute, and the time it is scheduled for, if it did not yet execute. If that's the case I think these would be tick.timestamp ?? tick.scheduledExecutionTimestamp, since tick.scheduledExecutionTimestamp is the one that is always present?

Copy link
Collaborator

Choose a reason for hiding this comment

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

edit: Ahh I see, maybe this is falling back to tick.timestamp for back-compat so this is more of a "new version ?? old version". Carry on!

timeFormat={{showTimezone: false, showSeconds: true}}
/>
</>
Expand Down Expand Up @@ -242,7 +242,10 @@ export function TickDetailSummary({
<Subtitle2>Timestamp</Subtitle2>
<div>
{tick ? (
<Timestamp timestamp={{unix: tick.timestamp}} timeFormat={{showTimezone: true}} />
<Timestamp
timestamp={{unix: tick.scheduledExecutionTimestamp ?? tick.timestamp}}
timeFormat={{showTimezone: true}}
/>
) : (
'–'
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ function TickRow({
<tr>
<td>
<TimestampDisplay
timestamp={tick.timestamp}
timestamp={tick.scheduledExecutionTimestamp ?? tick.timestamp}
timeFormat={{showTimezone: false, showSeconds: true}}
/>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ describe('TickTag', () => {
id: 'foobar',
status: InstigationTickStatus.SUCCESS,
timestamp: Date.now(),
scheduledExecutionTimestamp: Date.now(),
skipReason: 'lol skipped',
runIds: [],
runKeys: [],
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const ScheduleDetails = (props: {
{latestTick ? (
<Group direction="row" spacing={8} alignItems="center">
<TimestampDisplay
timestamp={latestTick.timestamp}
timestamp={latestTick.scheduledExecutionTimestamp ?? latestTick.timestamp}
timezone={executionTimezone}
timeFormat={TIME_FORMAT}
/>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading