incubator-seata icon indicating copy to clipboard operation
incubator-seata copied to clipboard

Refactor: Refactoring the `Result` Class

Open YongGoose opened this issue 10 months ago • 15 comments

Why you need it?

Please check the comments on the PR.

  • https://github.com/apache/incubator-seata/pull/7157#issuecomment-2650089338

How it could be?

I want to use type effectively in the Result object, just like in SimpleResult.

One idea I have is to move APIs like success from SimpleResult to Result.

YongGoose avatar Feb 11 '25 08:02 YongGoose

@funky-eyes

I’d like to proceed once both tasks are completed. Please assign me to this issue.

Thank you! ☺️

  • https://github.com/apache/incubator-seata/issues/6774
  • https://github.com/apache/incubator-seata/pull/7133

YongGoose avatar Feb 11 '25 08:02 YongGoose

Well done, looking forward to your PR.

funky-eyes avatar Feb 11 '25 09:02 funky-eyes

@xingfudeshi

If you're interested, please review PR I created 🙂

  • https://github.com/apache/incubator-seata/pull/7176

YongGoose avatar Feb 22 '25 05:02 YongGoose

@xingfudeshi

If you're interested, please review PR I created 🙂

  • https://github.com/apache/incubator-seata/pull/7176

Sure!

xingfudeshi avatar Feb 22 '25 09:02 xingfudeshi

I want to know which modules are currently involved in refactoring and the classes involved, as we need to understand the scope of this issue.

funky-eyes avatar Feb 22 '25 09:02 funky-eyes

I want to know which modules are currently involved in refactoring and the classes involved, as we need to understand the scope of this issue.

I refactored the Result class along with its subclasses.
Consequently, the common, console, namingserver, and server modules, which depend on these classes, were also part of the refactoring.

YongGoose avatar Feb 22 '25 09:02 YongGoose

OK, I believe the impact of this change is within a controllable range. You can complete this change through multiple PRs, either by module or by dependency.

funky-eyes avatar Feb 22 '25 09:02 funky-eyes

OK, I believe the impact of this change is within a controllable range. You can complete this change through multiple PRs, either by module or by dependency.

Is it correct to address the impact of this PR through multiple PRs?
If I’ve misunderstood, could you please provide further clarification?

YongGoose avatar Feb 22 '25 09:02 YongGoose

OK, I believe the impact of this change is within a controllable range. You can complete this change through multiple PRs, either by module or by dependency.

Is it correct to address the impact of this PR through multiple PRs? If I’ve misunderstood, could you please provide further clarification?

Yes, you can gradually complete the refactoring through multiple PRs.

funky-eyes avatar Feb 22 '25 10:02 funky-eyes

Yes, you can gradually complete the refactoring through multiple PRs.

Whenever you have time, could you create an issue related to this? I’d also really appreciate it if you could add it as a sub-issue under the main one. 🙂

YongGoose avatar Feb 22 '25 10:02 YongGoose

@funky-eyes

If you could clarify which specific areas this PR affects, I'll review it and create an issue before proceeding with the work. I'm still not sure which areas this PR affects. 😅

YongGoose avatar Feb 23 '25 04:02 YongGoose

I see that you've submitted a PR, but I'm not quite sure what exactly you need me to confirm or check for you.

funky-eyes avatar Feb 24 '25 01:02 funky-eyes

I see that you've submitted a PR, but I'm not quite sure what exactly you need me to confirm or check for you.

You mean the PR or the comment?

YongGoose avatar Feb 24 '25 01:02 YongGoose

@funky-eyes

For the PR, I have refactored the Result class according to the discussion we had in the comments.

  • https://github.com/apache/incubator-seata/pull/7157#issuecomment-2650089338

Please review that part when you get a chance.

Also, in your comment, you mentioned that my PR affects other parts, but I wasn’t sure exactly which areas you were referring to. Could you clarify which parts are impacted?

  • https://github.com/apache/incubator-seata/issues/7158#issuecomment-2676123659

YongGoose avatar Feb 24 '25 01:02 YongGoose

My point is that, based on the scope of changes you described (the Seata module), the impacted areas appear to be within the expected scope.

funky-eyes avatar Feb 24 '25 02:02 funky-eyes