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

[to-reply] feature: support saga multi type config #741

Open
wants to merge 13 commits into
base: feature/saga
Choose a base branch
from

Conversation

FinnTew
Copy link
Contributor

@FinnTew FinnTew commented Dec 15, 2024

What this PR does:

Supported multi-type configuration parser in saga mode, fixed some related problems, adjusted and improved related unit tests, and supplemented test data in yaml format.

Which issue(s) this PR fixes:

Fixes #734

Special notes for your reviewer:

All relevant unit tests have been completed and passed.

Does this PR introduce a user-facing change?:

NONE

Copy link
Contributor

@Code-Fight Code-Fight left a comment

Choose a reason for hiding this comment

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

apache License 要加上,其他的酌情考虑下

@luky116
Copy link
Contributor

luky116 commented Dec 15, 2024

配置文件的解析,可以复用当前已有的逻辑
image


for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
_, err := parser.Parse(tt.configFilePath)
Copy link
Contributor

Choose a reason for hiding this comment

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

这里对字段的值进行断言?

@Code-Fight
Copy link
Contributor

apache License 要在你所有新增的文件上加上,只要没有的,都要加上

@FinnTew
Copy link
Contributor Author

FinnTew commented Dec 16, 2024

apache License 要在你所有新增的文件上加上,只要没有的,都要加上

好的

@luky116 luky116 changed the title feature: support saga multi type config [to-reply] feature: support saga multi type config Dec 21, 2024
@@ -242,7 +259,7 @@ func (s ServiceTaskStateParser) Parse(stateName string, stateMap map[string]inte
return nil, err
}

serviceName, err := s.GetString(stateName, stateMap, "serviceName")
serviceName, err := s.GetString(stateName, stateMap, "ServiceName")
Copy link
Contributor

Choose a reason for hiding this comment

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

Why modify this.

Copy link
Contributor Author

@FinnTew FinnTew Jan 15, 2025

Choose a reason for hiding this comment

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

During testing, I encountered errors, and upon investigation, I found that the key names in the three sets of test data in testdata/statelang were all "ServiceName" instead of "serviceName", as shown in the figure below. Therefore, I made the necessary modifications to pass the unit test.
IMG_20250115_233630.jpg

Copy link
Contributor

@xjlgod xjlgod left a comment

Choose a reason for hiding this comment

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

LGTM

@Code-Fight Code-Fight self-requested a review January 17, 2025 15:46
Copy link
Contributor

@Code-Fight Code-Fight left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants