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

Pull in latest changes from catenax-ng #132

Merged
merged 68 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
cdef5db
feat(registrylib):[TRI-1409] Initial commit of DTR client library
ds-jkreutzfeld Jun 30, 2023
b5e5766
feat(registrylib):[TRI-1409] Add logic for shell lookup
ds-jkreutzfeld Jul 3, 2023
20727f3
feat(registrylib):[TRI-1409] Add default config for registry client, …
ds-jkreutzfeld Jul 3, 2023
6e272b9
feat(registrylib):[TRI-1409] Improve coverage, make build green
ds-jkreutzfeld Jul 3, 2023
b204163
feat(registrylib):[TRI-1409] Add discovery client implementation for …
ds-jkreutzfeld Jul 4, 2023
8d5673d
Merge remote-tracking branch 'origin/main' into feature/TRI-1409-ddtr…
ds-jkreutzfeld Jul 4, 2023
361f7b8
feat(registrylib):[TRI-1409] Fix conflicts after merge
ds-jkreutzfeld Jul 4, 2023
9160220
feat(registrylib):[TRI-1409] Accept spotbugs findings
ds-jkreutzfeld Jul 4, 2023
07b7669
feat(registrylib):[TRI-1409] Update DEPENDENCIES
ds-jkreutzfeld Jul 4, 2023
fd583cc
feat(registrylib):[TRI-1409] Decouple registry client from EDC client…
ds-jkreutzfeld Jul 4, 2023
f73556f
feat(registrylib):[TRI-1409] Update DEPENDENCIES
ds-jkreutzfeld Jul 4, 2023
f2bf5fe
feat(registrylib):[TRI-1409] Build fat jar; add default policy provid…
ds-jkreutzfeld Jul 5, 2023
e87baac
feat(registrylib):[TRI-1409] Fix PMD
ds-jkreutzfeld Jul 5, 2023
1d441c8
feat(registrylib):[TRI-1409] Add publishing workflow
ds-jkreutzfeld Jul 5, 2023
fd6aa9b
feat(registrylib):[TRI-1409] Explicitly use maven settings file
ds-jkreutzfeld Jul 5, 2023
3b0f5d0
feat(registrylib):[TRI-1409] Fix repository path
ds-jkreutzfeld Jul 5, 2023
1562db4
feat(registrylib):[TRI-1409] Add permission setting
ds-jkreutzfeld Jul 5, 2023
d968c0b
feat(registrylib):[TRI-1409] Use custom maven settings
ds-jkreutzfeld Jul 5, 2023
c97696d
feat(registrylib):[TRI-1409] Remove parent from lib
ds-jkreutzfeld Jul 5, 2023
a307ac0
feat(registrylib):[TRI-1409] Add missing version
ds-jkreutzfeld Jul 5, 2023
622cd6e
feat(registrylib):[TRI-1409] Add missing properties
ds-jkreutzfeld Jul 5, 2023
2eff46b
feat(registrylib):[TRI-1409] Remove service annotation from client
ds-jkreutzfeld Jul 5, 2023
7e591fc
feat(registrylib):[TRI-1409] Add missing import
ds-jkreutzfeld Jul 5, 2023
4ea6c83
feat(registrylib):[TRI-1409] Support more autoconfiguration
ds-jkreutzfeld Jul 5, 2023
98a88c8
feat(registrylib):[TRI-1409] Restore parent module
ds-jkreutzfeld Jul 5, 2023
e4016bf
feat(registrylib):[TRI-1409] Disable PMD.DataClass rule, not helpful
ds-jkreutzfeld Jul 6, 2023
c62c957
feat(registrylib):[TRI-1409] Fix PMD issues
ds-jkreutzfeld Jul 6, 2023
c7b5399
feat(registrylib):[TRI-1409] Extend README
ds-jkreutzfeld Jul 6, 2023
475e031
feat(registrylib):[TRI-1409] Extend README, rename qualifier for edcR…
ds-jkreutzfeld Jul 6, 2023
b6eaa4f
feat(registrylib):[TRI-1409] Update DEPENDENCIES
ds-jkreutzfeld Jul 6, 2023
9f75bc0
feat(registrylib):[TRI-1409] Update README with better credential han…
ds-jkreutzfeld Jul 6, 2023
09fea1b
chore(trg):[TRI-1456] Add workflow for k8s compatibility testing
ds-jkreutzfeld Jul 6, 2023
8f99e27
fix: Adjusted error message for incorrect globalAssetId syntax in tes…
ds-alexander-bulgakov Jul 6, 2023
debd36e
Merge branch 'main' into feature/TRI-1350-adjust-tavern-tests
ds-alexander-bulgakov Jul 6, 2023
34110f1
TRI-1350: changed aspects to "SerialPart" and "SingleLevelBomAsBuilt"…
ds-alexander-bulgakov Jul 7, 2023
5e0ab93
TRI-1350: Changed all globalAssetIds, adjusted tavern.yml to separate…
ds-alexander-bulgakov Jul 7, 2023
f13c0ef
TRI-1350: Several fixes and adjustments after first run analysis
ds-alexander-bulgakov Jul 7, 2023
dbee83e
Merge pull request #398 from catenax-ng/chore/TRI-1456
ds-jkreutzfeld Jul 10, 2023
34ab49e
Merge remote-tracking branch 'origin/main' into feature/TRI-1409-ddtr…
ds-jkreutzfeld Jul 10, 2023
d0378ac
feat(library):[TRI-1409] Fix Checkstyle issue
ds-jkreutzfeld Jul 10, 2023
5e99b2d
feat(library):[TRI-1409] Update KinD version to 0.20.0
ds-jkreutzfeld Jul 10, 2023
f4cd203
TRI-1350: Changed env vars to all caps
ds-alexander-bulgakov Jul 10, 2023
636b31b
feat(library):[TRI-1409] Clean up dependencies and use custom bean names
ds-jkreutzfeld Jul 10, 2023
013abec
feat(library):[TRI-1409] Move classes around to clear up dependencies
ds-jkreutzfeld Jul 10, 2023
2a1b3c1
feat(library):[TRI-1409] More dependency cleanup
ds-jkreutzfeld Jul 10, 2023
adbce0b
feat(library):[TRI-1409] Fix API file after version update
ds-jkreutzfeld Jul 10, 2023
d372e24
TRI-1350: added # back to bearer header
ds-alexander-bulgakov Jul 11, 2023
23f0d74
Merge pull request #404 from catenax-ng/feature/TRI-1350-adjust-taver…
ds-alexander-bulgakov Jul 11, 2023
08e8596
feat(library):[TRI-1409] Extend README for accepted policies; add log…
ds-jkreutzfeld Jul 11, 2023
4d605ef
Merge pull request #406 from catenax-ng/fix/kind-action
ds-jkreutzfeld Jul 11, 2023
8b9567d
feat(library):[TRI-1409] Replace EDC config prefix with irs-edc-client
ds-jkreutzfeld Jul 11, 2023
f2388e3
feat(impl):[TRI-1350] fix bpdm summary
ds-ext-kmassalski Jul 11, 2023
404cef9
Merge pull request #407 from catenax-ng/feature/TRI-1350-fix-summary-…
ds-ext-kmassalski Jul 11, 2023
dfe3b97
feat(library):[TRI-1409] Make EDC callback mapping configurable
ds-jkreutzfeld Jul 11, 2023
7de7a27
feat(library):[TRI-1409] Update dependencies
ds-jkreutzfeld Jul 11, 2023
0e7c912
feat(library):[TRI-1409] Update dependencies and add owasp excludes f…
ds-jkreutzfeld Jul 11, 2023
5f5c45f
feat(library):[TRI-1409] Add unit test for StringMapper
ds-jkreutzfeld Jul 11, 2023
b73461b
feat(library):[TRI-1409] Move test to irs-api
ds-jkreutzfeld Jul 11, 2023
e9c9195
feat(library):[TRI-1409] Fix suppressions
ds-jkreutzfeld Jul 11, 2023
f75df3b
feat(library):[TRI-1409] Add exception logic for missing shells
ds-jkreutzfeld Jul 11, 2023
5ad5726
feat(library):[TRI-1409] Fix test
ds-jkreutzfeld Jul 11, 2023
ffbd4d9
feat(library):[TRI-1409] Replace publish action with support for cent…
ds-jkreutzfeld Jul 12, 2023
4c36f37
feat(library):[TRI-1409] Fix shell lookup parameter, temporarily add …
ds-jkreutzfeld Jul 12, 2023
bfce86e
feat(library):[TRI-1409] Remove temporary workflow
ds-jkreutzfeld Jul 12, 2023
382334b
feat(library):[TRI-1409] Update CHANGELOG
ds-jkreutzfeld Jul 12, 2023
337c0fb
Merge pull request #392 from catenax-ng/feature/TRI-1409-ddtr-library
ds-jkreutzfeld Jul 12, 2023
e055a3c
fix(workflow):[-] Add missing module to documentation workflow
ds-jkreutzfeld Jul 12, 2023
f24e8ba
Merge pull request #412 from catenax-ng/fix/publish-docs
ds-jkreutzfeld Jul 13, 2023
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
14 changes: 14 additions & 0 deletions .config/owasp-suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,18 @@
<gav regex="true">com\.fasterxml\.jackson\.core:jackson\-databind.*</gav>
<vulnerabilityName>CVE-2023-35116</vulnerabilityName>
</suppress>
<suppress>
<notes><![CDATA[
Pulled in by EDC client - needs to be accepted for now.
]]></notes>
<gav regex="true">org\.eclipse\.edc:jetty\-core.*</gav>
<vulnerabilityName regex="true">.*</vulnerabilityName>
</suppress>
<suppress>
<notes><![CDATA[
Pulled in by EDC client - needs to be accepted for now.
]]></notes>
<gav regex="true">org\.eclipse\.jetty\.toolchain:jetty\-jakarta\-websocket\-api.*</gav>
<vulnerabilityName regex="true">.*</vulnerabilityName>
</suppress>
</suppressions>
4 changes: 4 additions & 0 deletions .config/pmd-rules.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
<exclude name="LoosePackageCoupling"/>
<!-- There are too many false positives especially with streams -->
<exclude name="LawOfDemeter"/>
<!-- Detects false positives -->
<exclude name="DataClass"/>
</rule>
<rule ref="category/java/design.xml/UseUtilityClass">
<properties>
Expand Down Expand Up @@ -67,4 +69,6 @@
<property name="protectedMethodCommentRequirement" value="Ignored"/>
</properties>
</rule>


