Skip to content

Test for reset cached pipeline states #1068

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TeachMeTW
Copy link
Contributor

@TeachMeTW TeachMeTW commented May 7, 2025

Adds tests to verify that the pipeline reset functionality correctly updates both the pipeline state database and the profile's pipeline range.

Previously, when resetting the pipeline, the pipeline state database was updated but the cached pipeline start and end timestamps in the profile were not. Since the profile is used to determine whether to run the pipeline, this led to issues where the pipeline would not re-run even after being reset (as reported in e-mission/e-mission-docs#1105).

The recent fix implemented by @shankari correctly updates both the pipeline state database and the profile, and these tests verify that functionality found in #1067

Tests Added

Added two test methods to TestPipelineReset:

  • testResetProfilePipelineRange: Verifies that when reset_user_to_ts is called:
    The profile's pipeline_range.end_ts is updated to match the correct timestamp (the enter_ts of the first raw place in the last confirmed place)
    After re-running the pipeline, the profile's end_ts is updated

  • testResetProfilePipelineRangeToStart: Verifies that when reset_user_to_start is called:
    Both pipeline_range.start_ts and pipeline_range.end_ts in the profile are correctly set to null

Testing Done

Ran the new tests successfully and verified they properly test the profile update functionality.

awaiting merge of 1067 to fix git history

introduces two new test cases in `TestPipelineReset.py` to ensure that the `pipeline_range` in user profiles is correctly reset during pipeline operations. The first test checks that the `end_ts` is updated after resetting the pipeline to a specific timestamp, while the second test verifies that both `start_ts` and `end_ts` are set to `None` when resetting to the start. These tests address previous issues where the profile was not updated correctly after pipeline resets
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