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

[WIP] Move time source from db layer to PersistenceManager #6646

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ribaraka
Copy link

Refactored the system so that the PersistenceManager level handles the timestamp

Why?
#6610

How did you test it?
unit tests

Potential risks

Release notes

Documentation Changes

@@ -60,7 +60,7 @@ func TestNosqlExecutionStoreUtils(t *testing.T) {
Data: []byte(`[{"Branches":[{"BranchID":"test-branch-id","BeginNodeID":1,"EndNodeID":2}]}]`),
},
}
return store.prepareCreateWorkflowExecutionRequestWithMaps(workflowSnapshot)
return store.prepareCreateWorkflowExecutionRequestWithMaps(workflowSnapshot, time.Now())
Copy link
Member

@bowenxia bowenxia Jan 28, 2025

Choose a reason for hiding this comment

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

Have you had any error when running the unit tests? I was thinking to use a constant time stamp in the tests like this so that in the unit tests it will always keep the same

Copy link
Author

Choose a reason for hiding this comment

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

No, there haven't been any errors in the tests with this implementation. However, I refactored it to use a FixedTime variable for consistency.

@ribaraka ribaraka force-pushed the mv-timeSrc-to-persistManager branch from e99014a to f1bb070 Compare January 30, 2025 14:41
@ribaraka
Copy link
Author

@bowenxia added another commit with a refactor of the history storage. If you have time, please take a look. I'll be sending the work in small chunks, little by little. There are a few TODOs— if you could reply to them, I’d really appreciate it.

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.

2 participants