</ruleset>
8 changes: 8 additions & 0 deletions .config/spotbugs-excludes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@
<Class name="org.eclipse.tractusx.irs.configuration.RestTemplateConfig"/>
<Bug pattern="SIC_INNER_SHOULD_BE_STATIC_ANON"/>
</Match>
<Match>
<Class name="org.eclipse.tractusx.irs.registryclient.central.DigitalTwinRegistryClientImpl"/>
<Bug pattern="SIC_INNER_SHOULD_BE_STATIC_ANON"/>
</Match>
<Match>
<Class name="org.eclipse.tractusx.irs.registryclient.decentral.DecentralDigitalTwinRegistryClient"/>
<Bug pattern="SIC_INNER_SHOULD_BE_STATIC_ANON"/>
</Match>
<Match>
<!-- The folder path is not provided by a user, the file name is normalized heavily, and we use a recent JRE -->
<Class name="org.eclipse.tractusx.irs.semanticshub.SemanticsHubClientImpl"/>
Expand Down
46 changes: 46 additions & 0 deletions .github/actions/import-gpg-key/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#
# 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: "Import GPG Key"
description: "Imports a GPG key given in the input"
inputs:
gpg-private-key:
required: true
description: "The GPG Private Key in plain text. Can be a sub-key."
runs:
using: "composite"
steps:
# this is necessary because it creates gpg.conf, etc.
- name: List Keys
shell: bash
run: |
gpg -K --keyid-format=long

