Skip to content

Conversation

@YongGoose
Copy link
Member

@YongGoose YongGoose commented Jun 19, 2025

  • I have registered the PR changes.

Workflow Updates:

  • Added a new Spotless Check workflow: Introduced .github/workflows/spotless-check.yml to ensure code formatting compliance using Spotless. This workflow runs on specific branches and pull request events.
  • Enhanced build failure handling: Updated .github/workflows/rerun-build.yml to include a step for detecting Spotless-related failures and skipping retries if the failure is due to Spotless violations.

Workflow Modifications:

  • Removed Checkstyle from Java 8 test step: Updated .github/workflows/build.yml to exclude Checkstyle checks from the Maven test step for Java 8, simplifying the build process.

@codecov
Copy link

codecov bot commented Jun 19, 2025

Codecov Report

Attention: Patch coverage is 60.58091% with 190 lines in your changes missing coverage. Please review.

Project coverage is 60.18%. Comparing base (ac9c8ba) to head (f8466f4).
Report is 2 commits behind head on 2.x.

Files with missing lines Patch % Lines
...java/io/seata/tm/api/DefaultGlobalTransaction.java 9.09% 20 Missing ⚠️
...eata/saga/engine/store/impl/StateLogStoreImpl.java 17.39% 19 Missing ⚠️
...pache/seata/config/consul/ConsulConfiguration.java 40.62% 18 Missing and 1 partial ⚠️
...a/org/apache/seata/common/util/HttpClientUtil.java 56.66% 13 Missing ⚠️
...egration/tx/api/interceptor/ActionContextUtil.java 0.00% 13 Missing ⚠️
...ain/java/io/seata/saga/rm/SagaResourceManager.java 7.69% 12 Missing ⚠️
...che/seata/common/loader/EnhancedServiceLoader.java 76.31% 9 Missing ⚠️
...ta/spring/annotation/GlobalTransactionScanner.java 0.00% 9 Missing ⚠️
...ain/java/org/apache/seata/common/util/NetUtil.java 57.14% 6 Missing ⚠️
...ava/io/seata/tm/api/DefaultFailureHandlerImpl.java 25.00% 6 Missing ⚠️
... and 32 more
Additional details and impacted files
@@             Coverage Diff              @@
##                2.x    #7450      +/-   ##
============================================
+ Coverage     60.01%   60.18%   +0.17%     
- Complexity      648      658      +10     
============================================
  Files          1281     1281              
  Lines         46280    48233    +1953     
  Branches       5580     5675      +95     
============================================
+ Hits          27773    29031    +1258     
- Misses        15930    16599     +669     
- Partials       2577     2603      +26     
Files with missing lines Coverage Δ
...ava/org/apache/seata/common/ConfigurationKeys.java 0.00% <ø> (ø)
...c/main/java/org/apache/seata/common/Constants.java 100.00% <ø> (ø)
...in/java/org/apache/seata/common/DefaultValues.java 100.00% <ø> (ø)
...mon/src/main/java/org/apache/seata/common/XID.java 95.65% <100.00%> (+3.34%) ⬆️
...ommon/exception/AuthenticationFailedException.java 100.00% <ø> (ø)
...he/seata/common/exception/DataAccessException.java 100.00% <ø> (ø)
...a/org/apache/seata/common/exception/ErrorCode.java 100.00% <ø> (ø)
...g/apache/seata/common/exception/ExceptionUtil.java 100.00% <ø> (ø)
...che/seata/common/exception/FrameworkErrorCode.java 96.29% <100.00%> (ø)
...che/seata/common/exception/JsonParseException.java 100.00% <ø> (ø)
... and 124 more

... and 746 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@YongGoose YongGoose marked this pull request as ready for review June 19, 2025 03:24
@YongGoose
Copy link
Member Author

@funky-eyes @jsbxyyx

PTAL!

@YongGoose YongGoose requested a review from Copilot June 19, 2025 03:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR applies Spotless formatting to the entire codebase, ensuring consistency in code style and cleaning up extraneous whitespace.

  • Reformatting of Java classes in the exception package and common utility classes
  • Updates to GitHub workflow files to enforce and check code formatting violations
  • Minor adjustments such as inlining empty constructor bodies and multi-line string concatenation

Reviewed Changes

