Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Configure spotless plugin and enable code formatting #276

Merged
merged 2 commits into from
Mar 25, 2021
Merged

Conversation

jotok
Copy link
Contributor

@jotok jotok commented Feb 9, 2021

This PR adds code formatting rules to the spotless plugin configuration and adds the spotlessApply target as a dependency of the compileJava target. This means that source files will be automatically formatted during the compilation step.

The plugin is configured to "ratchet from" the main github branch. This means that code formatting will only be applied to source files that are touched in a given PR. This is to avoid creating a huge PR by reformatting every Java file at once. In order to demonstrate the plugin in this PR I triggered formatting for two source files only.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ktkrg ktkrg self-requested a review February 9, 2021 19:51
ktkrg
ktkrg previously approved these changes Feb 9, 2021
Copy link
Contributor

@yu-sun-77 yu-sun-77 left a comment

Choose a reason for hiding this comment

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

Can we run github workflow and make sure all the checks are passing? Otherwise LGTM.

@codecov
Copy link

codecov bot commented Feb 10, 2021

Codecov Report

❗ No coverage uploaded for pull request base (main@d49a701). Click here to learn what that means.
The diff coverage is n/a.

❗ Current head 6e0f2a4 differs from pull request most recent head 4a7543a. Consider uploading reports for the commit 4a7543a to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##             main     #276   +/-   ##
=======================================
  Coverage        ?   80.00%           
  Complexity      ?      319           
=======================================
  Files           ?       39           
  Lines           ?     1775           
  Branches        ?      134           
=======================================
  Hits            ?     1420           
  Misses          ?      253           
  Partials        ?      102           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d49a701...4a7543a. Read the comment docs.

yu-sun-77
yu-sun-77 previously approved these changes Feb 10, 2021
Copy link
Contributor

@yu-sun-77 yu-sun-77 left a comment

Choose a reason for hiding this comment

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

LGTM

@jotok jotok force-pushed the spotless-configure branch 2 times, most recently from ed807d9 to 8210400 Compare March 8, 2021 21:38
@hxiao608 hxiao608 self-requested a review March 25, 2021 00:39
Copy link
Contributor

@yu-sun-77 yu-sun-77 left a comment

Choose a reason for hiding this comment

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

Can we create 2 issues to track the following item before merging?
1.track failed UT
2.track code coverage check

Otherwise LGTM.

Copy link

@hxiao608 hxiao608 left a comment

Choose a reason for hiding this comment

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

LGTM!

@jotok
Copy link
Contributor Author

jotok commented Mar 25, 2021

Tracking issues for the code coverage failure and the flaky tests: #298 #299

@jotok jotok merged commit 3e6b8ec into main Mar 25, 2021
@jotok jotok deleted the spotless-configure branch March 25, 2021 02:07
khushbr pushed a commit that referenced this pull request Jun 10, 2021
cr https://code.amazon.com/reviews/CR-50314382

commit 2eb3872b0d3bfde09719497440019eeb7061dd7b
Merge: fa1ac709 a3877ba
Author: Khushboo Rajput <[email protected]>
Date:   Tue May 4 21:08:59 2021 -0700

    Merge branch 'main' into aes_7.10_nightly

commit fa1ac70933ae5c1939c4a0fa30f50f81925a07ab
Merge: fac4f8b8 c70b19d
Author: Khushboo Rajput <[email protected]>
Date:   Tue May 4 21:04:35 2021 -0700

    Merge branch 'aes_7.10_gh' into aes_7.10_nightly

