Skip to content

Commit

Permalink
Merge pull request #294 from catenax-ng/main
Browse files Browse the repository at this point in the history
Removed unnecessary EDC Code
  • Loading branch information
ds-mwesener authored Sep 20, 2023
2 parents d7e432c + 4aa5296 commit 76543d5
Show file tree
Hide file tree
Showing 128 changed files with 207 additions and 3,123 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/docker-image-main_backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ name: "[BE][BUILT][RELEASE] Docker Image on Main"
on:
push:
branches: main
workflow_dispatch:


env:
GHCR_REGISTRY: ghcr.io
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]
### Added
### Removed
- Old edc code not necessary anymore

## [7.0.0 - 18.09.2023]
### Added
Expand Down
17 changes: 7 additions & 10 deletions docs/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,10 @@ Please update the [CHANGELOG.md](https://github.com/eclipse-tractusx/traceabilit

## Release helm charts
Hint: You need to stricly follow this guide to make sure the helm chart releaser will be able to detect a new helm chart version!
1) Create a GIT Tag with the release version of the application.
2) A Release Action ( Release Trace-X ) will bump the helm versions and create a Pull request that needs to be merged.
3) Check if the Action ran successfully and the following properties in the Chart.yamls and package.json were updated with the corresponding new versions from your created tag and the latest version entry from the [charts/CHANGELOG.md](https://github.com/catenax-ng/tx-traceability-foss/blob/main/charts/traceability-foss/CHANGELOG.md) file:
- *version* & *appVersion* property from
- [backend Chart.yaml file](https://github.com/eclipse-tractusx/traceability-foss/blob/main/charts/traceability-foss/charts/backend/Chart.yaml) and from
- [frontend Chart.yaml file](https://github.com/eclipse-tractusx/traceability-foss/blob/main/charts/traceability-foss/charts/frontend/Chart.yaml).
- [Umbrella Helm Chart.yaml file](https://github.com/eclipse-tractusx/traceability-foss/blob/main/charts/traceability-foss/Chart.yaml).
- [frontend package.json file](https://github.com/eclipse-tractusx/traceability-foss/blob/main/frontend/package.json)
3) Proceed with merging into the main branch and check the [Release Charts workflow](https://github.com/eclipse-tractusx/traceability-foss/actions/workflows/helm-chart-release.yaml)
- It should trigger automatically, if not invoke the workflow manually for the *main* branch. The workflow will compare previously stored helm charts version and if it detects new version, it will release it in GitHub and will create an appropriate git tag.
1) Create a new Release in catena: https://github.com/catenax-ng/tx-traceability-foss/releases/new with the release version of the application.
2) Before accepting the Pull Request which will be created based on Step 1) please make sure to create a Pull Request from catena to eclipse and merge it.
3) Then create a new Release in tractusx: https://github.com/eclipse-tractusx/traceability-foss/releases/new with the release version of the application.
4) A Release Action ( Release Trace-X ) will bump the helm versions and create a Pull request that needs to be merged for catena and tractusx.
5) Please accept the PRs on both repositories.
6) Invoke the [Release Charts workflow](https://github.com/eclipse-tractusx/traceability-foss/actions/workflows/helm-chart-release.yaml) on main branch
7) Invoke the [Release Charts workflow](https://github.com/catenax-ng/tx-traceability-foss/actions/workflows/helm-chart-release.yaml) on main branch
Binary file removed tx-backend/collection/Insomnia-2.png
Binary file not shown.
Binary file removed tx-backend/collection/Insomnia.png
Binary file not shown.
23 changes: 11 additions & 12 deletions tx-backend/collection/README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
# Insomnia Collection

1) Open Insomnia
2) Click on Application -> Preferences -> Data
3) Import from file
4) Choose tracex.json file
5) On the top left you will see "dev"
6) Click on it and choose Manage Environments
7) Fill in all sensitive data for desired environments
8) Then you can simply request the api (auth will be automatically done by insomnia)
![](https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/backend/collection/Insomnia.png)
1) Receive password secured zip file by team
2) Unzip with password from keepass
3) Open Insomnia
4) Click on Application -> Preferences -> Data
5) Import from file
6) On the top left you will see all environments of trace-x
7) Then you can simply request the api (auth will be automatically done by insomnia)

## How to update the collection

1) Open Insomnia
2) Click on Application -> Preferences -> Data
3) Export Trace-X collection
4) Choose insomnia v4 file format
5) Name it tracex.json
6) !!!!!!!!! Click NO on Export Private Environment prompt !!!!!!
![](Insomnia-2.png)
5) Click YES on Export Private ENV
6) Zip and give it the password saved into keepass
7) Share by mail to all devs / product owners

Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@

import static org.apache.commons.collections4.ListUtils.emptyIfNull;

// TODO missing in concept:
@AllArgsConstructor
@Slf4j
@Data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;

