225 Commits

Author SHA1 Message Date
github-actions[bot]
082f21e234 [graylog2-server] prepare for next development iteration 2026-01-26 12:07:21 +00:00
github-actions[bot]
7d047f6483 [graylog2-server] prepare release 7.1.0-alpha.2 2026-01-26 12:07:12 +00:00
Tomas Dvorak
aef80e887e Enable os3 client by default, via feature flag (#24626)
* Enable os3 client by default, via feature flag

* Added changelog

* more explicit UnsupportedSearchException logging

* add os3 modules to assembly, plugin providers and dependencies

* Add more dependencies to assembly

* switch os3 storage module packaging from assembly to shade

* Fix aliases impl in OS3 storage module

* fix manifest

* remove not used assembly.xml

* remove duplicate feature flag

* disable storage module 2 for testing

* fix errors found in full backend tests

* fix index block setting

* fix closed keyword (not used in graylog source)

* use old mechanism for resolving if index exists

* safer index deletion in ClientOS

* remove datanode testing instance from os2 storage module

* fix counts adapter and its test

* remove forgotten service provider

* add index closed exception mapping

* fix status parsing on timeout

* resilient CountsIT#totalThrowsElasticsearchExceptionIfIndexDoesNotExist test

* Index status enum(open/closed), naming conversion left to the storage module

* adapted comment

* code cleanup

---------

Co-authored-by: Matthias Oesterheld <matthias.oesterheld@graylog.com>
2026-01-26 08:36:54 +01:00
github-actions[bot]
c6ca5cb002 [graylog2-server] prepare for next development iteration 2025-12-01 13:04:26 +00:00
github-actions[bot]
a9355313df [graylog2-server] prepare release 7.1.0-alpha.1 2025-12-01 13:04:18 +00:00
github-actions[bot]
4e677e082a [graylog2-server] prepare for next development iteration 2025-12-01 12:30:39 +00:00
github-actions[bot]
f70e34c5ae [graylog2-server] prepare release 7.1.0-alpha.1 2025-12-01 12:30:30 +00:00
Kay Roepke
606f80d52a Migrate from JUnit 4 to 6 (#24012)
* add openrewrite infrastructure and necessary junit jupiter api deps

* update openrewrite docs and remove configLocation from plugin config, so we can override it

* initial openrewrite migration to junit5, work in progress

* replace rule with extension, use mongocollections instead of the instance

* fix parameterized test

* replace jukito with guice-extension for junit5 compatibility

* yet more mongocollections injection

* manually create MongoCollections where we need a custom objectmapper for subtypes

* fix license header

* replace junit4 conditional runner with enabledif static methods, only used in a single test anyway

* fix resource name collision in class loader test

* how did this ever compile?

* use explicit temp dir in tests, otherwise we'd need to create the directories

* add extension that tracks search instances and properly calls their clean up methods according to test lifecycle

* add comment explaining how the closing of testable search instances works with the extension

* use convert rule to extension

* convert rule to extension

* remove old import

* convert SkipDefaultIndexTemplateWatcher to junit5 extension api

* migrate from @Rule to @SearchInstance

* convert remaining @Rule to @SearchInstance

* clean up imports

* replace legacy RestoreSystemProperties rules with custom extension

* migrate all remaining junit4 references

* replace legacy system-rules dep with more modern one for system stream capturing

* remove unused junit4 import

* remove junit5-system-extensions, causes junit engine crashes

* remove legacy junit4 dependency for good :party:

* remove unnecessary openrewrite doc

* move forbiddenapi back out of profile, to avoid it being disabled when other profiles are explicitly given

* suppress forbidden api check for search instance detection

* remove jukito + vintage engine and adapt usage of legacy junit4 apis

* add core junit4 classes Test and Assert to forbidden apis

* replace forbidden junit4 api with junit6 equivalent

* remove guava testlib as it pulls in junit4, replaced FakeTicker with a simpler custom implementation for tests

* update testcontainers to 2.0.2 to get rid of the junit4 transitive dependency

needed to remove all ExternalResources
 * migrated MongoDBInstance to MongoDBTestService (basically identically anyway)
 * inlined some unnecessary interfaces

removed unused imports of junit4 classes

* migrate junit4 api usage

mockito with junit5 is much stricter about argument matcher types, so we need to adapt to Set -> Collection signature change

* actually start the container now that MongoDBInstance.java is gone

* improve test code

* simplify test case

* simplify test case

* simplify test case

* simplify test case

* simplify test case

* simplify test case

* forgot to remove the commented junit4 superclass

* rename MongoDBTestService#create methods to #createStarted and make start() private

* don't close the per-class mongodb instance for @Nested junit test classes

otherwise the first afterAll callback will destroy the instance and subsequent tests will fail
2025-11-20 15:09:03 +01:00
Kay Roepke
e0cf91db16 Refactor full-backend-tests and remove container matrix engine (#23535)
* first batch of changes to remove the matrix test engine

we are migrating matrix tests into github actions and controlling versions externally
this change starts moving the relevant container management code into the extension

this is work in progress, most tests will fail and fixtures aren't imported yet.
more sweeping changes need to be done to avoid constructor injection due to lifecycle calling order issues

* implement class-lifecycle container handling, and adjust inputcreationIT

* have junit close the backends when their store goes out of context, convert more tests

* we no longer need a vm shutdown hook, junit's extension takes care of the closing

* allow setting the mongodb and search server versions using system properties

* add support for requiring data node in tests, if we test functionality only present for that backend

* fix wrong check for data node and skipping tests, i've borked it

* convert constructor injection to lifecycle method

* convert constructor injection to lifecycle method

* convert constructor injection to lifecycle method

* convert constructor injection to lifecycle method

* convert constructor injection to lifecycle method

* convert constructor injection to lifecycle method

* convert constructor injection to lifecycle method

* convert constructor injection to lifecycle method

* convert constructor injection to lifecycle method

* convert constructor injection to lifecycle method

* convert constructor injection to lifecycle method and fix warnigs

* convert constructor injection to lifecycle method

* convert constructor injection to lifecycle method

* convert constructor injection to lifecycle method

* convert constructor injection to lifecycle method

* convert constructor injection to lifecycle method

* convert constructor injection to lifecycle method and fix warnings

* load mongodb fixtures and pass through feature flags to allow running plugin tests

* Speed up MavenPackager by by 7 minutes when building JARs

We don't need to create the assemblies.

* Use a single container network for all tests

We cache MongoDB and OpenSearch services so we can't use a new network
on every test. Otherwise, the server would be in a different network
when using cached services.

* More verbose logging for class-lifecycle server backends

* Exit server backend startup early when seeing an unknown host error

* Log MongoDB version in ContainerizedGraylogBackend

* Return the version string instead of the enum

* Fix warning in ContainerizedGraylogBackend

* Don't create a new MongoDB instance for every test

* don't use constructor argument for test base class, it must be static through the lifecycle method

* convert remaining tests to use lifecycle injection

* Introduce #cachedInstance to SearchServerBuilder

Allows the creation of uncached search instances.

* Add MongoDBInstance#instanceId

* Add SearchServerInstance#instancdId

* Stop server early if MongoDB is not reachable

* Fix caching issues in services provider

Disable multi-layered caches and only cache at the service layer.

* We need the server assembly

* Remove connection failure detector again

Exiting early is problematic because a retry might fix the problem.

Add check for NoClassDefFoundError

* make error message nicer

* tests require data node, so skip them on other search versions

* test only runs on data node

* remove custom junit engine

rename annotation to FullBackendTest
remove deprecated annotation options
always start mail and webhook services, they are tiny and fast, simplifies this further (and cuts down on container starts)

some warning cleanup

* re-enable maven packager, committed this by mistake

* Only allow FullBackendTest annotation in full-backend-tests

* Let WebInterfaceAssetsResourceWithPrefixIT run in CLASS lifecycle

The test needs custom configuration.

* Don't allow VM lifecycle with customized config or feature flags

* test with custom config must run in class lifecycle

* Remove commented cache key parts

* Shutdown CLASS services with non-empty config or feature flags

We don't need services for custom configurations to stay around.

* Improve Guice error detection on server startup

* Replace MongodbServer with MongoDBVersion

* Remove unused MongoDBVersion#PATTERN

* Remove unused ContainerVersions

* Extract search server and MongoDB version provider

* Remove unused imports

* Remove SearchServerInstance#searchServer method

Also convert SearchServer from an enum to a POJO with some constants.

* Move SearchServer to org.graylog.testing.storage

* Change log level in GraylogBackendExtension

* Add EnabledIfSearchServer annotation and condition

* Switch DatanodeOpensearchProxyIT to EnabledIfSearchServer

* Switch more tests to EnabledIfSearchServer annotation

* Remove GraylogBackendConfiguration#onlyOnDataNode

* Fix EnabledIfSearchServerCondition class name

* Remove unused DatanodeDevInstance and its builder and provider

* Ensure Maven packaging before starting backend services

Also move check for GRAYLOG_IT_SKIP_PACKAGING environment variable into
the MavenPackager to avoid duplication.

* Set Data Node version to Version.CURRENT_CLASSPATH

* Improve log message in ContainerizedGraylogBackend

* Fix EnabledIfSearchServerCondition logic

Don't check the presence of a version when distribution is DATANODE.

* Add Javadoc to EnabledIfSearchServer

* Fix DatanodeInstance to build the local image

* Don't set GRAYLOG_ELASTICSEARCH_VERSION env when running Data Node

Fixes a startup error where the search version validator failed.

* Pass missing env to DatanodeInstance

* Remove backend services from cache when they get closed

* Adjust name for local Data Node image to be consistent with the server

* Adjust log message in MavenPackager when skipping

* Handle Exception and AssertError in GraylogRestApi#waitFor

Otherwise, we would exit the wait loop when the predicate throws an
exception. (e.g., when we get a 404 instead of a 200)

* Add log().ifError() in WebInterfaceAssetsResourceBase

* take the cluster id from the imported licenses instead of manually setting it through a fixture

* Remove unused GraylogBackendExtension#resolveFixtures method

* Fix Data Node SearchVersionRange checks

This was hardcoded to 5.2.0 because that's the version we used in our
tests. (regardless of which actual version was running)

We are now building the version from the Version.CURRENT_CLASSPATH.

* Relax Data Node search server check

* Pass MavenProjectDirProvider into services provider

* Add the include-frontend flag to the services cache key

* Revert "Add the include-frontend flag to the services cache key"

This reverts commit c25b1a5b3a.

* Revert "Pass MavenProjectDirProvider into services provider"

This reverts commit 37001edcc9.

* Remove MavenProjectDirProviderWithFrontend

* Rename ContainerMatrixElasticsearchBaseTest to SearchServerBaseTest

* Remove unused NodeContainerFactory#containerFileExists

* Don't memoize customization config in customization config provider

It makes testing really hard and requires a server restart to change the
values.

* Fix signal handling in webhook.js test server

Stopping webhook server container was blocking for a long time.

* Add EnabledIfMongoDB annotation

* Move MavenPackager call up into ContainerizedGraylogBackend

That way we will build the JAR files at the very beginning and with the
correct MavenProjectDirProvider. (at least for the first test that runs)

* Adjust MavenPackager logs

* Make completebackend.api.Views#getAll more robust

* Silence MavenPackager

* Use defaultIfBlank instead of requireNonNullElse

* Also use defaultIfBlank for MongoDB version

* Remove unused service image properties

We can add them back if we should implement image selection.

* Cleanup GraylogBackendExtension

* Rename ConfigurationParameter to Env in GraylogBackendConfiguration

* Prevent importLicenses=false in VM lifecycle

* Add Javadoc to GraylogBackendConfiguration

* Move GraylogBackendConfiguration and FullBackendTest annotations

Those were the last files in the containermatrix package.

* More Javadoc

* Remove services from cache before stopping them

* Log if validation fails

* Introduce Server and Data Node product configuration

This replaces the low-level provider configurations for Maven and plugin
JAR files.

* Don't implement AutoClosable for ContainerizedGraylogBackendServicesProvider

We never close it anywhere. Convert the instance method to a static
cleanup method.

* Remove mavenProjectDirProvider, pluginJarsProvider, datanodePluginJarsProvider

* Fix duplicate BeforeAll methods

* Fix logging in completebackend.apis.Views

* Re-enable DbEntitiesCatalogProviderTest

* Use SearchServer.DEFAULT_VERSION for the default distribution

* Remove unused RunningGraylogBackend

* Check composable index templates feature flag in AdaptersES7

Fixes IndicesIT with Elasticsearch 7 and OpenSearch 1.x because they've
always been using composable index templates.

* Remove unused RunningElasticsearchInstanceES7 class

* Add sleep to ensure updatedAt differs when reacquiring lock

* Make EnabledIfSearchServer annotation repeatable

* Improve wording in EnabledIfSearchServerCondition

* Bump default heap in SearchServerBuilder to 1 GB

* Don't set "elasticsearch_version" and let the server detect the version

* Adjust IndexRangesCleanupIT to handle AssertionError in retry loop

* Remove unneccessary warning supression in DatanodeProvisioningIT

* Remove unused testClass param in GraylogBackendExtension#createBackend

---------

Co-authored-by: Bernd Ahlers <bernd@graylog.com>
Co-authored-by: Bernd Ahlers <bernd@users.noreply.github.com>
Co-authored-by: Othello Maurer <othello@graylog.com>
2025-10-21 15:41:29 +02:00
github-actions[bot]
7c66020f7a Bump to 7.1.0-SNAPSHOT 2025-10-20 12:54:36 +00:00
Jenkins
606ea53d37 [graylog2-server] prepare for next development iteration 2025-10-20 14:12:12 +02:00
Jenkins
664203b735 [graylog2-server] prepare release 7.0.0-rc.1 2025-10-20 13:53:28 +02:00
Bernd Ahlers
f48396ab1a Revert version to 7.0.0-SNAPSHOT 2025-10-20 13:33:10 +02:00
Jenkins
567ccbf7f8 [graylog2-server] prepare release 7.0.0-rc.1 2025-10-20 13:23:27 +02:00
Jenkins
2e72d3daac [graylog2-server] prepare for next development iteration 2025-10-15 14:01:59 +02:00
Jenkins
932e50d47f [graylog2-server] prepare release 7.0.0-beta.5 2025-10-15 13:43:12 +02:00
Jenkins
e0164a4046 [graylog2-server] prepare for next development iteration 2025-10-13 13:39:03 +02:00
Jenkins
959028630d [graylog2-server] prepare release 7.0.0-beta.4 2025-10-13 13:20:31 +02:00
Jenkins
6e28df8e51 [graylog2-server] prepare for next development iteration 2025-10-06 13:43:45 +02:00
Jenkins
6ed62f74cc [graylog2-server] prepare release 7.0.0-beta.3 2025-10-06 13:25:08 +02:00
Jenkins
30e4ecee45 [graylog2-server] prepare for next development iteration 2025-09-29 13:47:08 +02:00
Jenkins
2c473b49b9 [graylog2-server] prepare release 7.0.0-beta.2 2025-09-29 13:28:29 +02:00
Jenkins
3484057624 [graylog2-server] prepare for next development iteration 2025-09-22 14:12:05 +02:00
Jenkins
e611aacff3 [graylog2-server] prepare release 7.0.0-beta.1 2025-09-22 13:53:23 +02:00
Bernd Ahlers
efb519d9ad Improve some full-backed tests to be less flaky (#23533)
* Wrap test methods in awaitility in DatanodeOpensearchProxyIT
* Wait for the actual messages to be present instead of relying on the message count which could be wrong depending on the order of other tests
* Improve the waiting on index creation

Co-authored-by: Jan Heise <jan.heise@graylog.com>
2025-09-03 16:41:52 +02:00
Jenkins
9cfd72871a [graylog2-server] prepare for next development iteration 2025-08-29 13:16:04 +02:00
Jenkins
d59c56b2c1 [graylog2-server] prepare release 7.0.0-alpha.2 2025-08-29 12:57:02 +02:00
Jenkins
4fc979053f [graylog2-server] prepare for next development iteration 2025-07-28 13:48:14 +02:00
Jenkins
dac42698ec [graylog2-server] prepare release 7.0.0-alpha.1 2025-07-28 13:28:19 +02:00
github-actions[bot]
17468be528 Bump to 7.0.0-SNAPSHOT 2025-06-16 12:12:52 +00:00
Jenkins
84e794377f [graylog2-server] prepare for next development iteration 2025-06-16 13:46:08 +02:00
Jenkins
a4d383c613 [graylog2-server] prepare release 6.3.0-rc.1 2025-06-16 13:28:04 +02:00
Jenkins
cca9396e0d [graylog2-server] prepare for next development iteration 2025-06-10 13:39:16 +02:00
Jenkins
000fdd91d0 [graylog2-server] prepare release 6.3.0-beta.5 2025-06-10 13:19:38 +02:00
Jenkins
9f846d1632 [graylog2-server] prepare for next development iteration 2025-06-02 13:39:57 +02:00
Jenkins
5cb4bf5c27 [graylog2-server] prepare release 6.3.0-beta.4 2025-06-02 13:21:39 +02:00
Jenkins
f0e82a976c [graylog2-server] prepare for next development iteration 2025-05-26 14:59:11 +02:00
Jenkins
0b368d7338 [graylog2-server] prepare release 6.3.0-beta.3 2025-05-26 14:40:53 +02:00
Jenkins
6974930cfe [graylog2-server] prepare for next development iteration 2025-05-26 13:37:27 +02:00
Jenkins
40f548e67a [graylog2-server] prepare release 6.3.0-beta.2 2025-05-26 13:19:02 +02:00
Jenkins
dc562aa772 [graylog2-server] prepare for next development iteration 2025-05-19 13:42:17 +02:00
Jenkins
9971fa995e [graylog2-server] prepare release 6.3.0-beta.1 2025-05-19 13:23:23 +02:00
Jenkins
496d040a36 [graylog2-server] prepare for next development iteration 2025-05-13 13:37:20 +02:00
Jenkins
f3f1429f00 [graylog2-server] prepare release 6.3.0-alpha.4 2025-05-13 13:18:25 +02:00
Jenkins
b3cc660efe [graylog2-server] prepare for next development iteration 2025-05-07 16:17:27 +02:00
Jenkins
d1561d6f30 [graylog2-server] prepare release 6.3.0-alpha.3 2025-05-07 15:58:33 +02:00
Jenkins
6cace88acc [graylog2-server] prepare for next development iteration 2025-04-30 17:14:03 +02:00
Jenkins
4f798b75a7 [graylog2-server] prepare release 6.3.0-alpha.2 2025-04-30 16:55:11 +02:00
Jenkins
0f5088213e [graylog2-server] prepare for next development iteration 2025-04-23 13:44:20 +02:00
Jenkins
7859409af6 [graylog2-server] prepare release 6.3.0-alpha.1 2025-04-23 13:25:52 +02:00