Commit graph

141 commits

Author SHA1 Message Date
Alexander Spies
2703b802c8
Add cluster def link to CONTRIBUTING.md (#102979) 2023-12-05 14:29:21 +01:00
sabi0
8713ca82ac
Spelling and grammar fixes in repository docs (#102345)
- fixed a few typos
- normalized proper names: Gradle, GitHub, Maven, Elasticsearch, Spotless
- grammar fixes (commas, etc.)
- unified section titles style
2023-11-18 15:05:02 +00:00
Simon Cooper
ee17d09dcb
Add doc section about features to CONTRIBUTING (#102153) 2023-11-14 16:17:05 +00:00
Ryan Ernst
af756278e5
Remove uuids from TransportVersion constants (#99500)
This commit renames a few of the most recent TransportVersion constants
to have meaningful names. Going forward all constants should have
meaningful names. Since the names will now be unique, the uuid is no
longer needed to force merge conflicts, so they are removed.
2023-09-13 10:12:53 -07:00
Simon Cooper
71c4789d61
Add information on separated version numbers to Contributing doc (#97449) 2023-07-10 08:23:41 +01:00
Mark Vieira
6cdb789282
Update contributing doc to remove references to Java 11 support 2023-05-05 12:44:26 -07:00
samanhappy
49902fec39
remove unnecessary characters in contributing.md (#92429)
Co-authored-by: Stuart Tettemer <stu@elastic.co>
2023-03-29 14:07:53 -05:00
Jack Pan
7f47cfb45d
Correct row formatting in CONTRIBUTING.md (#94620) 2023-03-22 10:43:23 +00:00
David Turner
0cfb79526e
Note in CONTRIBUTING.md re. unsupported platforms (#93343)
We have an internal policy about contributions which target unsupported
platforms but this is not spelled out in the contributing guide. This
commit adds the missing info.

Relates #93341
2023-01-30 09:21:47 -05:00
Christoph Büscher
312a0e2b2b
Add reformat on save hint to contribution doc (#91693)
This change adds an optional step to the CONTRIBUTING.md docs on setting up
automatic code formatting to add it as a save action. This can help avoiding
running into spotless check errors later.
2022-11-18 14:51:41 +01:00
Luca Cavanna
9b841d8523
Add changelog mention (#89966)
External users tend to edit the changelog, which causes build errors for instance when the area is modified, and causes sync problems if later e.g. the title of the PR is updated.
2022-09-09 16:47:53 +02:00
Mark Vieira
ac9edce20c Update references to master branch in developer documentation 2022-07-25 10:59:08 -07:00
Iraklis Psaroudakis
f284cc16f4
Convert disk watermarks to RelativeByteSizeValues (#88719)
* Convert disk watermarks to RelativeByteSizeValues

Similar to the existing watermark setting for the frozen tier.

Pre-requisite for PR 88639 that plans to introduce max headroom
settings for the disk watermarks, similar to the frozen tier max
headroom setting.

* Add changelog

* Revert 20gb to 20GB

* Make formatNoTrailingZerosPercent non static

* ByteSizeValue.MINUS_ONE

* Remove getMinimumTotalSizeForBelowWatermark

* Remove comment

* Fix minor stuff

* Make parsing of RelativeByteSizeValue faster

Mimicks older definitelyNotPercentage function

* Remove Locale from Strings.format

* More MINUS_ONE
2022-07-22 18:39:07 +03:00
Benjamin Trent
2e0e3e2b66
Update CONTRIBUTING.md to include how to run failing tests (#88193)
Add a section on running failed tests as indicated by CI.
2022-06-30 08:43:01 -04:00
Przemyslaw Gomulka
db59a88a94
Add ParameterizedMessage to forbidden api (#87631)
ParameterizedMessage will not be part of the new ES logging API and therefore should not be used.
java.util.Supplier and String.format should be used instead.

this commit adds ParameterizedMessage to forbidden api

relates #86549
2022-06-14 17:06:21 +02:00
Ryan Ernst
12b98b37b6
Remove remaining single arg ParameterizedMessages (#86715)
This commit removes the remaining ParameterizedMessages that take a
single argument, this time where the argument contains method calls.
This was again done almost entirely through find/replace with regex in
IntelliJ.

relates #86549
2022-05-12 10:09:11 +02:00
Ryan Ernst
7be2df922c
Convert most single arg parameterized message to direct strings (#86649)
This commit converts most ParameterizedMessages which take one argument
to direct logging messages. This was done with regex search/replace in
IntelliJ. It does omits if those single arguments have any parenthesis
(cast or method call). Those will be done in a followup.

relates #86549
2022-05-11 14:49:27 -07:00
Mark Vieira
9ef2873e9f
Remove Eclipse IDE contributor documentation (#84724) 2022-03-07 11:32:15 -08:00
Chris Hegarty
ae8eeaedcb
Replace stack walking getLogger with explicit calls (#84480)
Replace the no-args LogManager::getLogger calls with the single-arg
variant that accepts a j.l.Class reference, which avoids the stack walk
of the no-args variant. The no-args variant determines the caller's
class by looking at the stack frame two positions from itself. The use
of the 1-args variant is more explicit and avoids the need for the stack
walk, while retaining the very same behaviour. Standardizing on the
1-args variant will reduce the need to have different ways to retrieve
logger references.
2022-03-02 09:42:20 +00:00
Artem Prigoda
6b904d79cb
[docs] Mention JDK 17 in the Contributing docs (#84018)
ES 8+ requires JDK 17 to be built
2022-02-16 15:52:20 +01:00
David Turner
b72825f601
Add guidance on logging to CONTRIBUTING.md (#75544)
Logging is important, but today we don't have any written guidance about
how we do it in Elasticsearch so contributors struggle to make an
informed decision about how to do it right. This commit adds some
guidance on logging to the contribution guide.
2022-01-18 12:48:34 -05:00
Justin Cranford
da783200ca
Update CONTRIBUTING.md (#80106)
* Update CONTRIBUTING.md

Manual steps in the Formatting section to setup ECF did not work for me.

Added alternative steps to import build-conventions/formatterConfig.xml
into IntelliJ 2021.2.3 Ultimate on Windows.
2022-01-06 12:46:14 -05:00
Nik Everett
03954f1e8d
Update eclipse instructions (#81833)
We need 2012-12 now to properly support escaped text blocks.
2021-12-17 09:07:23 -05:00
Rory Hunter
5b49982309
Formatting escape hatch (#81806)
Thanks to https://bugs.eclipse.org/bugs/show_bug.cgi?id=574437,
we've run into a situation where Spotless is incorrectly formatting
a particular piece of syntax (due the underlying Eclipse bug). We
were able to turn off formatting of this syntax using `// @formatter:off`
and `// @formatter:on`, but there was a further problem. We configure
IntelliJ to use the Eclipse formatter plugin, but this doesn't
respect the `@formatter` tags since these are set at the Spotless
level, not the Eclipse formatter level. Note that these tags aren't
set in the Eclipse formatter config, because there we use `// tag::`
and `// end::` in order to avoid reformatting docs snippets, which
have a much narrower line width.

What a mess.

So, to get around all this, drop the `@formatter` tags and tweak
our custom `SnippetLengthCheck` Checkstyle rule so that
`// tag:noformat` regions are not subject to the narrower line length
check, but are still exempt from formatting.
2021-12-16 16:18:34 +00:00
Nik Everett
c9776a9c11 Update Eclipse instructions for Java 17
We need Eclipse 2021-09 with an update installed to use Java 17.
2021-12-06 16:03:31 -05:00
Nik Everett
3fe664815e Bump Eclipse import JDK version
We're on JDK 17 now. If you don't have it then Eclipse fails to import.
2021-12-06 15:46:29 -05:00
Artem Prigoda
df9cc6b7b5
Update required JAVA_HOME variables for running tests (#80145)
I believe ES gets tested now against only JDK 8, 11, and 17, so you would need to have only `JAVA8_HOME`, `JAVA11_HOME`, and `JAVA17_HOME` set up in order to run the tests locally.
2021-11-04 10:42:43 +01:00
Rory Hunter
62d2df4f6a
Format build-tools and build-tools-internal (#78910)
Our spotless configuration wasn't being applied to `build-tools`
and `build-tools-internal`. Move the Spotless configuration to a
Java plugin in `build-conventions`, and apply it everywhere.

This resulted in a lot more Java files being subject to formatting,
so I added more exclusions to the list.

Also remove the `paddedCell` stuff, we've never needed it.
2021-10-14 09:38:06 +01:00
Rene Groeschke
eec1a181c9
Document general gradle build guidelines (#76551)
This introduces a general document to track guidelines for working on and with
the elasticsearch gradle build

Co-authored-by: Rory Hunter <pugnascotia@users.noreply.github.com>
2021-09-01 09:32:01 +02:00
Rory Hunter
128a7e7744
Fix compiler warnings in :server - part 3 (#76024)
Part of #40366. Fix a number of javac issues when linting is enforced in `server/`.
2021-08-10 15:05:55 +01:00
Rory Hunter
a5d2251064
Order imports when reformatting (#74059)
Change the formatter config to sort / order imports, and reformat the
codebase. We already had a config file for Eclipse users, so Spotless now
uses that.

The "Eclipse Code Formatter" plugin ought to be able to use this file as
well for import ordering, but in my experiments the results were poor.
Instead, use IntelliJ's `.editorconfig` support to configure import
ordering.

I've also added a config file for the formatter plugin.

Other changes:
   * I've quietly enabled the `toggleOnOff` option for Spotless. It was
     already possible to disable formatting for sections using the markers
     for docs snippets, so enabling this option just accepts this reality
     and makes it possible via `formatter:off` and `formatter:on` without
     the restrictions around line length. It should still only be used as
     a very last resort and with good reason.
   * I've removed mention of the `paddedCell` option from the contributing
     guide, since I haven't had to use that option for a very long time. I
     moved the docs to the spotless config.
2021-06-16 09:22:22 +01:00
Nik Everett
b34329ea57 Update JVM version in CONTRIBUTING.md
We build against Java 16 now. We should tell folks that.
2021-06-14 14:25:14 -04:00
Mark Vieira
1f1c8b0019
Move custom checkstyle rule implementations to build-conventions project (#74017) 2021-06-10 16:06:44 -07:00
Rene Groeschke
dce50a47e2
Update contributing.md after renaming buildSrc to build-tools-internal 2021-06-01 12:45:19 +02:00
Nik Everett
8ae92b5111
Add some notes on javadoc to CONTRIBUTING (#71924)
I've been writing a bunch of javadoc lately and have some opinions that
I feel might be useful to share in CONTRIBUTING.md. I'm no expert
though.
2021-04-20 13:00:17 -04:00
Jay Modi
e77b601d31
Update contributing with Java 15 requirement (#69824)
The build has been updated to require JDK15 for compilation but the
contributing docs were out of date. This commit updates the docs to
have the correct JDK requirement.
2021-03-02 10:49:43 -07:00
Adrien Grand
81afc665a5 Replace "open source" with "free and open" in the CONTRIBUTING guidelines. 2021-02-15 09:14:53 +01:00
Rory Hunter
2a93bbfefe Update negative boolean point in the style guide 2021-02-09 10:13:03 +00:00
Rory Hunter
a7eca5196a Fix Checkstyle guide for adding build-tools JAR
For configuring Checkstyle, the `CONTRIBUTING.md` guide said to point
the plugin at a jar file under `buildSrc/build/distributions`, but this
directory isn't guaranteed to exist, and gets removed by running the
`clean` task.

Instead, refer to a path under `buildSrc/build-bootstrap`, which will
always exist.
2021-02-05 13:30:39 +00:00
Rory Hunter
8114aee935
Apply custom Checkstyle rules in IntelliJ (#68417)
It turns out you can configure custom Checkstyle rules using the plugin
for IntelliJ, you just have to tell the plugin where to find the code.
Therefore, update the contributing docs with the necessary process.

Also fork the Checkstyle rule `MissingJavadocTypeCheck` so that we can
disable it for test classes. While it's useful to describe test cases in
test methods' Javadoc, this is somewhat less true for test classes
themselves.
2021-02-04 09:50:50 +00:00
Mark Vieira
a92a647b9f Update sources with new SSPL+Elastic-2.0 license headers
As per the new licensing change for Elasticsearch and Kibana this commit
moves existing Apache 2.0 licensed source code to the new dual license
SSPL+Elastic license 2.0. In addition, existing x-pack code now uses
the new version 2.0 of the Elastic license. Full changes include:

 - Updating LICENSE and NOTICE files throughout the code base, as well
   as those packaged in our published artifacts
 - Update IDE integration to now use the new license header on newly
   created source files
 - Remove references to the "OSS" distribution from our documentation
 - Update build time verification checks to no longer allow Apache 2.0
   license header in Elasticsearch source code
 - Replace all existing Apache 2.0 license headers for non-xpack code
   with updated header (vendored code with Apache 2.0 headers obviously
   remains the same).
 - Replace all Elastic license 1.0 headers with new 2.0 header in xpack.
2021-02-02 16:10:53 -08:00
Rory Hunter
a9118e0b8b
Move the generated checkstyle config to root dir (#66442)
Storing the generated config in the `build` dir meant that it could be
removed for various reasons, which causes e.g. IntelliJ to pop up
dialog, and is a mild annoyance. Instead, write the file to the project
root.

Also inline the path to the suppressions config, which removes a step
from the setup instructions.
2020-12-16 13:49:59 +00:00
Dan Hermann
03e43163ee
Add command for manually generating Checkstyle config (#66421) 2020-12-16 12:34:27 +00:00
Rory Hunter
a67a5f9216
Generate an IDE-compatible checkstyle configuration (#66109)
With a few changes, our checkstyle config can be used by e.g. IntelliJ's
Checkstyle plugin. Add a task to generate this file automatically, and
create the necessary IntelliJ config to use it.

Also add a line-length setting to .editorconfig.
2020-12-14 13:47:28 +00:00
Adam Locke
b4029baca8
[DOCS] Add Elastic Contributor Program (#64440)
Adds a description of and link to the Elastic Contributor Program.
2020-11-03 08:32:10 -05:00
Dawid Weiss
1fb1e3f39e
[DOCS] Fix typo in contributing docs (#63481)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-10-12 10:47:40 -04:00
Ayush Eshan
71fcaa41d8
[Docs] Fixed a couple of typos in CONTRIBUTING (#63205)
Fixed a couple of typos in contribution guide.
2020-10-05 15:24:53 +02:00
Colin Goodheart-Smithe
679da50225
Adds tips for code changes (#60723) 2020-08-12 09:59:04 +01:00
Rene Groeschke
c2dc5ad12d
Update Gradle configurations section in CONTRIBUTING (#59906) 2020-07-22 09:11:47 +02:00
David Turner
383051be61
Add section on reviews to CONTRIBUTING.md (#57046)
The review phase is an important part of contributing to Elasticsearch, but we
do not mention it in our instructions to contributors. This commit adds some
notes on how contributions are reviewed and describes some common reasons for
rejection.

Co-authored-by: Colin Goodheart-Smithe <colings86@users.noreply.github.com>
2020-07-03 08:03:03 +01:00