// TODO merge this entity into the bpn edc mapping
@Entity
@Table(name = "bpn_storage")
public class BpnEntity {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,18 @@
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.eclipse.tractusx.traceability.assets.domain.base.IrsRepository;
import org.eclipse.tractusx.traceability.qualitynotification.application.contract.model.CreateNotificationContractRequest;
import org.eclipse.tractusx.traceability.qualitynotification.application.contract.model.NotificationMethod;
import org.eclipse.tractusx.traceability.qualitynotification.application.contract.model.NotificationType;
import org.eclipse.tractusx.traceability.qualitynotification.domain.contract.EdcNotificationContractService;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.annotation.Profile;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.controller.model.CreateNotificationContractRequest;
import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.controller.model.NotificationMethod;
import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.controller.model.NotificationType;
import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.service.EdcNotificationContractService;
import java.util.concurrent.Executors;

import static org.eclipse.tractusx.traceability.common.config.ApplicationProfiles.NOT_INTEGRATION_TESTS;

Expand Down Expand Up @@ -65,6 +66,7 @@ public void registerIrsPolicy() {

executor.shutdown();
}

@EventListener(ApplicationReadyEvent.class)
public void createNotificationContracts() {
ExecutorService executor = Executors.newSingleThreadExecutor();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
*
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/
package org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.configuration;
package org.eclipse.tractusx.traceability.common.config;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.eclipse.tractusx.traceability.infrastructure.edc.properties.EdcProperties;
import org.eclipse.tractusx.traceability.common.properties.EdcProperties;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.web.client.RestTemplateBuilder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import org.eclipse.tractusx.traceability.common.request.InvalidSortException;
import org.eclipse.tractusx.traceability.common.response.ErrorResponse;
import org.eclipse.tractusx.traceability.common.security.TechnicalUserAuthorizationException;
import org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.controller.model.CreateNotificationContractException;
import org.eclipse.tractusx.traceability.qualitynotification.application.contract.model.CreateNotificationContractException;
import org.eclipse.tractusx.traceability.qualitynotification.application.validation.UpdateQualityNotificationValidationException;
import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.AlertNotFoundException;
import org.eclipse.tractusx.traceability.qualitynotification.domain.investigation.model.exception.InvestigationIllegalUpdate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
@Configuration
@EnableFeignClients(basePackages = {
"org.eclipse.tractusx.traceability.assets.infrastructure.base.irs",
"org.eclipse.tractusx.traceability.shelldescriptor.infrastructure.repository.rest.registry",
"org.eclipse.tractusx.traceability.discovery.infrastructure.repository",
})
public class FeignGlobalConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/
package org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.configuration;
package org.eclipse.tractusx.traceability.common.config;

import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
Expand All @@ -46,9 +46,6 @@ public class JsonLdConfigurationTraceX {
public static final String NAMESPACE_DSPACE = "https://w3id.org/dspace/v0.8/";
public static final String NAMESPACE_DCAT = "https://www.w3.org/ns/dcat/";
public static final String NAMESPACE_EDC = "https://w3id.org/edc/v0.0.1/ns/";
public static final String NAMESPACE_EDC_CID = NAMESPACE_EDC + "cid";
public static final String NAMESPACE_EDC_PARTICIPANT_ID = NAMESPACE_EDC + "participantId";
public static final String NAMESPACE_EDC_ID = NAMESPACE_EDC + "id";
public static final String NAMESPACE_TRACTUSX = "https://w3id.org/tractusx/v0.0.1/ns/";
public static final String NAMESPACE_DCT = "https://purl.org/dc/terms/";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/

package org.eclipse.tractusx.traceability.infrastructure.edc.notificationcontract.configuration;
package org.eclipse.tractusx.traceability.common.config;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
package org.eclipse.tractusx.traceability.common.mapper;

import org.eclipse.tractusx.traceability.assets.domain.base.BpnRepository;
import org.eclipse.tractusx.traceability.infrastructure.edc.blackbox.model.EDCNotification;
import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotification;
import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationMessage;
import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationSeverity;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/
package org.eclipse.tractusx.traceability.infrastructure.edc.properties;
package org.eclipse.tractusx.traceability.common.properties;

import jakarta.validation.constraints.NotBlank;
import lombok.AllArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import org.eclipse.tractusx.traceability.bpn.mapping.domain.ports.BpnEdcMappingRepository;
import org.eclipse.tractusx.traceability.discovery.domain.model.Discovery;
import org.eclipse.tractusx.traceability.discovery.domain.repository.DiscoveryRepository;
import org.eclipse.tractusx.traceability.infrastructure.edc.properties.EdcProperties;
import org.eclipse.tractusx.traceability.common.properties.EdcProperties;
import org.jetbrains.annotations.NotNull;
import org.springframework.stereotype.Component;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,12 @@
import org.eclipse.tractusx.irs.registryclient.discovery.EdcDiscoveryResult;
import org.eclipse.tractusx.traceability.discovery.domain.model.Discovery;
import org.eclipse.tractusx.traceability.discovery.domain.repository.DiscoveryRepository;
import org.eclipse.tractusx.traceability.infrastructure.edc.properties.EdcProperties;
import org.eclipse.tractusx.traceability.common.properties.EdcProperties;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;

import static org.eclipse.tractusx.traceability.discovery.domain.model.Discovery.toDiscovery;
Expand Down
Loading

0 comments on commit 76543d5

Please sign in to comment.