Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 53 additions & 7 deletions .github/workflows/docker-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,21 @@ jobs:
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
-
name: Set up JDK 25
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: 'temurin'
java-version: 25
cache: maven
-
name: Build allinone service jars
# Produces <svc>/service/target/ditto-<svc>-service-0-SNAPSHOT-allinone.jar for
# every service module. The dockerfile-snapshot COPY below picks these up.
# Required because Eclipse's Maven repos do not host 0-SNAPSHOT artifacts —
# dockerfile-release's curl from ditto-maven2-releases silently 404s into a
# broken image otherwise.
run: mvn package -DskipTests -B -ntp
-
name: Set up QEMU
uses: docker/setup-qemu-action@96fe6ef7f33517b61c61be40b68a1882f3264fb8 # v4.2.0
Expand All @@ -58,7 +73,7 @@ jobs:
name: Branch name
id: branch_name
run: |
echo "IMAGE_TAG=nightly" >> $GITHUB_ENV
echo "IMAGE_TAG=nightly-ts" >> $GITHUB_ENV
-
name: Building + pushing Docker images for tag
run: |
Expand All @@ -68,9 +83,10 @@ jobs:
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
with:
context: .
file: dockerfile-release
file: dockerfile-snapshot
platforms: linux/amd64,linux/arm64
build-args: |
TARGET_DIR=policies/service/target
SERVICE_STARTER=ditto-policies-service
SERVICE_VERSION=0-SNAPSHOT
MAIN_CLASS=org.eclipse.ditto.policies.service.starter.PoliciesService
Expand All @@ -83,9 +99,10 @@ jobs:
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
with:
context: .
file: dockerfile-release
file: dockerfile-snapshot
platforms: linux/amd64,linux/arm64
build-args: |
TARGET_DIR=things/service/target
SERVICE_STARTER=ditto-things-service
SERVICE_VERSION=0-SNAPSHOT
MAIN_CLASS=org.eclipse.ditto.things.service.starter.ThingsService
Expand All @@ -98,9 +115,10 @@ jobs:
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
with:
context: .
file: dockerfile-release
file: dockerfile-snapshot
platforms: linux/amd64,linux/arm64
build-args: |
TARGET_DIR=gateway/service/target
SERVICE_STARTER=ditto-gateway-service
SERVICE_VERSION=0-SNAPSHOT
MAIN_CLASS=org.eclipse.ditto.gateway.service.starter.GatewayService
Expand All @@ -113,9 +131,10 @@ jobs:
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
with:
context: .
file: dockerfile-release
file: dockerfile-snapshot
platforms: linux/amd64,linux/arm64
build-args: |
TARGET_DIR=thingsearch/service/target
SERVICE_STARTER=ditto-thingsearch-service
SERVICE_VERSION=0-SNAPSHOT
MAIN_CLASS=org.eclipse.ditto.thingsearch.service.starter.SearchService
Expand All @@ -128,9 +147,10 @@ jobs:
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
with:
context: .
file: dockerfile-release
file: dockerfile-snapshot
platforms: linux/amd64,linux/arm64
build-args: |
TARGET_DIR=connectivity/service/target
SERVICE_STARTER=ditto-connectivity-service
SERVICE_VERSION=0-SNAPSHOT
MAIN_CLASS=org.eclipse.ditto.connectivity.service.ConnectivityService
Expand All @@ -139,6 +159,22 @@ jobs:
push: true
tags: |
eclipse/ditto-connectivity:${{ env.IMAGE_TAG }}
-
name: Build and push ditto-timeseries
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
with:
context: .
file: dockerfile-snapshot
platforms: linux/amd64,linux/arm64
build-args: |
TARGET_DIR=timeseries/service/target
SERVICE_STARTER=ditto-timeseries-service
SERVICE_VERSION=0-SNAPSHOT
MAIN_CLASS=org.eclipse.ditto.timeseries.service.starter.TimeseriesService
pull: true
push: true
tags: |
eclipse/ditto-timeseries:${{ env.IMAGE_TAG }}
-
name: Use Node.js 18.x
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
Expand Down Expand Up @@ -213,7 +249,17 @@ jobs:
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL'
-
-
name: Run Trivy vulnerability scanner for ditto-timeseries
uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # v0.36.0
with:
image-ref: 'docker.io/eclipse/ditto-timeseries:${{ env.IMAGE_TAG }}'
format: 'table'
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL'
-
name: Run Trivy vulnerability scanner for ditto-ui
uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # v0.36.0
with:
Expand Down
1 change: 1 addition & 0 deletions .run/Ditto.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<toRun name="GatewayService" type="Application" />
<toRun name="ConnectivityService" type="Application" />
<toRun name="SearchService" type="Application" />
<toRun name="TimeseriesService" type="Application" />
<method v="2" />
</configuration>
</component>
28 changes: 28 additions & 0 deletions .run/TimeseriesService.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2026 Contributors to the Eclipse Foundation
~
~ See the NOTICE file(s) distributed with this work for additional
~ information regarding copyright ownership.
~
~ This program and the accompanying materials are made available under the
~ terms of the Eclipse Public License 2.0 which is available at
~ http://www.eclipse.org/legal/epl-2.0
~
~ SPDX-License-Identifier: EPL-2.0
-->
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="TimeseriesService" type="Application" factoryName="Application" folderName="Ditto" nameIsGenerated="true">
<envs>
<env name="LOG_LEVEL_APPLICATION" value="INFO" />
<env name="DITTO_TRACING_ENABLED" value="true" />
<env name="DITTO_TRACING_SAMPLER" value="always" />
</envs>
<option name="MAIN_CLASS_NAME" value="org.eclipse.ditto.timeseries.service.starter.TimeseriesService" />
<module name="ditto-timeseries-service" />
<option name="VM_PARAMETERS" value="-Xms512m -Xmx512m" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,17 @@ public final class FeatureToggle {
public static final String POLICY_LOCKOUT_PREVENTION_ENABLED =
"ditto.devops.feature.policy-lockout-prevention-enabled";

/**
* System property name of the property defining whether the timeseries feature
* (per-Thing ingest from WoT-annotated property events, RetrieveTimeseries query) is enabled.
* When disabled, things-service does not start the {@code TimeseriesIngestPublisher}
* (so no per-event WoT-resolution work on the write path) and gateway-routed
* {@code RetrieveTimeseries} commands are rejected with {@link UnsupportedSignalException}.
*
* @since 4.0.0
*/
public static final String TIMESERIES_ENABLED = "ditto.devops.feature.timeseries-enabled";

/**
* Resolves the system property {@value MERGE_THINGS_ENABLED}.
*/
Expand Down Expand Up @@ -172,6 +183,11 @@ public final class FeatureToggle {
private static final boolean IS_POLICY_LOCKOUT_PREVENTION_ENABLED =
resolveProperty(POLICY_LOCKOUT_PREVENTION_ENABLED);

/**
* Resolves the system property {@value TIMESERIES_ENABLED}.
*/
private static final boolean IS_TIMESERIES_ENABLED = resolveProperty(TIMESERIES_ENABLED);

private static boolean resolveProperty(final String propertyName) {
final String propertyValue = System.getProperty(propertyName, Boolean.TRUE.toString());
return !Boolean.FALSE.toString().equalsIgnoreCase(propertyValue);
Expand Down Expand Up @@ -339,4 +355,35 @@ public static boolean isStacklessFlowControlExceptionsEnabled() {
public static boolean isPolicyLockoutPreventionEnabled() {
return IS_POLICY_LOCKOUT_PREVENTION_ENABLED;
}

/**
* Checks if the timeseries feature is enabled based on the system property {@value TIMESERIES_ENABLED}.
*
* @param signal the name of the signal that was supposed to be processed
* @param dittoHeaders headers used to build exception
* @return the unmodified headers parameters
* @throws UnsupportedSignalException if the system property {@value TIMESERIES_ENABLED}
* resolves to {@code false}
* @since 4.0.0
*/
public static DittoHeaders checkTimeseriesFeatureEnabled(final String signal, final DittoHeaders dittoHeaders) {
if (!IS_TIMESERIES_ENABLED) {
throw UnsupportedSignalException
.newBuilder(signal)
.dittoHeaders(dittoHeaders)
.build();
}
return dittoHeaders;
}

/**
* Returns whether the timeseries feature is enabled based on the system property
* {@value TIMESERIES_ENABLED}.
*
* @return whether the timeseries feature is enabled or not.
* @since 4.0.0
*/
public static boolean isTimeseriesFeatureEnabled() {
return IS_TIMESERIES_ENABLED;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,8 @@ private void injectSystemPropertiesLimits(final C serviceSpecificConfig) {
rawConfig.getBoolean(FeatureToggle.STACKLESS_FLOW_CONTROL_EXCEPTIONS_ENABLED)));
System.setProperty(FeatureToggle.POLICY_LOCKOUT_PREVENTION_ENABLED,
Boolean.toString(rawConfig.getBoolean(FeatureToggle.POLICY_LOCKOUT_PREVENTION_ENABLED)));
System.setProperty(FeatureToggle.TIMESERIES_ENABLED,
Boolean.toString(rawConfig.getBoolean(FeatureToggle.TIMESERIES_ENABLED)));
System.setProperty(DittoSystemProperties.DITTO_LIMITS_POLICY_IMPORTS_LIMIT,
Integer.toString(limitsConfig.getPolicyImportsLimit()));
final MetricsConfig metricsConfig = serviceSpecificConfig.getMetricsConfig();
Expand Down
20 changes: 20 additions & 0 deletions bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,11 @@
<artifactId>ditto-thingsearch-model</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.ditto</groupId>
<artifactId>ditto-timeseries-model</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.ditto</groupId>
<artifactId>ditto-placeholders</artifactId>
Expand Down Expand Up @@ -755,6 +760,11 @@
<artifactId>ditto-thingsearch-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.ditto</groupId>
<artifactId>ditto-timeseries-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.ditto</groupId>
<artifactId>ditto-internal-models-signal</artifactId>
Expand Down Expand Up @@ -798,6 +808,16 @@
<artifactId>ditto-thingsearch-service</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.ditto</groupId>
<artifactId>ditto-timeseries-service</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.ditto</groupId>
<artifactId>ditto-timeseries-mongodb</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>nl.grons</groupId>
<artifactId>metrics4-scala_${scala.version}</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
import org.eclipse.ditto.thingsearch.model.signals.commands.query.QueryThings;
import org.eclipse.ditto.thingsearch.model.signals.commands.subscription.CreateSubscription;
import org.eclipse.ditto.things.model.devops.commands.CreateWotValidationConfig;
import org.eclipse.ditto.timeseries.api.commands.IngestDataPoints;
import org.eclipse.ditto.timeseries.model.signals.commands.RetrieveTimeseries;


public class ConnectivityServiceGlobalCommandRegistryTest extends GlobalCommandRegistryTestCases {
Expand Down Expand Up @@ -79,7 +81,9 @@ public ConnectivityServiceGlobalCommandRegistryTest() {
CheckPermissions.class,
MigrateConnectionEncryption.class,
MigrateConnectionEncryptionAbort.class,
MigrateConnectionEncryptionStatus.class
MigrateConnectionEncryptionStatus.class,
IngestDataPoints.class,
RetrieveTimeseries.class
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
import org.eclipse.ditto.connectivity.service.messaging.persistence.migration.MigrateConnectionEncryptionResponse;
import org.eclipse.ditto.connectivity.service.messaging.persistence.migration.MigrateConnectionEncryptionStatusResponse;
import org.eclipse.ditto.things.model.devops.commands.CreateWotValidationConfigResponse;
import org.eclipse.ditto.timeseries.api.commands.IngestDataPointsResponse;
import org.eclipse.ditto.timeseries.model.signals.commands.RetrieveTimeseriesResponse;

public final class ConnectivityServiceGlobalCommandResponseRegistryTest extends GlobalCommandResponseRegistryTestCases {

Expand Down Expand Up @@ -77,7 +79,9 @@ public ConnectivityServiceGlobalCommandResponseRegistryTest() {
CheckPermissionsResponse.class,
MigrateConnectionEncryptionResponse.class,
MigrateConnectionEncryptionStatusResponse.class,
MigrateConnectionEncryptionAbortResponse.class
MigrateConnectionEncryptionAbortResponse.class,
IngestDataPointsResponse.class,
RetrieveTimeseriesResponse.class
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import org.eclipse.ditto.things.model.signals.commands.exceptions.AttributePointerInvalidException;
import org.eclipse.ditto.thingsearch.api.QueryTimeExceededException;
import org.eclipse.ditto.thingsearch.model.signals.commands.exceptions.InvalidNamespacesException;
import org.eclipse.ditto.timeseries.model.TimeseriesQueryInvalidException;
import org.eclipse.ditto.wot.model.WotThingModelInvalidException;
import org.eclipse.ditto.wot.validation.WotThingModelPayloadValidationException;

Expand Down Expand Up @@ -92,7 +93,8 @@ public ConnectivityServiceGlobalErrorRegistryTest() {
WotValidationConfigHistoryNotAccessibleException.class,
WotValidationConfigInvalidException.class,
WotValidationConfigNotAccessibleException.class,
ServiceTimeoutException.class
ServiceTimeoutException.class,
TimeseriesQueryInvalidException.class
);
}

Expand Down
Loading
Loading