From fadd6cb471ee1c036292d77938d99659ec66e955 Mon Sep 17 00:00:00 2001 From: Martin Date: Fri, 15 Mar 2024 16:33:39 +0100 Subject: [PATCH 1/7] changes added for feature 97 MarchmakingAgentApi --- .../tractusx/agents/edc/AgentConfig.java | 38 ++++++ .../agents/edc/http/transfer/AgentSource.java | 116 +++++++++++++++++- .../edc/http/transfer/AgentSourceFactory.java | 2 + .../AgentSourceRequestParamsSupplier.java | 8 ++ 4 files changed, 163 insertions(+), 1 deletion(-) diff --git a/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/AgentConfig.java b/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/AgentConfig.java index 16a5e2ca..c2234cf3 100644 --- a/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/AgentConfig.java +++ b/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/AgentConfig.java @@ -58,6 +58,8 @@ public class AgentConfig { public static final String DATASPACE_SYNCCONNECTORS_PROPERTY = "cx.agent.dataspace.remotes"; + public static final String RDF_STORE = "cx.agent.rdf.store"; + public static final String VALIDATION_ENDPOINTS = "edc.dataplane.token.validation.endpoints"; public static final String FEDERATION_SERVICE_BATCH_SIZE = "cx.agent.federation.batch.max"; @@ -75,6 +77,8 @@ public class AgentConfig { public static final String CALLBACK_ENDPOINT = "cx.agent.callback"; public static final String DEFAULT_SKILL_CONTRACT_PROPERTY = "cx.agent.skill.contract.default"; + + public static final String DEFAULT_GRAPH_CONTRACT_PROPERTY = "cx.agent.graph.contract.default"; public static final String SERVICE_ALLOW_PROPERTY = "cx.agent.service.allow"; public static final String DEFAULT_SERVICE_ALLOW_PATTERN = "(http|edc)s?://.*"; @@ -89,6 +93,9 @@ public class AgentConfig { public static final String DEFAULT_SERVICE_DENY_ASSET_PATTERN = "^$"; public static final String TX_EDC_VERSION_PROPERTY = "cx.agent.edc.version"; + + public static final String MATCHMAKING_URL = "cx.agent.matchmaking"; + public static final String MATCHMAKING_REST = "cx.agent.matchmaking.rest"; /** * precompiled stuff @@ -252,6 +259,10 @@ public String[] getDataspaceSynchronizationConnectors() { } return connectors; } + + public String getRdfStore() { + return config.getString(RDF_STORE, null); + } /** * access @@ -324,6 +335,15 @@ public Integer getCallTimeout() { public String getDefaultSkillContract() { return config.getString(DEFAULT_SKILL_CONTRACT_PROPERTY, null); } + + /** + * access + * + * @return default graph contract + */ + public String getDefaultGraphContract() { + return config.getString(DEFAULT_GRAPH_CONTRACT_PROPERTY, null); + } /** * access @@ -378,5 +398,23 @@ public String getEdcVersion() { public boolean isPrerelease() { return getEdcVersion().compareTo("0.5.0") <= 0; } + + /** + * access + * + * @return URL for Matchmaking Agent REST call + */ + public String getMatchmakingAgentUrl() { + return config.getString(MATCHMAKING_URL); + } + + /** + * access + * + * @return URL for Matchmaking Agent REST call + */ + public boolean getMatchmakingAgentRest() { + return config.getBoolean(MATCHMAKING_REST); + } } diff --git a/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/http/transfer/AgentSource.java b/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/http/transfer/AgentSource.java index 1bc7a07e..7b1af1ec 100644 --- a/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/http/transfer/AgentSource.java +++ b/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/http/transfer/AgentSource.java @@ -16,6 +16,9 @@ // SPDX-License-Identifier: Apache-2.0 package org.eclipse.tractusx.agents.edc.http.transfer; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; import okhttp3.Response; import org.eclipse.edc.connector.dataplane.http.params.HttpRequestFactory; import org.eclipse.edc.connector.dataplane.http.spi.HttpRequestParams; @@ -34,6 +37,9 @@ import java.io.InputStream; import java.util.ArrayList; import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; import java.util.Objects; import java.util.regex.Matcher; import java.util.stream.Stream; @@ -64,6 +70,9 @@ public class AgentSource implements DataSource { protected SkillStore skillStore; protected DataFlowRequest request; + + protected String matchmakingAgentUrl; + protected boolean matchmakingAgentRest; public static final String AGENT_BOUNDARY = "--"; @@ -75,7 +84,11 @@ public AgentSource() { @Override public StreamResult> openPartStream() { - return openMatchmaking(); + if (matchmakingAgentRest) { + return openMatchmakingRest(); + } else { + return openMatchmaking(); + } } /** @@ -135,6 +148,97 @@ protected StreamResult> openMatchmaking() { return StreamResult.error(e.getMessage()); } } + + /** + * executes a KA-MATCHMAKING REST API call and pipes the results into KA-TRANSFER + * + * @return multipart body containing result and warnings + */ + @NotNull + protected StreamResult> openMatchmakingRest() { + // Agent call, we translate from KA-MATCH to KA-TRANSFER + String skill = null; + String graph = null; + String asset = String.valueOf(request.getSourceDataAddress().getProperties().get(AgentSourceHttpParamsDecorator.ASSET_PROP_ID)); + String assetValue; + OkHttpClient client = new OkHttpClient(); + //String baseUrl = "http://localhost:8082/api/agentsource"; // TODO: put baseUrl into config file + //String baseUrl = "http://matchmaking-agent:8080/agentsource"; // TODO: put baseUrl into config file + String baseUrl = matchmakingAgentUrl; + + String url = baseUrl + "?asset=" + asset; + if (asset != null && asset.length() > 0) { + Matcher graphMatcher = AgentExtension.GRAPH_PATTERN.matcher(asset); + if (graphMatcher.matches()) { + graph = asset; + } + Matcher skillMatcher = SkillStore.matchSkill(asset); + if (skillMatcher.matches()) { + var skillText = skillStore.get(asset); + if (skillText.isEmpty()) { + return StreamResult.error(format("Skill %s does not exist.", asset)); + } + SkillDistribution distribution = skillStore.getDistribution(asset); + String params = request.getProperties().get(AgentSourceHttpParamsDecorator.QUERY_PARAMS); + SkillDistribution runMode = SkillDistribution.ALL; + if (params.contains("runMode=provider") || params.contains("runMode=PROVIDER")) { + runMode = SkillDistribution.PROVIDER; + } else if (params.contains("runMode=consumer") || params.contains("runMode=CONSUMER")) { + runMode = SkillDistribution.CONSUMER; + } + if (runMode == SkillDistribution.CONSUMER) { + if (distribution == SkillDistribution.PROVIDER) { + return StreamResult.error(String.format("Run distribution of skill %s should be consumer, but was set to provider only.", asset)); + } + return StreamResult.success(Stream.of(new AgentPart("application/sparql-query", skillText.get().getBytes()))); + } else if (runMode == SkillDistribution.PROVIDER && distribution == SkillDistribution.CONSUMER) { + return StreamResult.error(String.format("Run distribution of skill %s should be provider, but was set to consumer only.", asset)); + } + skill = skillText.get(); // default execution for runMode=ALL or runMode=provider and DistributionMode is ALL or provider + } + } + + try { + // Either put skill or asset in URL as param + if (skill == null) { + assetValue = graph; + } else { + assetValue = skill; + } + + HttpUrl.Builder urlBuilder = HttpUrl.parse(url).newBuilder(); + urlBuilder.addQueryParameter("asset", assetValue); + // Put parameters into request + Map targetProperties = request.getSourceDataAddress().getProperties(); + Set> entrySet = targetProperties.entrySet(); + for (Entry entry : entrySet) { + urlBuilder.addQueryParameter(entry.getKey(), entry.getValue().toString()); + } + HttpUrl httpUrl = urlBuilder.build(); + // Build request from original request with adapted URL + Request httpRequest = this.requestFactory.toRequest(params) + .newBuilder().url(httpUrl) + .build(); + + // Send request and get response + Response response = client.newCall(httpRequest).execute(); + if (!response.isSuccessful()) { + return StreamResult.error(format("Received code transferring HTTP data for request %s: %s - %s.", requestId, response.code(), response.message())); + } + List results = new ArrayList<>(); + if (response.body() != null) { + results.add(new AgentPart(response.body().contentType().toString(), response.body().bytes())); + } + if (response.header("cx_warnings") != null) { + results.add(new AgentPart("application/cx-warnings+json", response.header("cx_warnings").getBytes())); + } + return StreamResult.success(results.stream()); + } catch (IOException e) { + return StreamResult.error(e.getMessage()); + } + } + + @Override public String toString() { @@ -190,6 +294,16 @@ public AgentSource.Builder request(DataFlowRequest request) { dataSource.request = request; return this; } + + public AgentSource.Builder matchmakingAgentUrl(String matchmakingAgentUrl) { + dataSource.matchmakingAgentUrl = matchmakingAgentUrl; + return this; + } + + public AgentSource.Builder matchmakingAgentRest(boolean matchmakingAgentRest) { + dataSource.matchmakingAgentRest = matchmakingAgentRest; + return this; + } public AgentSource build() { Objects.requireNonNull(dataSource.requestId, "requestId"); diff --git a/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/http/transfer/AgentSourceFactory.java b/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/http/transfer/AgentSourceFactory.java index 5cd0f203..7cc0d433 100644 --- a/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/http/transfer/AgentSourceFactory.java +++ b/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/http/transfer/AgentSourceFactory.java @@ -92,6 +92,8 @@ public DataSource createSource(DataFlowRequest request) { .skillStore(skillStore) .processor(processor) .request(request) + .matchmakingAgentUrl(supplier.provideMatchmakingUrl()) + .matchmakingAgentRest(supplier.provideMatchmakingRest()) .build(); monitor.debug(String.format("Created a new agent source %s for destination type %s", dataSource, diff --git a/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/http/transfer/AgentSourceRequestParamsSupplier.java b/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/http/transfer/AgentSourceRequestParamsSupplier.java index 6cd8c271..b5595860 100644 --- a/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/http/transfer/AgentSourceRequestParamsSupplier.java +++ b/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/http/transfer/AgentSourceRequestParamsSupplier.java @@ -95,4 +95,12 @@ public HttpRequestParams provideSinkParams(DataFlowRequest request) { this.sinkDecorators.forEach((decorator) -> decorator.decorate(request, address, params)); return params.build(); } + + public String provideMatchmakingUrl() { + return config.getMatchmakingAgentUrl(); + } + + public boolean provideMatchmakingRest() { + return config.getMatchmakingAgentRest(); + } } From 9305afad940729883d515f77e7b92b782d17a1e4 Mon Sep 17 00:00:00 2001 From: "Dr. Christoph \"Schorsch\" Jung" Date: Tue, 2 Apr 2024 11:40:17 +0200 Subject: [PATCH 2/7] chore: minimize the code changes and update copyright headers. --- agent-plane/agent-plane-protocol/README.md | 8 +++-- .../tractusx/agents/edc/AgentConfig.java | 33 ++----------------- .../agents/edc/http/transfer/AgentSource.java | 20 +++-------- .../edc/http/transfer/AgentSourceFactory.java | 5 ++- .../AgentSourceRequestParamsSupplier.java | 15 ++++++--- 5 files changed, 25 insertions(+), 56 deletions(-) diff --git a/agent-plane/agent-plane-protocol/README.md b/agent-plane/agent-plane-protocol/README.md index 67ecf992..a1a89dc8 100644 --- a/agent-plane/agent-plane-protocol/README.md +++ b/agent-plane/agent-plane-protocol/README.md @@ -23,11 +23,12 @@ This folder hosts the [Agent Data Protocols Extension for the Eclipse Dataspace ## Architecture This extension -- introduces a tenant-internal endpoint (Matchmaking Agent) for submitting possibly federated queries (called Skills) in the supported inference languages (currently: SparQL) +- introduces or interfaces to a tenant-internal endpoint (Matchmaking Agent) for submitting possibly federated queries (called Skills) in the supported inference languages (currently: SparQL) +- hosts a synchronisation schedule which regulary requests the catalogue from configured partner connectors and includes them into the default graph - may negotiate further agreements for delegating sub-queries on the fly, for which purpose it also operates as an EDR callback for the control plane - may operate as a validation proxy in case that this data plane is attached to several control planes (e.g. a consuming and a providing control plane) - implements special Sources for dealing with http-based transfer protocols, such as SparQL-Over-Http and Skill-Over-Http -- hosts a synchronisation schedule which regulary requests the catalogue from configured partner connectors and includes them into the default graph + The SparQL implementation currently relies on Apache Jena Fuseki as the SparQL engine. see the [Overall Source Code Layout](../../README.md#source-code-layout--runtime-collaboration) @@ -89,6 +90,7 @@ See [this sample configuration file](resources/dataplane.properties) | Property | Required | Default/Example | Description | List | |-----------------------------------------------|----------|--------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|------| +| cx.agent.matchmaking | | http://matchmaking-agent.internal | URL of the matchmaking agent (use internal one if null) | | | cx.agent.asset.default | | urn:x-arq:DefaultGraph | IRI of the default graph (federated data catalogue) | | | cx.agent.asset.file | | https://www.w3id.org/catenax/ontology,dataspace.ttl | Initial triples for the default graph (federated data catalogue) | L | | cx.agent.accesspoint.name | | api | Matchmaking agent endpoint name (internal) | | @@ -109,7 +111,7 @@ See [this sample configuration file](resources/dataplane.properties) | cx.agent.service.deny | | ^$ | Regular expression for determining which IRIs are denied in SERVICE calls (on top level/federated data catalogue) | | | | cx.agent.service.asset.allow | | (http|edc)s://.* | Regular expression for determining which IRIs are allowed in delegated SERVICE calls (if not overriden by the cx-common:allowServicePattern address property) | | | cx.agent.service.asset.deny | | ^$ | Regular expression for determining which IRIs are denied in delegated SERVICE calls (it not overridden by the cx-common:denyServicePattern address property) | | | -| cx.agent.dataspace.remotes | | http://consumer-edc-control:8282,http://tiera-edc-control:8282 | business partner control plane protocol urls to synchronize with | L | +| cx.agent.dataspace.remotes | | http://consumer-edc-control:8282,http://tiera-edc-control:8282 | business partner control plane protocol urls to synchronize with (if using internal matchmaking) | L | | cx.agent.sparql.verbose | | false | Controls the verbosity of the SparQL Engine | | | cx.agent.threadpool.size | | 4 | Number of threads pooled for any concurrent batch calls and synchronisation actions | | | cx.agent.federation.batch.max | | 9223372036854775807 / 8 | Maximal number of tuples to send in one query | | diff --git a/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/AgentConfig.java b/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/AgentConfig.java index c2234cf3..75532cb0 100644 --- a/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/AgentConfig.java +++ b/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/AgentConfig.java @@ -1,4 +1,4 @@ -// Copyright (c) 2022,2023 Contributors to the Eclipse Foundation +// Copyright (c) 2022,2024 Contributors to the Eclipse Foundation // // See the NOTICE file(s) distributed with this work for additional // information regarding copyright ownership. @@ -57,9 +57,7 @@ public class AgentConfig { public static final long DEFAULT_DATASPACE_SYNCINTERVAL = -1; public static final String DATASPACE_SYNCCONNECTORS_PROPERTY = "cx.agent.dataspace.remotes"; - - public static final String RDF_STORE = "cx.agent.rdf.store"; - + public static final String VALIDATION_ENDPOINTS = "edc.dataplane.token.validation.endpoints"; public static final String FEDERATION_SERVICE_BATCH_SIZE = "cx.agent.federation.batch.max"; @@ -77,8 +75,6 @@ public class AgentConfig { public static final String CALLBACK_ENDPOINT = "cx.agent.callback"; public static final String DEFAULT_SKILL_CONTRACT_PROPERTY = "cx.agent.skill.contract.default"; - - public static final String DEFAULT_GRAPH_CONTRACT_PROPERTY = "cx.agent.graph.contract.default"; public static final String SERVICE_ALLOW_PROPERTY = "cx.agent.service.allow"; public static final String DEFAULT_SERVICE_ALLOW_PATTERN = "(http|edc)s?://.*"; @@ -95,7 +91,6 @@ public class AgentConfig { public static final String TX_EDC_VERSION_PROPERTY = "cx.agent.edc.version"; public static final String MATCHMAKING_URL = "cx.agent.matchmaking"; - public static final String MATCHMAKING_REST = "cx.agent.matchmaking.rest"; /** * precompiled stuff @@ -260,10 +255,6 @@ public String[] getDataspaceSynchronizationConnectors() { return connectors; } - public String getRdfStore() { - return config.getString(RDF_STORE, null); - } - /** * access * @@ -336,15 +327,6 @@ public String getDefaultSkillContract() { return config.getString(DEFAULT_SKILL_CONTRACT_PROPERTY, null); } - /** - * access - * - * @return default graph contract - */ - public String getDefaultGraphContract() { - return config.getString(DEFAULT_GRAPH_CONTRACT_PROPERTY, null); - } - /** * access * @@ -405,16 +387,7 @@ public boolean isPrerelease() { * @return URL for Matchmaking Agent REST call */ public String getMatchmakingAgentUrl() { - return config.getString(MATCHMAKING_URL); + return config.getString(MATCHMAKING_URL, null); } - /** - * access - * - * @return URL for Matchmaking Agent REST call - */ - public boolean getMatchmakingAgentRest() { - return config.getBoolean(MATCHMAKING_REST); - } - } diff --git a/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/http/transfer/AgentSource.java b/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/http/transfer/AgentSource.java index 7b1af1ec..c96a6c50 100644 --- a/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/http/transfer/AgentSource.java +++ b/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/http/transfer/AgentSource.java @@ -1,4 +1,4 @@ -// Copyright (c) 2022,2023 Contributors to the Eclipse Foundation +// Copyright (c) 2022,2024 Contributors to the Eclipse Foundation // // See the NOTICE file(s) distributed with this work for additional // information regarding copyright ownership. @@ -39,8 +39,8 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; -import java.util.Set; import java.util.Objects; +import java.util.Set; import java.util.regex.Matcher; import java.util.stream.Stream; @@ -72,7 +72,6 @@ public class AgentSource implements DataSource { protected DataFlowRequest request; protected String matchmakingAgentUrl; - protected boolean matchmakingAgentRest; public static final String AGENT_BOUNDARY = "--"; @@ -84,10 +83,10 @@ public AgentSource() { @Override public StreamResult> openPartStream() { - if (matchmakingAgentRest) { + if (matchmakingAgentUrl != null) { return openMatchmakingRest(); } else { - return openMatchmaking(); + return openMatchmakingInternal(); } } @@ -97,7 +96,7 @@ public StreamResult> openPartStream() { * @return multipart body containing result and warnings */ @NotNull - protected StreamResult> openMatchmaking() { + protected StreamResult> openMatchmakingInternal() { // Agent call, we translate from KA-MATCH to KA-TRANSFER String skill = null; String graph = null; @@ -162,8 +161,6 @@ protected StreamResult> openMatchmakingRest() { String asset = String.valueOf(request.getSourceDataAddress().getProperties().get(AgentSourceHttpParamsDecorator.ASSET_PROP_ID)); String assetValue; OkHttpClient client = new OkHttpClient(); - //String baseUrl = "http://localhost:8082/api/agentsource"; // TODO: put baseUrl into config file - //String baseUrl = "http://matchmaking-agent:8080/agentsource"; // TODO: put baseUrl into config file String baseUrl = matchmakingAgentUrl; String url = baseUrl + "?asset=" + asset; @@ -238,8 +235,6 @@ protected StreamResult> openMatchmakingRest() { } } - - @Override public String toString() { return String.format("AgentSource(%s,%s)", requestId, name); @@ -300,11 +295,6 @@ public AgentSource.Builder matchmakingAgentUrl(String matchmakingAgentUrl) { return this; } - public AgentSource.Builder matchmakingAgentRest(boolean matchmakingAgentRest) { - dataSource.matchmakingAgentRest = matchmakingAgentRest; - return this; - } - public AgentSource build() { Objects.requireNonNull(dataSource.requestId, "requestId"); Objects.requireNonNull(dataSource.httpClient, "httpClient"); diff --git a/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/http/transfer/AgentSourceFactory.java b/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/http/transfer/AgentSourceFactory.java index 7cc0d433..ba1823b7 100644 --- a/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/http/transfer/AgentSourceFactory.java +++ b/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/http/transfer/AgentSourceFactory.java @@ -1,4 +1,4 @@ -// Copyright (c) 2022,2023 Contributors to the Eclipse Foundation +// Copyright (c) 2022,2024 Contributors to the Eclipse Foundation // // See the NOTICE file(s) distributed with this work for additional // information regarding copyright ownership. @@ -92,8 +92,7 @@ public DataSource createSource(DataFlowRequest request) { .skillStore(skillStore) .processor(processor) .request(request) - .matchmakingAgentUrl(supplier.provideMatchmakingUrl()) - .matchmakingAgentRest(supplier.provideMatchmakingRest()) + .matchmakingAgentUrl(supplier.provideMatchmakingUrl(request)) .build(); monitor.debug(String.format("Created a new agent source %s for destination type %s", dataSource, diff --git a/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/http/transfer/AgentSourceRequestParamsSupplier.java b/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/http/transfer/AgentSourceRequestParamsSupplier.java index b5595860..ed4034ce 100644 --- a/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/http/transfer/AgentSourceRequestParamsSupplier.java +++ b/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/http/transfer/AgentSourceRequestParamsSupplier.java @@ -1,4 +1,4 @@ -// Copyright (c) 2022,2023 Contributors to the Eclipse Foundation +// Copyright (c) 2022,2024 Contributors to the Eclipse Foundation // // See the NOTICE file(s) distributed with this work for additional // information regarding copyright ownership. @@ -96,11 +96,16 @@ public HttpRequestParams provideSinkParams(DataFlowRequest request) { return params.build(); } - public String provideMatchmakingUrl() { + /** + * provides the address of a matchmaking agent fitting + * to the data flow request + * + * @param request the data flow request + * + * @return a fitting matchmaking agent address + */ + public String provideMatchmakingUrl(DataFlowRequest request) { return config.getMatchmakingAgentUrl(); } - public boolean provideMatchmakingRest() { - return config.getMatchmakingAgentRest(); - } } From 5b0c75d4bc8b7b9e846d1775dad43b14c791288e Mon Sep 17 00:00:00 2001 From: "Dr. Christoph \"Schorsch\" Jung" Date: Tue, 2 Apr 2024 11:47:02 +0200 Subject: [PATCH 3/7] chore: add external matchmaking option to chart. --- .github/workflows/build.yml | 4 ++-- agent-plane/README.md | 4 ++-- agent-plane/agent-plane-protocol/README.md | 2 +- agent-plane/agent-plane-protocol/pom.xml | 2 +- .../agents/edc/service/TestDataspaceSynchronizer.java | 4 ++-- agent-plane/agentplane-azure-vault/README.md | 2 +- agent-plane/agentplane-azure-vault/pom.xml | 2 +- agent-plane/agentplane-hashicorp/README.md | 4 ++-- agent-plane/agentplane-hashicorp/pom.xml | 2 +- agent-plane/pom.xml | 2 +- charts/agent-connector-azure-vault/Chart.yaml | 4 ++-- charts/agent-connector-azure-vault/README.md | 4 ++-- .../templates/deployment-dataplane.yaml | 5 +++++ charts/agent-connector-azure-vault/values.yaml | 2 ++ charts/agent-connector-memory/Chart.yaml | 4 ++-- charts/agent-connector-memory/README.md | 4 ++-- .../templates/deployment-dataplane.yaml | 5 +++++ charts/agent-connector-memory/values.yaml | 2 ++ charts/agent-connector/Chart.yaml | 4 ++-- charts/agent-connector/README.md | 4 ++-- charts/agent-connector/templates/deployment-dataplane.yaml | 5 +++++ charts/agent-connector/values.yaml | 2 ++ common/README.md | 2 +- common/auth-jwt/README.md | 2 +- common/auth-jwt/pom.xml | 2 +- docs/README.md | 6 +++--- pom.xml | 2 +- upgrade_version.sh | 2 +- 28 files changed, 55 insertions(+), 34 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 62aaccd6..31de4979 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -137,7 +137,7 @@ jobs: type=semver,pattern={{version}} type=semver,pattern={{major}} type=semver,pattern={{major}}.{{minor}} - type=raw,value=1.12.17-SNAPSHOT,enable=${{ github.event.inputs.deploy_docker == 'true' || github.ref == format('refs/heads/{0}', 'main') }} + type=raw,value=1.12.18-SNAPSHOT,enable=${{ github.event.inputs.deploy_docker == 'true' || github.ref == format('refs/heads/{0}', 'main') }} type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} - name: Agent Plane Hashicorp Container Build and push @@ -175,7 +175,7 @@ jobs: type=semver,pattern={{version}} type=semver,pattern={{major}} type=semver,pattern={{major}}.{{minor}} - type=raw,value=1.12.17-SNAPSHOT,enable=${{ github.event.inputs.deploy_docker == 'true' || github.ref == format('refs/heads/{0}', 'main') }} + type=raw,value=1.12.18-SNAPSHOT,enable=${{ github.event.inputs.deploy_docker == 'true' || github.ref == format('refs/heads/{0}', 'main') }} type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} - name: Agent Plane Azure Vault Container Build and push diff --git a/agent-plane/README.md b/agent-plane/README.md index 172b26ec..0e4bf97d 100644 --- a/agent-plane/README.md +++ b/agent-plane/README.md @@ -66,10 +66,10 @@ mvn package -Pwith-docker-image Alternatively, after a successful build, you can invoke docker yourself ```console -docker build -t tractusx/agentplane-azure-vault:1.12.17-SNAPSHOT -f agentplane-azure-vault/src/main/docker/Dockerfile . +docker build -t tractusx/agentplane-azure-vault:1.12.18-SNAPSHOT -f agentplane-azure-vault/src/main/docker/Dockerfile . ``` ```console -docker build -t tractusx/agentplane-hashicorp:1.12.17-SNAPSHOT -f agentplane-hashicorp/src/main/docker/Dockerfile . +docker build -t tractusx/agentplane-hashicorp:1.12.18-SNAPSHOT -f agentplane-hashicorp/src/main/docker/Dockerfile . ``` diff --git a/agent-plane/agent-plane-protocol/README.md b/agent-plane/agent-plane-protocol/README.md index a1a89dc8..e55b12b2 100644 --- a/agent-plane/agent-plane-protocol/README.md +++ b/agent-plane/agent-plane-protocol/README.md @@ -64,7 +64,7 @@ Add the following dependency to your data-plane artifact pom: org.eclipse.tractusx.agents.edc agent-plane-protocol - 1.12.17-SNAPSHOT + 1.12.18-SNAPSHOT ``` diff --git a/agent-plane/agent-plane-protocol/pom.xml b/agent-plane/agent-plane-protocol/pom.xml index 120054c8..aa75d9f8 100644 --- a/agent-plane/agent-plane-protocol/pom.xml +++ b/agent-plane/agent-plane-protocol/pom.xml @@ -25,7 +25,7 @@ org.eclipse.tractusx.agents.edc agent-plane - 1.12.17-SNAPSHOT + 1.12.18-SNAPSHOT ../pom.xml diff --git a/agent-plane/agent-plane-protocol/src/test/java/org/eclipse/tractusx/agents/edc/service/TestDataspaceSynchronizer.java b/agent-plane/agent-plane-protocol/src/test/java/org/eclipse/tractusx/agents/edc/service/TestDataspaceSynchronizer.java index f61a6f5a..519f0b1d 100644 --- a/agent-plane/agent-plane-protocol/src/test/java/org/eclipse/tractusx/agents/edc/service/TestDataspaceSynchronizer.java +++ b/agent-plane/agent-plane-protocol/src/test/java/org/eclipse/tractusx/agents/edc/service/TestDataspaceSynchronizer.java @@ -88,7 +88,7 @@ public void testQuadRepresentation() { .add("@id", "4bf62562-9026-4dcf-93b5-42ea0de25490") .add("https://w3id.org/edc/v0.0.1/ns/id", "https://w3id.org/catenax/ontology/common#GraphAsset?test:ExampleAsset") .add("https://w3id.org/edc/v0.0.1/ns/contenttype", "application/json, application/xml") - .add("https://w3id.org/edc/v0.0.1/ns/version", "1.12.17-SNAPSHOT") + .add("https://w3id.org/edc/v0.0.1/ns/version", "1.12.18-SNAPSHOT") .add("https://w3id.org/edc/v0.0.1/ns/name", "Test Asset") .add("https://w3id.org/edc/v0.0.1/ns/description", "Test Asset for RDF Representation") .add("https://w3id.org/catenax/ontology/common#publishedUnderContract", "") @@ -178,7 +178,7 @@ public void testCatalogDeserialization() { " },\n" + " \"dcat:accessService\": \"ddd4b79e-f785-4e71-9fe5-4a177b3ccf54\"\n" + " },\n" + - " \"edc:version\": \"1.12.17-SNAPSHOT\",\n" + + " \"edc:version\": \"1.12.18-SNAPSHOT\",\n" + " \"http://www.w3.org/2000/01/rdf-schema#isDefinedBy\": \"\",\n" + " \"edc:name\": \"Diagnostic Trouble Code Catalogue Version 2022\",\n" + " \"http://www.w3.org/ns/shacl#shapeGraph\": \"@prefix cx-common: . \\n@prefix : .\\n@prefix cx-diag: .\\n@prefix owl: .\\n@prefix rdf: .\\n@prefix xsd: .\\n@prefix sh: .\\n\\n:OemDTC rdf:type sh:NodeShape ;\\n sh:targetClass cx-diag:DTC ;\\n sh:property [\\n sh:path cx-diag:provisionedBy ;\\n sh:hasValue ;\\n ] ;\\n sh:property [\\n sh:path cx-diag:version ;\\n sh:hasValue 0^^xsd:long ;\\n ] ;\\n sh:property [\\n sh:path cx-diag:affects ;\\n sh:class :OemDiagnosedParts ;\\n ] ;\\n\\n:OemDiagnosedParts rdf:type sh:NodeShape ;\\n sh:targetClass cx-diag:DiagnosedPart ;\\n sh:property [\\n sh:path cx-diag:provisionedBy ;\\n sh:hasValue ;\\n ] ;\\n\",\n" + diff --git a/agent-plane/agentplane-azure-vault/README.md b/agent-plane/agentplane-azure-vault/README.md index 6d1f9d51..2de37cfe 100644 --- a/agent-plane/agentplane-azure-vault/README.md +++ b/agent-plane/agentplane-azure-vault/README.md @@ -54,7 +54,7 @@ mvn -s ../../../settings.xml install -Pwith-docker-image Alternatively, after a sucessful [build](#building) the docker image of the Agent Plane is created using ```console -docker build -t tractusx//agentplane-azure-vault:1.12.17-SNAPSHOT -f src/main/docker/Dockerfile . +docker build -t tractusx//agentplane-azure-vault:1.12.18-SNAPSHOT -f src/main/docker/Dockerfile . ``` To run the docker image, you could invoke this command diff --git a/agent-plane/agentplane-azure-vault/pom.xml b/agent-plane/agentplane-azure-vault/pom.xml index 2e718276..70c52271 100644 --- a/agent-plane/agentplane-azure-vault/pom.xml +++ b/agent-plane/agentplane-azure-vault/pom.xml @@ -25,7 +25,7 @@ org.eclipse.tractusx.agents.edc agent-plane - 1.12.17-SNAPSHOT + 1.12.18-SNAPSHOT ../pom.xml diff --git a/agent-plane/agentplane-hashicorp/README.md b/agent-plane/agentplane-hashicorp/README.md index d61da6af..b2be868b 100644 --- a/agent-plane/agentplane-hashicorp/README.md +++ b/agent-plane/agentplane-hashicorp/README.md @@ -54,7 +54,7 @@ mvn -s ../../../settings.xml install -Pwith-docker-image Alternatively, after a sucessful [build](#building) the docker image of the Agent Plane is created using ```console -docker build -t tractusx/agentplane-hashicorp:1.12.17-SNAPSHOT -f src/main/docker/Dockerfile . +docker build -t tractusx/agentplane-hashicorp:1.12.18-SNAPSHOT -f src/main/docker/Dockerfile . ``` To run the docker image, you could invoke this command @@ -66,7 +66,7 @@ docker run -p 8082:8082 \ -v $(pwd)/resources/dataplane.properties:/app/configuration.properties \ -v $(pwd)/resources/opentelemetry.properties:/app/opentelemetry.properties \ -v $(pwd)/resources/logging.properties:/app/logging.properties \ - tractusx/agentplane-hashicorp:1.12.17-SNAPSHOT + tractusx/agentplane-hashicorp:1.12.18-SNAPSHOT ```` Afterwards, you should be able to access the [local SparQL endpoint](http://localhost:8082/api/agent) via diff --git a/agent-plane/agentplane-hashicorp/pom.xml b/agent-plane/agentplane-hashicorp/pom.xml index 24959352..089f3e2a 100644 --- a/agent-plane/agentplane-hashicorp/pom.xml +++ b/agent-plane/agentplane-hashicorp/pom.xml @@ -25,7 +25,7 @@ org.eclipse.tractusx.agents.edc agent-plane - 1.12.17-SNAPSHOT + 1.12.18-SNAPSHOT ../pom.xml diff --git a/agent-plane/pom.xml b/agent-plane/pom.xml index 0e45dbfc..0afb0d58 100644 --- a/agent-plane/pom.xml +++ b/agent-plane/pom.xml @@ -28,7 +28,7 @@ org.eclipse.tractusx.agents edc - 1.12.17-SNAPSHOT + 1.12.18-SNAPSHOT ../pom.xml Tractus-X EDC Agent Plane diff --git a/charts/agent-connector-azure-vault/Chart.yaml b/charts/agent-connector-azure-vault/Chart.yaml index 3c86532b..1684030f 100644 --- a/charts/agent-connector-azure-vault/Chart.yaml +++ b/charts/agent-connector-azure-vault/Chart.yaml @@ -42,12 +42,12 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.12.17-SNAPSHOT +version: 1.12.18-SNAPSHOT # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "1.12.17-SNAPSHOT" +appVersion: "1.12.18-SNAPSHOT" home: https://github.com/eclipse-tractusx/knowledge-agents-edc/ sources: - https://github.com/eclipse-tractusx/knowledge-agents-edc/tree/main/charts/agent-connector diff --git a/charts/agent-connector-azure-vault/README.md b/charts/agent-connector-azure-vault/README.md index f214ae7e..f9867780 100644 --- a/charts/agent-connector-azure-vault/README.md +++ b/charts/agent-connector-azure-vault/README.md @@ -20,7 +20,7 @@ # agent-connector-azure-vault -![Version: 1.12.17-SNAPSHOT](https://img.shields.io/badge/Version-1.12.17--SNAPSHOT-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.12.17-SNAPSHOT](https://img.shields.io/badge/AppVersion-1.12.17--SNAPSHOT-informational?style=flat-square) +![Version: 1.12.18-SNAPSHOT](https://img.shields.io/badge/Version-1.12.17--SNAPSHOT-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.12.18-SNAPSHOT](https://img.shields.io/badge/AppVersion-1.12.17--SNAPSHOT-informational?style=flat-square) A Helm chart for an Agent-Enabled Tractus-X Eclipse Data Space Connector configured against Azure Vault. This is a variant of [the Tractus-X Azure Vault Connector Helm Chart](https://github.com/eclipse-tractusx/tractusx-edc/tree/main/charts/tractusx-connector-azure-vault) which allows to deal with several data (and agent) planes. The connector deployment consists of at least two runtime consists of a @@ -112,7 +112,7 @@ Combined, run this shell command to start the in-memory Tractus-X EDC runtime: ```shell helm repo add eclipse-tractusx https://eclipse-tractusx.github.io/charts/dev -helm install my-release eclipse-tractusx/agent-connector-azure-vault --version 1.12.17-SNAPSHOT\ +helm install my-release eclipse-tractusx/agent-connector-azure-vault --version 1.12.18-SNAPSHOT\ -f /tractusx-connector-azure-vault-test.yaml \ --set vault.azure.name=$AZURE_VAULT_NAME \ --set vault.azure.client=$AZURE_CLIENT_ID \ diff --git a/charts/agent-connector-azure-vault/templates/deployment-dataplane.yaml b/charts/agent-connector-azure-vault/templates/deployment-dataplane.yaml index d6524e8a..ac1c1bdc 100644 --- a/charts/agent-connector-azure-vault/templates/deployment-dataplane.yaml +++ b/charts/agent-connector-azure-vault/templates/deployment-dataplane.yaml @@ -191,6 +191,11 @@ spec: value: {{ $dataplane.agent.edcVersion | default $root.Values.controlplane.image.tag | quote }} {{- end }} + {{- if $dataplane.agent.matchmaking }} + - name: "CX_AGENT_MATCHMAKING" + value: {{ $dataplane.agent.matchmaking | quote }} + {{- end }} + {{- if $dataplane.agent.default }} ############### diff --git a/charts/agent-connector-azure-vault/values.yaml b/charts/agent-connector-azure-vault/values.yaml index 18b9d72a..4973afa3 100644 --- a/charts/agent-connector-azure-vault/values.yaml +++ b/charts/agent-connector-azure-vault/values.yaml @@ -536,6 +536,8 @@ dataplanes: @base . # -- Agent-Specific Settings agent: + # -- Refers to an external matchmaking agent, set to a url string + matchmaking: {} # -- A list of local or remote graph descriptions to build the default meta-graph/federated data catalogue default: - dataspace.ttl diff --git a/charts/agent-connector-memory/Chart.yaml b/charts/agent-connector-memory/Chart.yaml index a132c336..e1c754f5 100644 --- a/charts/agent-connector-memory/Chart.yaml +++ b/charts/agent-connector-memory/Chart.yaml @@ -42,12 +42,12 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.12.17-SNAPSHOT +version: 1.12.18-SNAPSHOT # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "1.12.17-SNAPSHOT" +appVersion: "1.12.18-SNAPSHOT" home: https://github.com/eclipse-tractusx/knowledge-agents-edc/ sources: - https://github.com/eclipse-tractusx/knowledge-agents-edc/tree/main/charts/agent-connector diff --git a/charts/agent-connector-memory/README.md b/charts/agent-connector-memory/README.md index acf119b9..98b5cdbe 100644 --- a/charts/agent-connector-memory/README.md +++ b/charts/agent-connector-memory/README.md @@ -20,7 +20,7 @@ # agent-connector-memory -![Version: 1.12.17-SNAPSHOT](https://img.shields.io/badge/Version-1.12.17--SNAPSHOT-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.12.17-SNAPSHOT](https://img.shields.io/badge/AppVersion-1.12.17--SNAPSHOT-informational?style=flat-square) +![Version: 1.12.18-SNAPSHOT](https://img.shields.io/badge/Version-1.12.17--SNAPSHOT-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.12.18-SNAPSHOT](https://img.shields.io/badge/AppVersion-1.12.17--SNAPSHOT-informational?style=flat-square) A Helm chart for an Agent-Enabled Tractus-X Eclipse Data Space Connector using In-Memory Persistence. This is a variant of [the Tractus-X In-Memory Connector Helm Chart](https://github.com/eclipse-tractusx/tractusx-edc/tree/main/charts/tractusx-connector-memory) which allows to deal with several data (and agent) planes. The connector deployment consists of at least two runtime consists of a @@ -108,7 +108,7 @@ Combined, run this shell command to start the in-memory Tractus-X EDC runtime: ```shell helm repo add eclipse-tractusx https://eclipse-tractusx.github.io/charts/dev -helm install my-release eclipse-tractusx/agent-connector --version 1.12.17-SNAPSHOT +helm install my-release eclipse-tractusx/agent-connector --version 1.12.18-SNAPSHOT ``` ## Maintainers diff --git a/charts/agent-connector-memory/templates/deployment-dataplane.yaml b/charts/agent-connector-memory/templates/deployment-dataplane.yaml index 1005492f..1d9d10bc 100644 --- a/charts/agent-connector-memory/templates/deployment-dataplane.yaml +++ b/charts/agent-connector-memory/templates/deployment-dataplane.yaml @@ -191,6 +191,11 @@ spec: value: {{ $dataplane.agent.edcVersion | default $root.Values.controlplane.image.tag | quote }} {{- end }} + {{- if $dataplane.agent.matchmaking }} + - name: "CX_AGENT_MATCHMAKING" + value: {{ $dataplane.agent.matchmaking | quote }} + {{- end }} + {{- if $dataplane.agent.default }} ############### diff --git a/charts/agent-connector-memory/values.yaml b/charts/agent-connector-memory/values.yaml index 091eb427..8ea8603c 100644 --- a/charts/agent-connector-memory/values.yaml +++ b/charts/agent-connector-memory/values.yaml @@ -533,6 +533,8 @@ dataplanes: @base . # -- Agent-Specific Settings agent: + # -- Refers to an external matchmaking agent, set to a url string + matchmaking: {} # -- A list of local or remote graph descriptions to build the default meta-graph/federated data catalogue default: - dataspace.ttl diff --git a/charts/agent-connector/Chart.yaml b/charts/agent-connector/Chart.yaml index 3050ae37..187476ab 100644 --- a/charts/agent-connector/Chart.yaml +++ b/charts/agent-connector/Chart.yaml @@ -41,12 +41,12 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.12.17-SNAPSHOT +version: 1.12.18-SNAPSHOT # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "1.12.17-SNAPSHOT" +appVersion: "1.12.18-SNAPSHOT" home: https://github.com/eclipse-tractusx/knowledge-agents-edc/ sources: - https://github.com/eclipse-tractusx/knowledge-agents-edc/tree/main/charts/agent-connector diff --git a/charts/agent-connector/README.md b/charts/agent-connector/README.md index 25453b8b..620e7497 100644 --- a/charts/agent-connector/README.md +++ b/charts/agent-connector/README.md @@ -20,7 +20,7 @@ # agent-connector -![Version: 1.12.17-SNAPSHOT](https://img.shields.io/badge/Version-1.12.17--SNAPSHOT-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.12.17-SNAPSHOT](https://img.shields.io/badge/AppVersion-1.12.17--SNAPSHOT-informational?style=flat-square) +![Version: 1.12.18-SNAPSHOT](https://img.shields.io/badge/Version-1.12.17--SNAPSHOT-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.12.18-SNAPSHOT](https://img.shields.io/badge/AppVersion-1.12.17--SNAPSHOT-informational?style=flat-square) A Helm chart for an Agent-Enabled Tractus-X Eclipse Data Space Connector. This is a variant of [the Tractus-X Connector Helm Chart](https://github.com/eclipse-tractusx/tractusx-edc/tree/main/charts/tractusx-connector) which allows to deal with several data (and agent) planes. The connector deployment consists of at least two runtime consists of a @@ -108,7 +108,7 @@ Combined, run this shell command to start the in-memory Tractus-X EDC runtime: ```shell helm repo add eclipse-tractusx https://eclipse-tractusx.github.io/charts/dev -helm install my-release eclipse-tractusx/agent-connector --version 1.12.17-SNAPSHOT +helm install my-release eclipse-tractusx/agent-connector --version 1.12.18-SNAPSHOT ``` ## Maintainers diff --git a/charts/agent-connector/templates/deployment-dataplane.yaml b/charts/agent-connector/templates/deployment-dataplane.yaml index b487be00..88025036 100644 --- a/charts/agent-connector/templates/deployment-dataplane.yaml +++ b/charts/agent-connector/templates/deployment-dataplane.yaml @@ -191,6 +191,11 @@ spec: value: {{ $dataplane.agent.edcVersion | default $root.Values.controlplane.image.tag | quote }} {{- end }} + {{- if $dataplane.agent.matchmaking }} + - name: "CX_AGENT_MATCHMAKING" + value: {{ $dataplane.agent.matchmaking | quote }} + {{- end }} + {{- if $dataplane.agent.default }} ############### diff --git a/charts/agent-connector/values.yaml b/charts/agent-connector/values.yaml index e597c6b5..a74346e6 100644 --- a/charts/agent-connector/values.yaml +++ b/charts/agent-connector/values.yaml @@ -533,6 +533,8 @@ dataplanes: @base . # -- Agent-Specific Settings agent: + # -- Refers to an external matchmaking agent, set to a url string + matchmaking: {} # -- A list of local or remote graph descriptions to build the default meta-graph/federated data catalogue default: - dataspace.ttl diff --git a/common/README.md b/common/README.md index 48f104b7..507d1e67 100644 --- a/common/README.md +++ b/common/README.md @@ -57,7 +57,7 @@ add the following dependency to your maven dependencies (gradle should work anal org.eclipse.tractusx.edc auth-jwt - 1.12.17-SNAPSHOT + 1.12.18-SNAPSHOT diff --git a/common/auth-jwt/README.md b/common/auth-jwt/README.md index 5e13929d..ca49fcb1 100644 --- a/common/auth-jwt/README.md +++ b/common/auth-jwt/README.md @@ -37,7 +37,7 @@ Add the following dependency to your EDC artifact pom: org.eclipse.tractusx.agents.edc auth-jwt - 1.12.17-SNAPSHOT + 1.12.18-SNAPSHOT ``` diff --git a/common/auth-jwt/pom.xml b/common/auth-jwt/pom.xml index 83af4452..35550357 100644 --- a/common/auth-jwt/pom.xml +++ b/common/auth-jwt/pom.xml @@ -27,7 +27,7 @@ org.eclipse.tractusx.agents edc - 1.12.17-SNAPSHOT + 1.12.18-SNAPSHOT ../../pom.xml diff --git a/docs/README.md b/docs/README.md index 087e2633..a52f3ac8 100644 --- a/docs/README.md +++ b/docs/README.md @@ -76,7 +76,7 @@ dependencies: - name: agent-connector-memory repository: https://eclipse-tractusx.github.io/charts/dev - version: 1.12.17-SNAPSHOT + version: 1.12.18-SNAPSHOT alias: my-connector ``` @@ -87,7 +87,7 @@ dependencies: - name: agent-connector-azure-vault repository: https://eclipse-tractusx.github.io/charts/dev - version: 1.12.17-SNAPSHOT + version: 1.12.18-SNAPSHOT alias: my-connector ``` @@ -98,7 +98,7 @@ dependencies: - name: agent-connector repository: https://eclipse-tractusx.github.io/charts/dev - version: 1.12.17-SNAPSHOT + version: 1.12.18-SNAPSHOT alias: my-connector ``` diff --git a/pom.xml b/pom.xml index e0be1bcb..d68fa138 100644 --- a/pom.xml +++ b/pom.xml @@ -26,7 +26,7 @@ 4.0.0 org.eclipse.tractusx.agents edc - 1.12.17-SNAPSHOT + 1.12.18-SNAPSHOT pom Tractus-X Knowledge Agents EDC Extensions EDC-Related Artifacts for Federated Procedure Calls diff --git a/upgrade_version.sh b/upgrade_version.sh index 77d4e8e5..d4df3391 100755 --- a/upgrade_version.sh +++ b/upgrade_version.sh @@ -16,7 +16,7 @@ # # SPDX-License-Identifier: Apache-2.0 -OLD_VERSION=1.12.17-SNAPSHOT +OLD_VERSION=1.12.18-SNAPSHOT echo Upgrading from $OLD_VERSION to $1 PATTERN=s/$OLD_VERSION/$1/g LC_ALL=C From 233086af4432eae75ce1e5aaf80d40a20c1d7256 Mon Sep 17 00:00:00 2001 From: "Dr. Christoph \"Schorsch\" Jung" Date: Tue, 2 Apr 2024 11:53:46 +0200 Subject: [PATCH 4/7] chore: recheck DEPENDENCIES. --- DEPENDENCIES | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/DEPENDENCIES b/DEPENDENCIES index 9164a18d..723b36e1 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -97,9 +97,9 @@ maven/mavencentral/io.swagger.core.v3/swagger-jaxrs2-jakarta/2.2.2, Apache-2.0, maven/mavencentral/io.swagger.core.v3/swagger-models-jakarta/2.2.2, Apache-2.0, approved, #5919 maven/mavencentral/jakarta.activation/jakarta.activation-api/2.1.0, EPL-2.0 OR BSD-3-Clause OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jaf maven/mavencentral/jakarta.annotation/jakarta.annotation-api/2.1.1, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.ca -maven/mavencentral/jakarta.inject/jakarta.inject-api/2.0.1, Apache-2.0, approved, clearlydefined -maven/mavencentral/jakarta.json/jakarta.json-api/2.1.1, EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0, approved, #7907 -maven/mavencentral/jakarta.transaction/jakarta.transaction-api/2.0.0, EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0, approved, #7697 +maven/mavencentral/jakarta.inject/jakarta.inject-api/2.0.1, Apache-2.0, approved, ee4j.cdi +maven/mavencentral/jakarta.json/jakarta.json-api/2.1.1, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jsonp +maven/mavencentral/jakarta.transaction/jakarta.transaction-api/2.0.0, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jta maven/mavencentral/jakarta.validation/jakarta.validation-api/3.0.2, Apache-2.0, approved, ee4j.validation maven/mavencentral/jakarta.ws.rs/jakarta.ws.rs-api/3.1.0, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.rest maven/mavencentral/jakarta.xml.bind/jakarta.xml.bind-api/4.0.0, BSD-3-Clause, approved, ee4j.jaxb @@ -224,8 +224,8 @@ maven/mavencentral/org.eclipse.jetty/jetty-servlet/11.0.15, EPL-2.0 OR Apache-2. maven/mavencentral/org.eclipse.jetty/jetty-util/11.0.16, EPL-2.0 OR Apache-2.0, approved, rt.jetty maven/mavencentral/org.eclipse.jetty/jetty-webapp/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty maven/mavencentral/org.eclipse.jetty/jetty-xml/11.0.16, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.tractusx.agents.edc.agent-plane/agent-plane-protocol/1.12.17-SNAPSHOT, Apache-2.0, approved, automotive.tractusx -maven/mavencentral/org.eclipse.tractusx.edc/auth-jwt/1.12.17-SNAPSHOT, Apache-2.0, approved, automotive.tractusx +maven/mavencentral/org.eclipse.tractusx.agents.edc.agent-plane/agent-plane-protocol/1.12.18-SNAPSHOT, Apache-2.0, approved, automotive.tractusx +maven/mavencentral/org.eclipse.tractusx.edc/auth-jwt/1.12.18-SNAPSHOT, Apache-2.0, approved, automotive.tractusx maven/mavencentral/org.eclipse.tractusx.edc/core-spi/0.5.3, Apache-2.0, approved, automotive.tractusx maven/mavencentral/org.eclipse.tractusx.edc/edc-dataplane-azure-vault/0.5.3, Apache-2.0, approved, automotive.tractusx maven/mavencentral/org.eclipse.tractusx.edc/edc-dataplane-base/0.5.3, Apache-2.0, approved, automotive.tractusx From d38a67ed157617f21058451939058d1f9b5ff28f Mon Sep 17 00:00:00 2001 From: "Dr. Christoph \"Schorsch\" Jung" Date: Tue, 2 Apr 2024 11:57:47 +0200 Subject: [PATCH 5/7] chore: updated helm docs. --- charts/agent-connector-azure-vault/README.md | 5 +++-- charts/agent-connector-memory/README.md | 5 +++-- charts/agent-connector/README.md | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/charts/agent-connector-azure-vault/README.md b/charts/agent-connector-azure-vault/README.md index f9867780..a59d21a7 100644 --- a/charts/agent-connector-azure-vault/README.md +++ b/charts/agent-connector-azure-vault/README.md @@ -20,7 +20,7 @@ # agent-connector-azure-vault -![Version: 1.12.18-SNAPSHOT](https://img.shields.io/badge/Version-1.12.17--SNAPSHOT-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.12.18-SNAPSHOT](https://img.shields.io/badge/AppVersion-1.12.17--SNAPSHOT-informational?style=flat-square) +![Version: 1.12.18-SNAPSHOT](https://img.shields.io/badge/Version-1.12.18--SNAPSHOT-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.12.18-SNAPSHOT](https://img.shields.io/badge/AppVersion-1.12.18--SNAPSHOT-informational?style=flat-square) A Helm chart for an Agent-Enabled Tractus-X Eclipse Data Space Connector configured against Azure Vault. This is a variant of [the Tractus-X Azure Vault Connector Helm Chart](https://github.com/eclipse-tractusx/tractusx-edc/tree/main/charts/tractusx-connector-azure-vault) which allows to deal with several data (and agent) planes. The connector deployment consists of at least two runtime consists of a @@ -243,9 +243,10 @@ helm install my-release eclipse-tractusx/agent-connector-azure-vault --version 1 | controlplane.volumes | list | `[]` | [volume](https://kubernetes.io/docs/concepts/storage/volumes/) directories | | customLabels | object | `{}` | To add some custom labels | | dataplanes.dataplane.affinity | object | `{}` | | -| dataplanes.dataplane.agent | object | `{"connectors":[],"default":["dataspace.ttl","https://w3id.org/catenax/ontology.ttl"],"maxbatchsize":"9223372036854775807","services":{"allow":"(edcs?://.*)|(https://query\\\\.wikidata\\\\.org/sparql)","asset":{"allow":"(edcs?://.*)","deny":"https?://.*"},"deny":"http://.*"},"skillcontract":"Contract?partner=Skill","synchronization":-1}` | Agent-Specific Settings | +| dataplanes.dataplane.agent | object | `{"connectors":[],"default":["dataspace.ttl","https://w3id.org/catenax/ontology.ttl"],"matchmaking":{},"maxbatchsize":"9223372036854775807","services":{"allow":"(edcs?://.*)|(https://query\\\\.wikidata\\\\.org/sparql)","asset":{"allow":"(edcs?://.*)","deny":"https?://.*"},"deny":"http://.*"},"skillcontract":"Contract?partner=Skill","synchronization":-1}` | Agent-Specific Settings | | dataplanes.dataplane.agent.connectors | list | `[]` | The list of remote connector IDS URLs to synchronize with | | dataplanes.dataplane.agent.default | list | `["dataspace.ttl","https://w3id.org/catenax/ontology.ttl"]` | A list of local or remote graph descriptions to build the default meta-graph/federated data catalogue | +| dataplanes.dataplane.agent.matchmaking | object | `{}` | Refers to an external matchmaking agent, set to a url string | | dataplanes.dataplane.agent.maxbatchsize | string | `"9223372036854775807"` | Sets the maximal batch size when delegating to agents and services | | dataplanes.dataplane.agent.services | object | `{"allow":"(edcs?://.*)|(https://query\\\\.wikidata\\\\.org/sparql)","asset":{"allow":"(edcs?://.*)","deny":"https?://.*"},"deny":"http://.*"}` | A set of configs for regulating outgoing service calls | | dataplanes.dataplane.agent.services.allow | string | `"(edcs?://.*)|(https://query\\\\.wikidata\\\\.org/sparql)"` | A regular expression which outgoing service URLs must match (unless overwritten by a specific asset property) | diff --git a/charts/agent-connector-memory/README.md b/charts/agent-connector-memory/README.md index 98b5cdbe..75d92e31 100644 --- a/charts/agent-connector-memory/README.md +++ b/charts/agent-connector-memory/README.md @@ -20,7 +20,7 @@ # agent-connector-memory -![Version: 1.12.18-SNAPSHOT](https://img.shields.io/badge/Version-1.12.17--SNAPSHOT-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.12.18-SNAPSHOT](https://img.shields.io/badge/AppVersion-1.12.17--SNAPSHOT-informational?style=flat-square) +![Version: 1.12.18-SNAPSHOT](https://img.shields.io/badge/Version-1.12.18--SNAPSHOT-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.12.18-SNAPSHOT](https://img.shields.io/badge/AppVersion-1.12.18--SNAPSHOT-informational?style=flat-square) A Helm chart for an Agent-Enabled Tractus-X Eclipse Data Space Connector using In-Memory Persistence. This is a variant of [the Tractus-X In-Memory Connector Helm Chart](https://github.com/eclipse-tractusx/tractusx-edc/tree/main/charts/tractusx-connector-memory) which allows to deal with several data (and agent) planes. The connector deployment consists of at least two runtime consists of a @@ -234,9 +234,10 @@ helm install my-release eclipse-tractusx/agent-connector --version 1.12.18-SNAPS | controlplane.volumes | list | `[]` | [volume](https://kubernetes.io/docs/concepts/storage/volumes/) directories | | customLabels | object | `{}` | To add some custom labels | | dataplanes.dataplane.affinity | object | `{}` | | -| dataplanes.dataplane.agent | object | `{"connectors":[],"default":["dataspace.ttl","https://w3id.org/catenax/ontology.ttl"],"maxbatchsize":"9223372036854775807","services":{"allow":"(edcs?://.*)|(https://query\\\\.wikidata\\\\.org/sparql)","asset":{"allow":"(edcs?://.*)","deny":"https?://.*"},"deny":"http://.*"},"skillcontract":"Contract?partner=Skill","synchronization":-1}` | Agent-Specific Settings | +| dataplanes.dataplane.agent | object | `{"connectors":[],"default":["dataspace.ttl","https://w3id.org/catenax/ontology.ttl"],"matchmaking":{},"maxbatchsize":"9223372036854775807","services":{"allow":"(edcs?://.*)|(https://query\\\\.wikidata\\\\.org/sparql)","asset":{"allow":"(edcs?://.*)","deny":"https?://.*"},"deny":"http://.*"},"skillcontract":"Contract?partner=Skill","synchronization":-1}` | Agent-Specific Settings | | dataplanes.dataplane.agent.connectors | list | `[]` | The list of remote connector IDS URLs to synchronize with | | dataplanes.dataplane.agent.default | list | `["dataspace.ttl","https://w3id.org/catenax/ontology.ttl"]` | A list of local or remote graph descriptions to build the default meta-graph/federated data catalogue | +| dataplanes.dataplane.agent.matchmaking | object | `{}` | Refers to an external matchmaking agent, set to a url string | | dataplanes.dataplane.agent.maxbatchsize | string | `"9223372036854775807"` | Sets the maximal batch size when delegating to agents and services | | dataplanes.dataplane.agent.services | object | `{"allow":"(edcs?://.*)|(https://query\\\\.wikidata\\\\.org/sparql)","asset":{"allow":"(edcs?://.*)","deny":"https?://.*"},"deny":"http://.*"}` | A set of configs for regulating outgoing service calls | | dataplanes.dataplane.agent.services.allow | string | `"(edcs?://.*)|(https://query\\\\.wikidata\\\\.org/sparql)"` | A regular expression which outgoing service URLs must match (unless overwritten by a specific asset property) | diff --git a/charts/agent-connector/README.md b/charts/agent-connector/README.md index 620e7497..2fc16142 100644 --- a/charts/agent-connector/README.md +++ b/charts/agent-connector/README.md @@ -20,7 +20,7 @@ # agent-connector -![Version: 1.12.18-SNAPSHOT](https://img.shields.io/badge/Version-1.12.17--SNAPSHOT-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.12.18-SNAPSHOT](https://img.shields.io/badge/AppVersion-1.12.17--SNAPSHOT-informational?style=flat-square) +![Version: 1.12.18-SNAPSHOT](https://img.shields.io/badge/Version-1.12.18--SNAPSHOT-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.12.18-SNAPSHOT](https://img.shields.io/badge/AppVersion-1.12.18--SNAPSHOT-informational?style=flat-square) A Helm chart for an Agent-Enabled Tractus-X Eclipse Data Space Connector. This is a variant of [the Tractus-X Connector Helm Chart](https://github.com/eclipse-tractusx/tractusx-edc/tree/main/charts/tractusx-connector) which allows to deal with several data (and agent) planes. The connector deployment consists of at least two runtime consists of a @@ -235,9 +235,10 @@ helm install my-release eclipse-tractusx/agent-connector --version 1.12.18-SNAPS | controlplane.volumes | list | `[]` | [volume](https://kubernetes.io/docs/concepts/storage/volumes/) directories | | customLabels | object | `{}` | To add some custom labels | | dataplanes.dataplane.affinity | object | `{}` | | -| dataplanes.dataplane.agent | object | `{"connectors":[],"default":["dataspace.ttl","https://w3id.org/catenax/ontology.ttl"],"maxbatchsize":"9223372036854775807","services":{"allow":"(edcs?://.*)|(https://query\\\\.wikidata\\\\.org/sparql)","asset":{"allow":"(edcs?://.*)","deny":"https?://.*"},"deny":"http://.*"},"skillcontract":"Contract?partner=Skill","synchronization":-1}` | Agent-Specific Settings | +| dataplanes.dataplane.agent | object | `{"connectors":[],"default":["dataspace.ttl","https://w3id.org/catenax/ontology.ttl"],"matchmaking":{},"maxbatchsize":"9223372036854775807","services":{"allow":"(edcs?://.*)|(https://query\\\\.wikidata\\\\.org/sparql)","asset":{"allow":"(edcs?://.*)","deny":"https?://.*"},"deny":"http://.*"},"skillcontract":"Contract?partner=Skill","synchronization":-1}` | Agent-Specific Settings | | dataplanes.dataplane.agent.connectors | list | `[]` | The list of remote connector IDS URLs to synchronize with | | dataplanes.dataplane.agent.default | list | `["dataspace.ttl","https://w3id.org/catenax/ontology.ttl"]` | A list of local or remote graph descriptions to build the default meta-graph/federated data catalogue | +| dataplanes.dataplane.agent.matchmaking | object | `{}` | Refers to an external matchmaking agent, set to a url string | | dataplanes.dataplane.agent.maxbatchsize | string | `"9223372036854775807"` | Sets the maximal batch size when delegating to agents and services | | dataplanes.dataplane.agent.services | object | `{"allow":"(edcs?://.*)|(https://query\\\\.wikidata\\\\.org/sparql)","asset":{"allow":"(edcs?://.*)","deny":"https?://.*"},"deny":"http://.*"}` | A set of configs for regulating outgoing service calls | | dataplanes.dataplane.agent.services.allow | string | `"(edcs?://.*)|(https://query\\\\.wikidata\\\\.org/sparql)"` | A regular expression which outgoing service URLs must match (unless overwritten by a specific asset property) | From 26acff95b8acd58c4e52836ce0ef5183cffff33c Mon Sep 17 00:00:00 2001 From: "Dr. Christoph \"Schorsch\" Jung" Date: Thu, 4 Apr 2024 13:52:31 +0200 Subject: [PATCH 6/7] chore/fix: introduce and document local ct install method. simplify setup java --- .github/actions/setup-java/action.yml | 32 --------- .github/workflows/build.yml | 9 ++- .github/workflows/dependencies.yml | 98 +++++++++++++++++++++++++++ .github/workflows/veracode.yml | 10 ++- README.md | 31 ++++++++- kind.config.yaml | 35 ++++++++++ 6 files changed, 178 insertions(+), 37 deletions(-) delete mode 100644 .github/actions/setup-java/action.yml create mode 100644 .github/workflows/dependencies.yml create mode 100644 kind.config.yaml diff --git a/.github/actions/setup-java/action.yml b/.github/actions/setup-java/action.yml deleted file mode 100644 index 40fd6e59..00000000 --- a/.github/actions/setup-java/action.yml +++ /dev/null @@ -1,32 +0,0 @@ -# -# Copyright (c) 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) -# Copyright (c) 2023 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 Apache License, Version 2.0 which is available at -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -# SPDX-License-Identifier: Apache-2.0 -# - ---- -name: "Setup JDK 17" -description: "Setup JDK 17" -runs: - using: "composite" - steps: - - name: Setup JDK 17 - uses: actions/setup-java@v3.11.0 - with: - java-version: '17' - distribution: 'temurin' - cache: 'maven' \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 31de4979..d98fae84 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -91,8 +91,13 @@ jobs: with: submodules: recursive - # Setup build environment - - uses: ./.github/actions/setup-java + # Set-Up + - name: Setup JDK 17 + uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1 + with: + java-version: '17' + distribution: 'temurin' + cache: 'maven' # Enable deployment access (on demand or main branch and version tags only) - name: Login to GitHub Container Registry diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml new file mode 100644 index 00000000..3964bc82 --- /dev/null +++ b/.github/workflows/dependencies.yml @@ -0,0 +1,98 @@ +############################################################### +# Copyright (c) 2021, 2024 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 Apache License, Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0. +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# SPDX-License-Identifier: Apache-2.0 +############################################################### + +name: Check Dependencies + +on: + push: + branches: + - main + - 'release/*' + pull_request: + branches: + - main + - 'release/*' + types: + - opened + - synchronize + - reopened + workflow_dispatch: + +jobs: + check-dependencies: + + runs-on: ubuntu-latest + strategy: + matrix: + dotnet-version: ['7.0'] + + steps: + + # Get the Code + - name: Checkout repository + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + submodules: recursive + + # Set-Up + - name: Setup JDK 17 + uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1 + with: + java-version: '17' + distribution: 'temurin' + cache: 'maven' + + # Run Maven Deploy (on demand or if either running on main or a version tag) + - name: Generate Dependencies file + if: ${{ ( github.event.inputs.deploy_maven == 'true' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') ) }} + run: | + ./mvnw org.eclipse.dash:license-tool-plugin:license-check -Ddash.summary=DEPENDENCIES + + - name: Check if dependencies were changed + id: dependencies-changed + run: | + changed=$(git diff DEPENDENCIES) + if [[ -n "$changed" ]]; then + echo "dependencies changed" + echo "changed=true" >> $GITHUB_OUTPUT + else + echo "dependencies not changed" + echo "changed=false" >> $GITHUB_OUTPUT + fi + + - name: Check for restricted dependencies + run: | + restricted=$(grep ' restricted,' DEPENDENCIES || true) + if [[ -n "$restricted" ]]; then + echo "The following dependencies are restricted: $restricted" + exit 1 + fi + if: steps.dependencies-changed.outputs.changed == 'true' + + - name: Upload DEPENDENCIES file + uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 + with: + path: DEPENDENCIES + if: steps.dependencies-changed.outputs.changed == 'true' + + - name: Signal need to update DEPENDENCIES + run: | + echo "Dependencies need to be updated (updated DEPENDENCIES file has been uploaded to workflow run)" + exit 1 + if: steps.dependencies-changed.outputs.changed == 'true' diff --git a/.github/workflows/veracode.yml b/.github/workflows/veracode.yml index 8119fcee..9d4f03af 100644 --- a/.github/workflows/veracode.yml +++ b/.github/workflows/veracode.yml @@ -60,9 +60,15 @@ jobs: variant: [ { dir: agent-plane, name: agentplane-azure-vault }, { dir: agent-plane, name: agentplane-hashicorp } ] steps: - # Set-Up + # Get Code - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - uses: ./.github/actions/setup-java + # Set-Up + - name: Setup JDK 17 + uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1 + with: + java-version: '17' + distribution: 'temurin' + cache: 'maven' # Build - name: Build ${{ matrix.variant.name }} run: |- diff --git a/README.md b/README.md index 1700fa9e..eafb1dc7 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@