You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@seata.apache.org by "flypiggyyoyoyo (via GitHub)" <gi...@apache.org> on 2025/03/06 13:19:40 UTC
[PR] [Refactor] Migrate StateMachineObject to client/config and unify config parsing with koanf [incubator-seata-go]
flypiggyyoyoyo opened a new pull request, #785:
URL: https://github.com/apache/incubator-seata-go/pull/785
<!-- Thanks for sending a pull request!
-->
**What this PR does**:
This PR migrates StateMachineObject to client/config, adds SagaConfig to the main Config struct, and replaces direct JSON/YAML parsing with koanf for unified configuration handling. It updates field tags to align with koanf, refactors parsers for consistency, and updates tests to reflect configuration changes.
**Which issue(s) this PR fixes**:
<!--
*Automatically closes linked issue when PR is merged.
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
_If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_*
-->
Fixes #773
**Special notes for your reviewer**:
**Does this PR introduce a user-facing change?**:
<!--
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->
```release-note
1. **StateMachineObject Field Tags**:
Field tags in `StateMachineObject` are renamed to lowercase (e.g., `"Name"` → `"name"`) to align with `koanf` parsing. Users must update their code or configuration files if manually constructing/serializing this struct.
2. **New SagaConfig Field**:
A `SagaConfig` field is added to the root `Config` struct. If users need to configure Saga-related settings, they must include this field in their JSON/YAML configuration files.
3. **Package Path Change**:
The `StateMachineObject` struct is moved from the `parser` package to `client/config`. Users importing this struct must update their import paths.
**Action Required**:
- Update field tags in code/configs for `StateMachineObject`.
- Add `SagaConfig` to configuration files if Saga features are used.
- Adjust import paths for `StateMachineObject`.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org
Re: [PR] [Refactor] Migrate StateMachineObject to client/config and unify config parsing with koanf [incubator-seata-go]
Posted by "flypiggyyoyoyo (via GitHub)" <gi...@apache.org>.
flypiggyyoyoyo commented on PR #785:
URL: https://github.com/apache/incubator-seata-go/pull/785#issuecomment-2706193161
> Refer to `pkg/rm/tcc/fence/fence.go`, `pkg/rm/tcc/config.go`, and the way `RegisterFlags` is written in `pkg/client/config.go`, compare and tweak your current implementation, and see if it's any better.
Received. I will check and compare.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org
Re: [PR] [Refactor] Migrate StateMachineObject to client/config and unify config parsing with koanf [incubator-seata-go]
Posted by "luky116 (via GitHub)" <gi...@apache.org>.
luky116 merged PR #785:
URL: https://github.com/apache/incubator-seata-go/pull/785
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org
Re: [PR] [Refactor] Migrate StateMachineObject to client/config and unify config parsing with koanf [incubator-seata-go]
Posted by "FinnTew (via GitHub)" <gi...@apache.org>.
FinnTew commented on PR #785:
URL: https://github.com/apache/incubator-seata-go/pull/785#issuecomment-2717720316
LGTM
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org
Re: [PR] [Refactor] Migrate StateMachineObject to client/config and unify config parsing with koanf [incubator-seata-go]
Posted by "FinnTew (via GitHub)" <gi...@apache.org>.
FinnTew commented on PR #785:
URL: https://github.com/apache/incubator-seata-go/pull/785#issuecomment-2706172187
Refer to `pkg/rm/tcc/fence/fence.go`, `pkg/rm/tcc/config.go`, and the way `RegisterFlags` is written in `pkg/client/config.go`, compare and tweak your current implementation, and see if it's any better.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org
Re: [PR] [Refactor] Migrate StateMachineObject to client/config and unify config parsing with koanf [incubator-seata-go]
Posted by "flypiggyyoyoyo (via GitHub)" <gi...@apache.org>.
flypiggyyoyoyo commented on PR #785:
URL: https://github.com/apache/incubator-seata-go/pull/785#issuecomment-2711058090
I refactor the Saga-related configuration structures by extracting them from the main Config struct into independent modular configuration structures. This change aligns with the existing modular configuration pattern used by TCC and other modules in the project.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org