- name: Import GPG Private Key
shell: bash
run: |
echo "use-agent" >> ~/.gnupg/gpg.conf
echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf
echo -e "${{ inputs.gpg-private-key }}" | gpg --import --batch
for fpr in $(gpg --list-keys --with-colons | awk -F: '/fpr:/ {print $10}' | sort -u);
do
echo -e "5\\ny\\n" | gpg --batch --command-fd 0 --expert --edit-key $fpr trust;
done
36 changes: 36 additions & 0 deletions .github/workflows/helm-test-backwards-compatability.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Test k8s version compatability

on:
workflow_dispatch:
inputs:
node_image_latest:
description: 'First version of kindest/node image for k8s kind cluster'
default: 'kindest/node:v1.27.3'
required: false
type: string
node_image_second_latest:
description: 'Second version of kindest/node image for k8s kind cluster'
default: 'kindest/node:v1.26.6'
required: false
type: string
node_image_third_latest:
description: 'Third version of kindest/node image for k8s kind cluster'
default: 'kindest/node:v1.25.11'
required: false
type: string

jobs:
test-latest:
uses: ./.github/workflows/helm-test.yaml
with:
node_image: ${{ github.event.inputs.node_image_latest || 'kindest/node:v1.27.3' }}

test-second-latest:
uses: ./.github/workflows/helm-test.yaml
with:
node_image: ${{ github.event.inputs.node_image_second_latest || 'kindest/node:v1.26.6' }}

