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

[1.9] Update evaluation id logic to be in sync with tick ids #25269

Open
wants to merge 1 commit into
base: 10-17-add-automation-condition-to-observable-source-asset
Choose a base branch
from

Conversation

OwenKephart
Copy link
Contributor

Summary & Motivation

When running in user-code mode, evaluation ids are always based off of the tick id. This prevents us from having to deserialize the AssetDaemonCursor server side, and just in general is an easier way of producing monotonically increasing integers across multiple values.

In general, the tick id is guaranteed to be strictly larger than the AssetDaemonCursor value, as the daemon cursor (unless manually edited) cannot increase without a new tick being created. This means that it is safe to switch from daemon-mode to user-mode, but if you switch from user-mode back to daemon-mode, you could end up with an evaluation id that was much smaller, with the end result being that new evaluation records you produce would have a lower evaluation_id than older ones, messing up the history.

This change makes it so that the daemon-mode id will stay in sync with the tick id, avoiding this issue.

How I Tested These Changes

Existing tests, with some small updates.

Changelog

NOCHANGELOG

Copy link
Contributor Author

OwenKephart commented Oct 14, 2024

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @OwenKephart and the rest of your teammates on Graphite Graphite

@OwenKephart OwenKephart force-pushed the 10-10-create_default_automation_condition_sensor_in_definitions_object branch from ad63e1b to a539d0e Compare October 14, 2024 23:02
@OwenKephart OwenKephart force-pushed the 10-14-_wip_update_evaluation_id_logic branch from 0d03b8a to 6f38e2c Compare October 14, 2024 23:03
@OwenKephart OwenKephart force-pushed the 10-10-create_default_automation_condition_sensor_in_definitions_object branch from a539d0e to 9e40e7a Compare October 14, 2024 23:11
@OwenKephart OwenKephart force-pushed the 10-14-_wip_update_evaluation_id_logic branch from 6f38e2c to ea5f33c Compare October 14, 2024 23:11
@OwenKephart OwenKephart force-pushed the 10-10-create_default_automation_condition_sensor_in_definitions_object branch from 9e40e7a to 0eccef5 Compare October 15, 2024 17:33
@OwenKephart OwenKephart force-pushed the 10-14-_wip_update_evaluation_id_logic branch from ea5f33c to 9649d9d Compare October 15, 2024 17:33
@OwenKephart OwenKephart force-pushed the 10-10-create_default_automation_condition_sensor_in_definitions_object branch from 0eccef5 to a57483a Compare October 15, 2024 17:56
@OwenKephart OwenKephart force-pushed the 10-14-_wip_update_evaluation_id_logic branch from 9649d9d to 51521fd Compare October 15, 2024 17:56
@OwenKephart OwenKephart force-pushed the 10-10-create_default_automation_condition_sensor_in_definitions_object branch from a57483a to bb8b0f1 Compare October 15, 2024 18:59
@OwenKephart OwenKephart force-pushed the 10-14-_wip_update_evaluation_id_logic branch from 51521fd to 4fe29d2 Compare October 15, 2024 19:00
@OwenKephart OwenKephart force-pushed the 10-10-create_default_automation_condition_sensor_in_definitions_object branch from bb8b0f1 to 99f09d6 Compare October 15, 2024 21:09
@OwenKephart OwenKephart force-pushed the 10-14-_wip_update_evaluation_id_logic branch from 4fe29d2 to cba16f1 Compare October 15, 2024 21:09
@OwenKephart OwenKephart force-pushed the 10-10-create_default_automation_condition_sensor_in_definitions_object branch from 99f09d6 to 9ade09f Compare October 16, 2024 23:37
@OwenKephart OwenKephart force-pushed the 10-14-_wip_update_evaluation_id_logic branch from cba16f1 to 8c6150c Compare October 16, 2024 23:37
@OwenKephart OwenKephart force-pushed the 10-10-create_default_automation_condition_sensor_in_definitions_object branch from 9ade09f to f2008ea Compare October 16, 2024 23:46
@OwenKephart OwenKephart force-pushed the 10-14-_wip_update_evaluation_id_logic branch from 8c6150c to eb403b4 Compare October 16, 2024 23:46
@OwenKephart OwenKephart force-pushed the 10-10-create_default_automation_condition_sensor_in_definitions_object branch from f2008ea to 8bd71f8 Compare October 17, 2024 00:20
@OwenKephart OwenKephart force-pushed the 10-14-_wip_update_evaluation_id_logic branch from eb403b4 to 2c86028 Compare October 17, 2024 00:21
@OwenKephart OwenKephart force-pushed the 10-10-create_default_automation_condition_sensor_in_definitions_object branch from 8bd71f8 to fdd6922 Compare October 17, 2024 16:39
@OwenKephart OwenKephart force-pushed the 10-14-_wip_update_evaluation_id_logic branch from 2c86028 to 4804b8b Compare October 17, 2024 16:39
@OwenKephart OwenKephart force-pushed the 10-14-_wip_update_evaluation_id_logic branch from 4804b8b to 7c398a7 Compare October 17, 2024 18:02
@OwenKephart OwenKephart changed the base branch from 10-10-create_default_automation_condition_sensor_in_definitions_object to 10-17-add-automation-condition-to-observable-source-asset October 17, 2024 18:02
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.

1 participant