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

Conversation

gibsondan
Copy link
Member

Summary:
Right now schedule ticks smush two separate concepts into the 'timestamp' field: the time the schedule tick was supposed to run, and the time it actually ran. This means that if the tick fails and retries, the retry overwrites the original tick in a confusing way, and also means that if a tick happens way after its scheduled time for whatever reason (e..g the daemon was down) the resulting duration is much longer than it should have been.

The plan is to alleviate those issues by moving the 'timestamp' field to be the itme that the tick actually started, and add a new 'scheduledExecutionTimestamp' field for when you when you want to know when it was supposed to happen.

This PR adds the new "scheduledExecutionTimestamp" field to the tick object and uses it where appropriate to keep the existing behavior. I think more substantial design changes will likely need to be made to the schedule timeline view to display both timestamps where appropriate, but wanted to send this out to seed that discussion.

Summary & Motivation

How I Tested These Changes

Changelog

Insert changelog entry or delete this section.

@gibsondan gibsondan force-pushed the consecutivefailurecount3 branch from ac79a45 to 534f6a6 Compare January 3, 2025 22:50
Copy link

github-actions bot commented Jan 3, 2025

Deploy preview for dagit-core-storybook ready!

✅ Preview
https://dagit-core-storybook-qgx385r8k-elementl.vercel.app
https://consecutivefailurecount3.core-storybook.dagster-docs.io

Built with commit 8a034bd.
This pull request is being automatically deployed with vercel-action

Copy link
Contributor

@salazarm salazarm left a comment

Choose a reason for hiding this comment

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

lgtm!

@gibsondan gibsondan force-pushed the consecutivefailurecount3 branch from 03ddbad to 8a8cb74 Compare January 6, 2025 22:04
@gibsondan gibsondan force-pushed the consecutivefailurecount2 branch from ae401a6 to 55088ae Compare January 6, 2025 22:13
…g the schedule timeline

Summary:
Right now schedule ticks smush two separate concepts into the 'timestamp' field: the time the schedule tick was supposed to run, and the time it actually ran. This means that if the tick fails and retries, the retry overwrites the original tick in a confusing way, and also means that if a tick happens way after its scheduled time for whatever reason (e..g the daemon was down) the resulting duration is much longer than it should have been.

The plan is to alleviate those issues by moving the 'timestamp' field to be the itme that the tick actually started, and add a new 'scheduledExecutionTimestamp' field for when you when you want to know when it was supposed to happen.

This PR adds the new "scheduledExecutionTimestamp" field to the tick object and uses it where appropriate to keep the existing behavior. I think more substantial design changes will likely need to be made to the schedule timeline view to display both timestamps where appropriate, but wanted to send this out to seed that discussion.
@gibsondan gibsondan force-pushed the consecutivefailurecount3 branch from 8a8cb74 to 8a034bd Compare January 6, 2025 22:15
@@ -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!

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.

3 participants