Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Registry Client Fix #160

Merged
merged 10 commits into from
Aug 30, 2023
Merged
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
File renamed without changes.
1 change: 1 addition & 0 deletions .github/configs/cr-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
release-notes-file: CHANGELOG-temp.md

Check notice

Code scanning / KICS

IAM Access Analyzer Not Enabled Note

'AWS::AccessAnalyzer::Analyzer' is undefined
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 17 additions & 1 deletion .github/workflows/helm-chart-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
2 changes: 1 addition & 1 deletion DEPENDENCIES
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -60,4 +61,8 @@ public class ItemContainer {

@Singular
private List<RequestMetric> metrics;

public List<Bpn> getBpnsWithManufacturerName() {
return this.getBpns().stream().filter(bpn -> StringUtils.isNotBlank(bpn.getManufacturerName())).toList();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<jar-plugin.version>3.3.0</jar-plugin.version>
<compiler-plugin.version>3.11.0</compiler-plugin.version>
<install-plugin.version>3.1.1</install-plugin.version>
<irs-registry-client.version>1.2.0-SNAPSHOT</irs-registry-client.version>
<irs-registry-client.version>1.2.1-SNAPSHOT</irs-registry-client.version>
</properties>

<dependencyManagement>
Expand Down
Loading