-
Notifications
You must be signed in to change notification settings - Fork 838
Refactor: Move constants.go to dedicated constants package #6713
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
Refactor: Move constants.go to dedicated constants package #6713
Conversation
Move common/constants.go -> common/constants/constants.go
@@ -772,11 +773,11 @@ func createVisibilityMessage( | |||
executionTimeUnixNano int64, | |||
taskID int64, | |||
memo []byte, | |||
encoding common.EncodingType, | |||
encoding constants.EncodingType, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No action: comment only:
I think its not great we have a type in that file, but I also understand we need it declared there in order to have constants use it, so
service/history/execution/mutable_state_builder_methods_child_workflow_test.go
Outdated
Show resolved
Hide resolved
service/history/execution/mutable_state_decision_task_manager_test.go
Outdated
Show resolved
Hide resolved
ping me if you need a stamp once the conflicts are resolved, PRs like this are hard to merge unless you get a fast approval |
What changed?
Move common/constants.go -> common/constants/constants.go and refractor relevant code
We also changed some .tmpl files in responding to this change.
Why?
Currently. constants.go does not refer to any additional package since it only contains constant. Therefore, we should move it to it's dedicated package so that we won't be restricted due to dependency cycle.
It also makes imports more semantically clear with constants.SomeConstant vs common.SomeConstant
How did you test it?
Unit tests, it's only refractoring
Potential risks
only code referring to constants.go is changed, any incompatible part will be caught by unit tests.
Release notes
Documentation Changes