Copilot reviewed 19 out of 1956 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
common/src/main/java/org/apache/seata/common/exception/SeataRuntimeException.java Added a blank line for formatting consistency
common/src/main/java/org/apache/seata/common/exception/RetryableException.java Removed redundant blank lines
common/src/main/java/org/apache/seata/common/exception/ResourceBundleUtil.java Refactored string builder formatting and adjusted exception throws across multiple lines
common/src/main/java/org/apache/seata/common/exception/ParseEndpointException.java Reformatted constructor definitions
common/src/main/java/org/apache/seata/common/exception/JsonParseException.java Removed extraneous blank line
common/src/main/java/org/apache/seata/common/exception/FrameworkException.java Reformatted import and spacing
common/src/main/java/org/apache/seata/common/exception/FrameworkErrorCode.java Reformatted enum constant definitions
common/src/main/java/org/apache/seata/common/exception/ExceptionUtil.java Reformatted private constructor definition
common/src/main/java/org/apache/seata/common/exception/ErrorCode.java Removed extra whitespace
common/src/main/java/org/apache/seata/common/exception/DataAccessException.java Removed superfluous blank lines
common/src/main/java/org/apache/seata/common/exception/AuthenticationFailedException.java Adjusted spacing by removing an unnecessary blank line
common/src/main/java/org/apache/seata/common/exception/AbstractRemoteResourceBundle.java Rewrote empty class body in a single line for brevity
common/src/main/java/org/apache/seata/common/XID.java Updated multi-line StringBuilder usage for readability
common/src/main/java/org/apache/seata/common/NamingServerConstants.java Trimmed trailing blank line
common/src/main/java/org/apache/seata/common/Constants.java Removed superfluous whitespace
common/src/main/java/org/apache/seata/common/ConfigurationKeys.java Reformatted constant definitions to span multiple lines for clarity
.github/workflows/spotless-check.yml Added a new workflow to enforce Spotless formatting checks
.github/workflows/rerun-build.yml Enhanced workflow logic to conditionally rerun builds based on spotless failure detection
.github/workflows/build.yml Adjusted job names and removed the checkstyle flag for Java 8 builds

@YongGoose
Copy link
Member Author

Should we keep the CheckStyle dependency, or remove it?

@funky-eyes
Copy link
Contributor

If Spotless Check is already being used as a replacement, then I believe CheckStyle is no longer necessary @xingfudeshi PTAL

@funky-eyes funky-eyes added this to the 2.5.0 milestone Jun 19, 2025
@YongGoose
Copy link
Member Author

Remove checkstyle dependency

Done in 732fd15 !

Copy link
Contributor

@funky-eyes funky-eyes left a comment

Choose a reason for hiding this comment

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

LGTM

@funky-eyes funky-eyes requested a review from xingfudeshi June 20, 2025 14:48
Copy link
Member

@xingfudeshi xingfudeshi left a comment

Choose a reason for hiding this comment

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

LGTM

@funky-eyes
Copy link
Contributor

Signed-off-by: yongjunhong <[email protected]>
@YongGoose
Copy link
Member Author

@funky-eyes
Copy link
Contributor

Spotless Check / spotless (pull_request)
Spotless Check / spotless (pull_request)Failing after 22s

Signed-off-by: yongjunhong <[email protected]>
@YongGoose
Copy link
Member Author

Spotless Check / spotless (pull_request) Spotless Check / spotless (pull_request)Failing after 22s

PTAL!

@YongGoose YongGoose changed the title optimize: Apply Spotless to the entire codebase. optimize: Apply Spotless to the entire codebase Jun 21, 2025
@funky-eyes funky-eyes merged commit 3fc133e into apache:2.x Jun 21, 2025
10 checks passed
slievrly pushed a commit to slievrly/fescar that referenced this pull request Oct 21, 2025
* Add spotless-check.yml

Signed-off-by: yongjunhong <[email protected]>

* when spotless check fails do not retry

Signed-off-by: yongjunhong <[email protected]>

* apply spotless to entire codebase

Signed-off-by: yongjunhong <[email protected]>

* Remove checkstyle dependency

Signed-off-by: yongjunhong <[email protected]>

* Remove checkstyle dependency

Signed-off-by: yongjunhong <[email protected]>

* Add changes

Signed-off-by: yongjunhong <[email protected]>

* Apply spotless

Signed-off-by: yongjunhong <[email protected]>

---------

Signed-off-by: yongjunhong <[email protected]>
Co-authored-by: funkye <[email protected]>
YvCeung pushed a commit to YvCeung/incubator-seata that referenced this pull request Dec 25, 2025
* Add spotless-check.yml

Signed-off-by: yongjunhong <[email protected]>

* when spotless check fails do not retry

Signed-off-by: yongjunhong <[email protected]>

* apply spotless to entire codebase

Signed-off-by: yongjunhong <[email protected]>

* Remove checkstyle dependency

Signed-off-by: yongjunhong <[email protected]>

* Remove checkstyle dependency

Signed-off-by: yongjunhong <[email protected]>

* Add changes

Signed-off-by: yongjunhong <[email protected]>

* Apply spotless

Signed-off-by: yongjunhong <[email protected]>

---------

Signed-off-by: yongjunhong <[email protected]>
Co-authored-by: funkye <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants