Commit Graph

53 Commits

Author SHA1 Message Date
kvanerum ac9bef6435
Add Boolean#parseBoolean and Boolean.valueOf to forbidden-apis (#129684)
In a follow up (#128993) remaining lenient usage of booleans will be deprecated, to eventually remove everything except for a few places requiring lenient parsing by means of Booleans.parseBooleanLenient - which is a wrapper around Boolean.parseBoolean.
---------

Co-authored-by: Moritz Mack <mmack@apache.org>
2025-07-08 14:09:10 +02:00
Rene Groeschke 38c90ca8d4
Restructure docker files for docker distributions (#127960)
Restructures docker files for docker distributions

- Put Dockerfiles in specific distro specific folders keeping "Dockerfile" naming convention
- Allows better ide support
- Allows easier renovate integration
- Explicitly set base image in dockerfile
- simplify renovate configuration
- Cleanup DockerBase file to not contain ess fips base image information

This lives now in the Dockerfile content directly

* Workaround docker test issue

* Fix labels for fips image
2025-05-19 19:47:34 +02:00
Rene Groeschke f0d7ec47b5
[Test] Rework detecting elasticsearch process in docker tests (#128013)
* [Test] Rework detecting elasticsearch process in docker tests

This tweaks detecting the elasticsearch process id by using jps instead of ps which has been problematic in the past exceeding available COLUMN sizes due to es commandline invocation getting longer and longer

* Remove few muted tests

* Reuse ps for detecting processes but use pipe to find the right one

jps doesnt work well with different users

* Tweak java command running lookup to work with wolfi

* Cleanup changes

* [CI] Auto commit changes from spotless

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
2025-05-16 09:05:59 -07:00
Lorenzo Dematté 69f6520b0c
[Entitlements] Validation checks on paths (#126852)
With this PR we restrict the paths we allow access to, forbidding plugins to specify/request entitlements for reading or writing to specific protected directories.

I added this validation to EntitlementInitialization, as I wanted to fail fast and this is the earliest occurrence where we have all we need: PathLookup to resolve relative paths, policies (for plugins, server, agents) and the Paths for the specific directories we want to protect.

Relates to ES-10918
2025-04-18 15:36:07 +02:00
Armin Braun 50437e79d3
Cleanup missing use of StandardCharsets (#125424)
Random annoyance that I figured, I'd just fix globally:
We can do a bit of a cleaner job when doing byte <-> string conversion here and there.
2025-03-21 20:10:15 +01:00
Rene Groeschke 38f243944e
Fix failing docker packaging tests due to too long commandline (#125053)
* Increate COLUMN for detecting running elasticsearch instance
* Unmute DockerTest test
2025-03-20 08:27:40 +01:00
Mark Vieira d61b86477d
Add jdk.management.agent module to server boot layer on start (#123938) 2025-03-04 11:32:42 -08:00
Mark Vieira d9c0ef156a
Fix enrollment packaging test when running on Java 24 (#123650) 2025-02-27 14:40:27 -08:00
Slobodan Adamović 52e0f21bdd
Enable queryable built-in roles feature by default (#120323)
Making the `es.queryable_built_in_roles_enabled` feature flag enabled by default.
This feature makes the built-in roles automatically indexed in `.security` index and available
for querying via Query Role API. The consequence of this is that `.security` index is now 
created eagerly (if it's not existing) on cluster formation.

In order to keep the scope of this PR small, the feature is disabled for some of the tests, 
because they are either non-trivial to adjust or the gain is not worthy the effort to do it now. 
The tests will be adjusted in a follow-up PR and later the flag will be removed completely.

Relates to #117581
2025-01-27 10:25:54 +01:00
Mark Vieira bf3edffedd
Use unsecure entropy source in docker packaging tests (#119598) 2025-01-06 11:06:30 -08:00
Mark Vieira 577d102740
Print thread dump when ES fails to start during Docker packaging tests (#119477) 2025-01-02 14:08:05 -08:00
Mariusz Józala bd18787af5
Change default container image to be based on UBI minimal instead of Ubuntu (#116739)
Previously default Docker image was based on Ubuntu. This changes the
base image for default to be UBI minimal.
2024-11-22 14:55:25 +01:00
Mariusz Józala 2ac267de3a
[ci] Add debian-12 to matrix in packaging and platform jobs (#116172)
Lintian test has been changed to parse the result instead of using exit
code. This was required, because now `mismatched-override` is
non-erasable tag which cannot be ignored for exit code.
Lintian introduced non-backward-compatible format change for overrides
file. Because of that, some overrides are now duplicated in a format for
 older versions.
Additionally, Lintian overrides file has been cleaned up to remove the
tags which are no longer failing.
2024-11-22 10:02:03 +01:00
Rene Groeschke 8a398e8302
[CI] Remove test support for windows 2016 and 2019 (#116324)
* Remove test coverage for windows 2016 and 2019

Follow up on https://github.com/elastic/elasticsearch/issues/116299 due to
ml dropping support for windows < 2022

* Unmute archive tests
2024-11-06 17:27:35 +01:00
Rene Groeschke 604722c964 Mute ArchiveTests for now until
see https://github.com/elastic/elasticsearch/issues/116299
2024-11-06 13:23:27 +01:00
Rene Groeschke a902878e96 Mute ArchiveTests on windows
see https://github.com/elastic/elasticsearch/issues/116299
2024-11-06 11:36:57 +01:00
Pooya Salehi dee518612f Mute ArchiveTests#test41AutoconfigurationNotTriggeredWhenNodeCannotContainData 2024-11-06 09:45:57 +01:00
Mark Vieira f3d4d575d8
Increase startup timeout in EnrollmentProcessTests (#116039)
Closes #114885
2024-11-01 06:48:55 +11:00
Craig Taverner c9c1765986
Remove duplicate 'the the' (#116023)
There were many places where `the the` was typed, in comments, docs and messages. All were incorrect and replaces with a single `the`
2024-10-31 19:14:58 +01:00
Ryan Ernst e5d5c17c99
Use directory name as project name for libs (#115720)
The libs projects are configured to all begin with `elasticsearch-`.
While this is desireable for the artifacts to contain this consistent
prefix, it means the project names don't match up with their
directories. Additionally, it creates complexities for subproject naming
that must be manually adjusted.

This commit adjusts the project names for those under libs to be their
directory names. The resulting artifacts for these libs are kept the
same, all beginning with `elasticsearch-`.
2024-10-29 13:02:28 -07:00
Rene Groeschke 482d2aced5
Remove unused elasticsearch cloud docker image (#115357) 2024-10-25 02:58:36 +11:00
Rene Groeschke f1f5ee06a3
Replace cloud-ess docker image with wolfi-ess (#114413)
* Replace cloud-ess docker image with wolfi-ess
   We just replaced the existing implementation of cloud-ess with what was wolfi-ess which is a wolfi based ess image. 
   The cloud image itself will be removed in a future commit it was not used anywhere

* Switch to test cloud docker image instead of default docker in packaging pr tests. 
  This adds way more coverage than the default docker image which is also barely touched
2024-10-11 21:58:15 +02:00
Rene Groeschke 54c83d7fa7
Add wolfi ess docker image (#113810) 2024-10-04 11:01:49 +02:00
Brian Seeders fba8045d99
[docker] Rename -ubi8 suffix to -ubi (#112884)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-09-26 15:57:50 -04:00
Brian Seeders e9b303322c
Fix packaging tests after addition of new wolfi-based image (#112831)
* Add more missing wolfi references to fix tests
* packaging tests require access to docker registry
* Fix symlink for es distributions jdk cacerts in wolfi docker
* Fix native support on wolfi images
* Fix provided keystore packaging tests for wolfi
* Add utils used for testing to wolfi image
* Explicitly set default shell to bash in docker images
* Fix docker config issues
* Apply review feedback around docker login

---------

Co-authored-by: Rene Groeschke <rene@elastic.co>
2024-09-26 11:11:01 +02:00
Mark Vieira a59c182f9f
Add AGPLv3 as a supported license 2024-09-13 15:29:46 -07:00
Ryan Ernst 0cf9c54f65
Fix windows memory locking (#111866)
Memory locking on Windows with the bundled jdk was broken by native
access refactoring. This commit fixes the linking issue, as well as adds
a packaging test to ensure memory locking is invoked on all supported
platforms.
2024-08-15 12:00:41 -07:00
Mark Vieira acb5ab1134
Make ConfigurationTests.test20HostnameSubstitution more resilient (#111216)
This is an attempt to fix occasional test failures where asserting on a
request response fails because the cluster has not finished
initialization and cannot yet serve requests.

Closes #109660
2024-07-24 09:27:26 +10:00
Mark Vieira ce3bc5db13
Make docker packaging test more resilient (#111205)
Wrap check for container shutdown log message in an `assertBusy()` to
deal with race conditions.

Closes #111132
2024-07-24 04:41:28 +10:00
Mark Vieira 943c12abe1
Unmute DockerTests.test600Interrupt (#111165)
Investigating https://github.com/elastic/elasticsearch/issues/111132 and
it seems this test has been muted on `main` for some time. Let's unmute,
to see if this is specific to the 7.17 branch or not.
2024-07-23 04:35:55 +10:00
Rene Groeschke 320f2414aa
Ignore configs from DistributionDownload plugin and bwc for resolveAllDependencies (#110828) 2024-07-12 17:17:55 +02:00
Rene Groeschke 816cedc217
[CI] Do not cache any es distros when creating ci images (#110742) 2024-07-11 13:00:11 +02:00
Rene Groeschke facabf627b
[Gradle] Only resolve latest patch version for resolveAllDependencies (#110584)
* Only resolve latest patch version for resolveAllDependencies

This should avoid downloading to many elasticsearch distributions
and reduce disk usage and speed up image creations.

* Some cleanup
2024-07-08 15:34:16 +02:00
Mark Vieira 44f5968448
Adjust packaging test exit code assertion (#109879) 2024-06-18 13:33:44 -07:00
Benjamin Trent b147d07533
Muting PackageTests class #109852 (#109874)
* Muting PackageTests class #109852

* fixing mute
2024-06-18 12:13:50 -04:00
Benjamin Trent 429c970dd3
Muting test70RestartServer for issue #109852 (#109860) 2024-06-19 00:06:01 +10:00
David Turner e66cb6c632 AwaitsFix for #109852 2024-06-18 13:30:34 +01:00
Ryan Ernst a4588c0e3f
Run bootstrap checks in packaging tests (#109031)
Bootstrap checks are an important part of ensuring proper Elasticsearch
configuration. They are often system dependent, so checking they work on
each supported platform should be part of testing. This commit adjusts
packaging tests to enable bootstrap checks.
2024-05-24 18:32:37 -04:00
Ryan Ernst b37d9358e7
Fix DockerTests.dumpDebug to read the container logs (#108652)
This commit overrides dumpDebug for DockerTests to pull the log from
docker rather than looking in the filesystem.
2024-05-15 19:23:06 -04:00
Ryan Ernst 9ae678da81
Wait for readiness in docker readiness test (#108681)
Previously readiness waited only on a master node being elected.
Recently it was also made to wait on file settings being applied. Yet
the node may be fully started before those file settings are applied.
The test expected readiness was ok after the node finishes starting.

This commit retries the readiness check until it succeeds since
readiness state will be updated async to the node finishing starting.

closes #108523
2024-05-15 15:29:06 -07:00
Nikolaj Volgushev e6d38bb43b
Mute test500Readiness (#108661)
Mute for: https://github.com/elastic/elasticsearch/issues/108523
2024-05-15 04:28:50 -04:00
Ryan Ernst bf96968ea0
Debug docker readiness tests (#108587) 2024-05-13 21:53:39 -07:00
Mark Vieira 64ef2f42c2
AwaitsFix #108523 2024-05-10 17:19:48 -07:00
Mark Vieira e10b3d4b2b
Increase startup timeout in packaging tests (#108487) 2024-05-09 16:33:26 -07:00
Jake Landis 79e6e770f9
upgrade bouncy castle (non-fips) to 1.78.1 (#108223) 2024-05-03 16:10:20 -05:00
Mark Vieira 982c567d9a
Increase container size for machine dependent heap docker tests (#107797) 2024-04-23 16:29:31 -07:00
Kostas Krikellas d11048e7ff
Mute DocketTests.test150MachineDependentHeap (#107509)
Related to #104786
2024-04-16 04:34:18 -04:00
Ryan Ernst acb16ff36b
Improve packaging test debugging (#106491)
Packaging tests have several files that may be useful in debugging
failures. Additionally, we sometimes have assertions for which we want
to catch them and emit additional debugging info. This commit guards
the common ways that Elasticsearch is started and assertions are run
with dumping all debug information available.
2024-03-19 11:14:18 -07:00
Athena Brown 92c2b36e69
Decouple enrollment token version from node version (#104018)
This commit decouples the version used in enrollment tokens from node
version, as part of the larger effort to make versioning more granular.
The changes are relatively minimal, as the version encoded into
enrollment tokens is not actually used anywhere as far as I can tell,
either in Elasticsearch or Kibana, apart from checks that it is present.
That said, I've been around the block enough times to know better than
to remove a perfectly good version field that's already in something
like this.
2024-02-22 19:31:03 -05:00
William Brafford 0a4a052abc
Bring packaging tests README up to date (#102675) 2023-11-28 08:36:56 -05:00