test-third-latest:
uses: ./.github/workflows/helm-test.yaml
with:
node_image: ${{ github.event.inputs.node_image_third_latest || 'kindest/node:v1.25.11' }}
16 changes: 16 additions & 0 deletions .github/workflows/helm-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ on:
paths:
- 'charts/**'
workflow_dispatch:
inputs:
node_image:
description: 'kindest/node image for k8s kind cluster'
default: 'kindest/node:v1.27.3'
required: false
type: string
workflow_call: # Trigger by another workflow
inputs:
node_image:
description: 'kindest/node image for k8s kind cluster'
default: 'kindest/node:v1.27.3'
required: false
type: string

jobs:
lint-test:
Expand All @@ -17,6 +30,9 @@ jobs:

- name: Kubernetes KinD Cluster
uses: container-tools/kind-action@v2
with:
node_image: ${{ github.event.inputs.node_image || 'kindest/node:v1.27.3' }}
version: v0.20.0

- name: Build image
uses: docker/build-push-action@v4
Expand Down
89 changes: 89 additions & 0 deletions .github/workflows/maven-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Upload to Central Maven Registry

on:
workflow_dispatch:
push:
branches:
- main

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
secret-presence:
runs-on: ubuntu-latest
outputs:
DOCKER_HUB_TOKEN: ${{ steps.secret-presence.outputs.DOCKER_HUB_TOKEN }}
HAS_OSSRH: ${{ steps.secret-presence.outputs.HAS_OSSRH }}
steps:
- name: Check whether secrets exist
id: secret-presence
run: |
[ ! -z "${{ secrets.DOCKER_HUB_TOKEN }}" ] && echo "DOCKER_HUB_TOKEN=true" >> $GITHUB_OUTPUT
[ ! -z "${{ secrets.ORG_GPG_PASSPHRASE }}" ] &&
[ ! -z "${{ secrets.ORG_GPG_PRIVATE_KEY }}" ] &&
[ ! -z "${{ secrets.ORG_OSSRH_USERNAME }}" ] &&
[ ! -z "${{ secrets.ORG_OSSRH_PASSWORD }}" ] &&
echo "HAS_OSSRH=true" >> $GITHUB_OUTPUT
exit 0

publish-to-sonatype:
name: "Publish artifacts to OSSRH Snapshots / MavenCentral"
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
needs: [ secret-presence ]

# do not run on PR branches, do not run on releases
if: |
needs.secret-presence.outputs.HAS_OSSRH && github.event_name != 'pull_request' && github.ref != 'refs/heads/releases'
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: Cache maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Build with Maven
run: mvn package -pl irs-testing,irs-models,irs-common,irs-edc-client,irs-registry-client --batch-mode