commit a3877ba
Author: Sruti Parthiban <[email protected]>
Date:   Thu Apr 15 12:21:34 2021 -0700

    Fix format error (#309)

commit 7e0d2f8
Author: Sruti Parthiban <[email protected]>
Date:   Thu Apr 15 11:30:34 2021 -0700

    Fix failing election term tests (#305)

commit ea643fe
Author: meetshah777 <[email protected]>
Date:   Thu Apr 1 02:29:45 2021 +0530

    Changed master total PendingQueueSize to PendingQueueSize per task type (#296)

    * Changed master total PendingQueueSize to PendingQueueSize per task type

    * Addressed comments

    Co-authored-by: Meet Shah <[email protected]>

commit bf6a4cc
Author: meetshah777 <[email protected]>
Date:   Thu Apr 1 02:27:24 2021 +0530

    Added Election Term Metric (#297)

    * Changed master total PendingQueueSize to PendingQueueSize per task type

    * Added Election Term Metric

    * Formmated files

    * Merge conflict resolved

    * Addressed comments

    Co-authored-by: Meet Shah <[email protected]>

commit 130a494
Author: Mital Awachat <[email protected]>
Date:   Thu Mar 25 23:35:49 2021 +0530

    AdmissionControl: Clear metricQueue before running test (#300)

    Co-authored-by: Mital Awachat <[email protected]>

commit 3e6b8ec
Author: Joshua Tokle <[email protected]>
Date:   Wed Mar 24 19:07:06 2021 -0700

    Configure spotless plugin and enable code formatting (#276)

    * Configure spotless plugin and enable code formatting

    * Remove checkstyle and @ignore flaky tests

commit fac4f8b835e793e3db5240f1e4d1448fd9d16baa
Merge: 253229a2 f7b430b
Author: Khushboo Rajput <[email protected]>
Date:   Tue Mar 23 17:14:37 2021 -0700

    Merge branch 'main' into aes_7.10_nightly

commit f7b430b
Author: Dharmesh <[email protected]>
Date:   Wed Mar 24 05:25:20 2021 +0530

    [Build Fix]Removing the typecasting to IndexingPressure class to fix build failure while backporting (#293)

commit d49a701
Author: amathur1893 <[email protected]>
Date:   Thu Mar 18 02:51:11 2021 +0530

    Cluster state applier stats (#282)

    * Publish latency and failure metrics for cluster state applier thread

    * Publish latency and failure metrics for cluster state applier thread

    * Extract MetricsTracker

    * Add Javadoc for Metrics Tracker

    * Add ClusterStateApplierStats to collect latency and failure metrics

    * Add ClusterStateApplierStats to collect latency and failure metrics

    * Added UTs for ClusterApplierServiceStatsCollector

    * Added UTs for ClusterApplierServiceStatsCollector

    * Java doc changes

    Co-authored-by: Arpita Mathur <[email protected]>

commit 253229a24f49b5479333d8ffda7167441e39162a
Merge: 7c5cb8e6 52e5cc4
Author: Khushboo Rajput <[email protected]>
Date:   Mon Mar 8 22:06:07 2021 -0800

    Merge branch 'main' into aes_7.10_nightly

commit 52e5cc4
Author: Mital Awachat <[email protected]>
Date:   Tue Mar 9 10:49:11 2021 +0530

    Track admission control metrics (#290)

    * Track admission control metrics

    Co-authored-by: Mital Awachat <[email protected]>

commit c280915
Author: Dharmesh <[email protected]>
Date:   Thu Mar 4 23:12:37 2021 +0530

    [Bug Fix] Incorrect metric value was returned from the getter of current bytes (#287)

commit 7c5cb8e63cde9023084ab57075bbdf554df9748c
Merge: 28ee8302 a997189
Author: Khushboo Rajput <[email protected]>
Date:   Thu Mar 4 09:39:54 2021 -0800

    Merge branch 'main' into aes_7.10_nightly

commit a997189
Author: Dharmesh <[email protected]>
Date:   Thu Mar 4 10:55:36 2021 +0530

    Added metrics publishing logic (#285)

commit 28ee8302529c279dfadc47bf9b0d4f6b6d91ac75
Author: Dharmesh <[email protected]>
Date:   Tue Mar 2 23:49:47 2021 +0530

    Adding a additional check to just process first 50 objects of hot store (#284)

commit 0d2566a61bab1531400eaae486c3734bcea386fe
Author: Dharmesh <[email protected]>
Date:   Tue Mar 2 11:33:35 2021 +0530

    Changes to collect shard indexing pressure metrics and push to shared location (#278)

    * Changes to collect shard indexing pressure metrics and push to shared location

    * Code changes to remove pushing the cold store objects and removing isActiveShard flag as it becomes irrelevant now

    * Addressing comment to change NodeRole to IndexingStage as node role already has a predefined meaning

    * Checking if class is present while adding the collector in scheduled executor so that the collector will never be invoked if class in not present

    * Addressing comments.

commit 819d485
Author: Dharmesh <[email protected]>
Date:   Tue Mar 2 23:49:47 2021 +0530

    Adding a additional check to just process first 50 objects of hot store (#284)

commit 2f3df02
Author: Dharmesh <[email protected]>
Date:   Tue Mar 2 11:33:35 2021 +0530

    Changes to collect shard indexing pressure metrics and push to shared location (#278)

    * Changes to collect shard indexing pressure metrics and push to shared location

    * Code changes to remove pushing the cold store objects and removing isActiveShard flag as it becomes irrelevant now

    * Addressing comment to change NodeRole to IndexingStage as node role already has a predefined meaning

    * Checking if class is present while adding the collector in scheduled executor so that the collector will never be invoked if class in not present

    * Addressing comments.

commit 9f83059
Author: Yu Sun <[email protected]>
Date:   Fri Feb 26 14:36:02 2021 -0800

    Log error once only (#280)

commit 3377c2f
Author: Karthik Kumarguru <[email protected]>
Date:   Mon Feb 22 15:11:45 2021 -0800

    Increase the max heap limit to check against in the integ tests (#277)

commit 641b403f941596f543e95a01b9a5795b73d7fd65
Author: Khushboo Rajput <[email protected]>
Date:   Sat Feb 20 12:45:57 2021 -0800

    Creating new brand for ES 7.10 version
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants