diff --git a/.github/codeql/codeql-config.yml b/.github/configs/codeql-config.yml similarity index 100% rename from .github/codeql/codeql-config.yml rename to .github/configs/codeql-config.yml diff --git a/.github/configs/cr-config.yml b/.github/configs/cr-config.yml new file mode 100644 index 0000000000..05ecbb1719 --- /dev/null +++ b/.github/configs/cr-config.yml @@ -0,0 +1 @@ +release-notes-file: CHANGELOG-temp.md \ No newline at end of file diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index c0aeabce9f..f3cdc69b3f 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -67,7 +67,7 @@ jobs: # Prefix the list here with "+" to use these queries and those in the config file. # queries: ./path/to/local/query, your-org/your-repo/queries@main # The queries security-extended and security-and-quality are built into CodeQL. - config-file: ./.github/codeql/codeql-config.yml + config-file: ./.github/configs/codeql-config.yml queries: +security-and-quality,security-extended - name: Cache maven packages diff --git a/.github/workflows/helm-chart-release.yaml b/.github/workflows/helm-chart-release.yaml index f55d79cfc6..5c50ac9186 100644 --- a/.github/workflows/helm-chart-release.yaml +++ b/.github/workflows/helm-chart-release.yaml @@ -60,15 +60,31 @@ jobs: version: v3.8.1 - name: Update helm dependencies for irs + working-directory: charts/irs-helm/ run: | - cd charts/irs-helm helm repo add bitnami https://charts.bitnami.com/bitnami helm repo add minio https://charts.min.io/ helm repo add prometheus-community https://prometheus-community.github.io/helm-charts helm repo add grafana https://grafana.github.io/helm-charts helm dependency update + - name: Create temporary CHANGELOG file for helm release + working-directory: charts/irs-helm/ + run: | + touch CHANGELOG-temp.md + + currentVersionNumber=$(echo ${{ needs.get-helm-charts-versions-irs.outputs.current_version }} | sed -e "s/^irs-helm-//" ) + echo currentVersionNumber=$currentVersionNumber + + sed -n -e '/## \['"${currentVersionNumber}"'\]/,/## \[/ p' CHANGELOG.md | head -n -1 | tail -n +2 >> CHANGELOG-temp.md + echo **Full Changelog**: ${{ github.server_url }}/${{ github.repository }}/compare/${{ needs.get-helm-charts-versions-irs.outputs.latest_version }}...${{ needs.get-helm-charts-versions-irs.outputs.current_version }} >> CHANGELOG-temp.md + + echo "cat CHANGELOG-temp.md" + cat CHANGELOG-temp.md + - name: Run chart-releaser uses: helm/chart-releaser-action@v1.5.0 + with: + config: ./.github/configs/cr-config.yml env: CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/DEPENDENCIES b/DEPENDENCIES index def802231d..3e455b6e25 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -158,7 +158,7 @@ maven/mavencentral/org.eclipse.tractusx.irs/irs-edc-client/0.0.2-SNAPSHOT, Apach maven/mavencentral/org.eclipse.tractusx.irs/irs-ess/0.0.2-SNAPSHOT, Apache-2.0, approved, automotive.tractusx maven/mavencentral/org.eclipse.tractusx.irs/irs-models/0.0.2-SNAPSHOT, Apache-2.0, approved, automotive.tractusx maven/mavencentral/org.eclipse.tractusx.irs/irs-policy-store/0.0.2-SNAPSHOT, Apache-2.0, approved, automotive.tractusx -maven/mavencentral/org.eclipse.tractusx.irs/irs-registry-client/1.2.0-SNAPSHOT, Apache-2.0, approved, automotive.tractusx +maven/mavencentral/org.eclipse.tractusx.irs/irs-registry-client/1.2.1-SNAPSHOT, Apache-2.0, approved, automotive.tractusx maven/mavencentral/org.glassfish/jakarta.json/2.0.1, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jsonp maven/mavencentral/org.graalvm.sdk/graal-sdk/23.0.1, UPL-1.0, approved, #9850 maven/mavencentral/org.hamcrest/hamcrest-core/2.2, BSD-3-Clause, approved, clearlydefined diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/ItemContainer.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/ItemContainer.java index 3505f1865e..afe2b53639 100644 --- a/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/ItemContainer.java +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/ItemContainer.java @@ -29,6 +29,7 @@ import lombok.Getter; import lombok.Singular; import lombok.extern.jackson.Jacksonized; +import org.apache.commons.lang3.StringUtils; import org.eclipse.tractusx.irs.component.Bpn; import org.eclipse.tractusx.irs.component.Relationship; import org.eclipse.tractusx.irs.component.Submodel; @@ -60,4 +61,8 @@ public class ItemContainer { @Singular private List metrics; + + public List getBpnsWithManufacturerName() { + return this.getBpns().stream().filter(bpn -> StringUtils.isNotBlank(bpn.getManufacturerName())).toList(); + } } diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/ItemTreesAssembler.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/ItemTreesAssembler.java index e3ed3107c9..fc9c7fad31 100644 --- a/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/ItemTreesAssembler.java +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/ItemTreesAssembler.java @@ -31,7 +31,6 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; import org.eclipse.tractusx.irs.component.Bpn; import org.eclipse.tractusx.irs.component.Relationship; import org.eclipse.tractusx.irs.component.Submodel; @@ -65,7 +64,7 @@ public class ItemTreesAssembler { tombstones.addAll(itemGraph.getTombstones()); shells.addAll(itemGraph.getShells()); submodels.addAll(itemGraph.getSubmodels()); - bpns.addAll(itemGraph.getBpns().stream().filter(bpn -> StringUtils.isNotBlank(bpn.getManufacturerName())).toList()); + bpns.addAll(itemGraph.getBpnsWithManufacturerName()); }); log.info("Assembled item graph from {} partial graphs", numberOfPartialTrees); diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/services/IrsItemGraphQueryService.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/services/IrsItemGraphQueryService.java index 03e00e7f7c..648e984807 100644 --- a/irs-api/src/main/java/org/eclipse/tractusx/irs/services/IrsItemGraphQueryService.java +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/services/IrsItemGraphQueryService.java @@ -386,7 +386,7 @@ private ItemContainer retrievePartialResults(final MultiTransferJob multiJob) { shells.addAll(itemContainer.getShells()); submodels.addAll(itemContainer.getSubmodels()); metrics.addAll(itemContainer.getMetrics()); - bpns.addAll(itemContainer.getBpns()); + bpns.addAll(itemContainer.getBpnsWithManufacturerName()); }); } catch (BlobPersistenceException e) { diff --git a/irs-registry-client/src/main/java/org/eclipse/tractusx/irs/registryclient/DefaultConfiguration.java b/irs-registry-client/src/main/java/org/eclipse/tractusx/irs/registryclient/DefaultConfiguration.java index 0856561529..9e65d03108 100644 --- a/irs-registry-client/src/main/java/org/eclipse/tractusx/irs/registryclient/DefaultConfiguration.java +++ b/irs-registry-client/src/main/java/org/eclipse/tractusx/irs/registryclient/DefaultConfiguration.java @@ -115,8 +115,8 @@ public EndpointDataForConnectorsService endpointDataForConnectorsService(final E @ConditionalOnProperty(prefix = CONFIG_PREFIX, name = CONFIG_FIELD_TYPE, havingValue = CONFIG_VALUE_DECENTRAL) public DecentralDigitalTwinRegistryClient decentralDigitalTwinRegistryClient( @Qualifier(EDC_REST_TEMPLATE) final RestTemplate edcRestTemplate, - @Value("${digitalTwinRegistry.shellDescriptorTemplate:}") final String shellDescriptorTemplate, - @Value("${digitalTwinRegistry.lookupShellsTemplate:}") final String lookupShellsTemplate) { + @Value("${digitalTwinRegistryClient.shellDescriptorTemplate:}") final String shellDescriptorTemplate, + @Value("${digitalTwinRegistryClient.lookupShellsTemplate:}") final String lookupShellsTemplate) { return new DecentralDigitalTwinRegistryClient(edcRestTemplate, shellDescriptorTemplate, lookupShellsTemplate); } diff --git a/pom.xml b/pom.xml index 0653d75186..d0b0c407eb 100644 --- a/pom.xml +++ b/pom.xml @@ -66,7 +66,7 @@ 3.3.0 3.11.0 3.1.1 - 1.2.0-SNAPSHOT + 1.2.1-SNAPSHOT