# Import GPG Key
- uses: ./.github/actions/import-gpg-key
name: "Import GPG Key"
with:
gpg-private-key: ${{ secrets.ORG_GPG_PRIVATE_KEY }}

- name: Configure Maven settings
run: |
mkdir -p $HOME/.m2
echo "<settings xmlns='http://maven.apache.org/SETTINGS/1.0.0' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd'>
<servers>
<server>
<id>ossrh</id>
<username>${{ secrets.ORG_OSSRH_USERNAME }}</username>
<password>${{ secrets.ORG_OSSRH_PASSWORD }}</password>
</server>
</servers>
</settings>" > $HOME/.m2/settings.xml

- uses: ./.github/actions/setup-java
# publish snapshots or releases
- name: Publish version
env:
OSSRH_PASSWORD: ${{ secrets.ORG_OSSRH_PASSWORD }}
OSSRH_USER: ${{ secrets.ORG_OSSRH_USERNAME }}
run: |-
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout -pl irs-registry-client)
echo "Publishing Version $VERSION to Sonatype"
mvn gpg:sign-and-deploy-file -Durl=https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=ossrh -Dfile=irs-registry-client/target/irs-registry-client-$VERSION-jar-with-dependencies.jar -DgroupId=org.eclipse.tractusx.irs -DartifactId=irs-registry-client -Dversion=$VERSION -Dpackaging=jar
2 changes: 1 addition & 1 deletion .github/workflows/publish-documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:

- name: Build API documentation with Maven
run: |
mvn clean package -pl irs-common,irs-models,irs-policy-store,irs-testing,irs-ess,irs-edc-client,irs-api -DskipTests --batch-mode
mvn clean package -pl irs-common,irs-models,irs-policy-store,irs-testing,irs-ess,irs-edc-client,irs-registry-client,irs-api -DskipTests --batch-mode
cp irs-api/target/generated-sources/openapi/index.html docs/src/docs/api-specification/index.html
- name: Build with Maven
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/tavern.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,15 @@ on:
description: IRS-ESS environment to test
default: 'https://irs-ess.int.demo.catena-x.net'
required: true
global-asset-id:
global-asset-id-asPlanned:
type: string
description: Global Asset ID to use for the tests
default: 'urn:uuid:513d7be8-e7e4-49f4-a22b-8cd31317e454'
description: Global Asset ID to use for the asPlanned tests
default: 'urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4c79e'
required: true
global-asset-id-asBuild:
type: string
description: Global Asset ID to use for the asBuild tests
default: 'urn:uuid:7940e0cc-7814-41eb-8b04-d984a325deec'
required: true
execution-ticket:
type: string
Expand Down Expand Up @@ -54,7 +59,8 @@ jobs:
KEYCLOAK_HOST: ${{ secrets.KEYCLOAK_OAUTH2_CLIENT_TOKEN_URI }}
KEYCLOAK_CLIENT_ID: ${{ secrets.KEYCLOAK_OAUTH2_CLIENT_ID }}
KEYCLOAK_CLIENT_SECRET: ${{ secrets.KEYCLOAK_OAUTH2_CLIENT_SECRET }}
GLOBAL_ASSET_ID: ${{ github.event.inputs.global-asset-id || 'urn:uuid:513d7be8-e7e4-49f4-a22b-8cd31317e454' }}
GLOBAL_ASSET_ID_AS_PLANNED: ${{ github.event.inputs.global-asset-id-asPlanned || 'urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4c79e' }}
GLOBAL_ASSET_ID_AS_BUILD: ${{ github.event.inputs.global-asset-id-asBuild || 'urn:uuid:7940e0cc-7814-41eb-8b04-d984a325deec' }}
run: |
python -m pytest local/testing/api-tests/irs-api-tests.tavern.yaml --junitxml=tavern-results.xml

Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Changed
- The client code for accessing the Digital Twin Registry (central and decentral) is now available as a spring boot maven library. See the README in the irs-registry-client module for more information.

### Known knowns
- PLACEHOLDER REMOVE IF EMPTY: risks that were introduced or discovered in the release and are known but not resolved

Expand Down
Loading
Loading