Skip to content

Commit

Permalink
Merge pull request #670 from catenax-ng/chore/TRACEFOSS-XXX-update-pr…
Browse files Browse the repository at this point in the history
…ofiles

Chore/tracefoss xxx update profiles
  • Loading branch information
ds-mwesener authored Oct 11, 2023
2 parents 63c3ccb + 026e8fa commit faec1d8
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 30 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- updated maven-site-plugin from 4.0.0-M5 to 4.0.0-M9
- updated testcontainer-postgresql from 1.17.6 to 1.19.0
- updated docker/build-push-action from 4 to 5

- Updated user manual to reflect current state of the part views

### Removed
- Owner filter and replaced it with the new filter query param
- Removed profile based feature flag for investigations / alerts

## [7.1.0 - 29.09.2023]
### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public class ApplicationProfiles {
public static final String NOT_TESTS = "!" + TESTS;
public static final String NOT_INTEGRATION_TESTS = "!" + INTEGRATION_SPRING_BOOT;
public static final String DEV = "dev";
public static final String STABLE = "stable";

private ApplicationProfiles() {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@
package org.eclipse.tractusx.traceability.common.config;

public class FeatureFlags {

public static final String NOTIFICATIONS_ENABLED_PROFILES = ApplicationProfiles.LOCAL + " | " +
ApplicationProfiles.INTEGRATION_SPRING_BOOT + " | " +
ApplicationProfiles.TESTS + " | " +
ApplicationProfiles.DEV;

private FeatureFlags() {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,16 @@
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.eclipse.tractusx.traceability.common.config.FeatureFlags;
import org.eclipse.tractusx.traceability.common.model.PageResult;
import org.eclipse.tractusx.traceability.common.request.OwnPageable;
import org.eclipse.tractusx.traceability.common.response.ErrorResponse;
import org.eclipse.tractusx.traceability.qualitynotification.application.alert.mapper.AlertResponseMapper;
import org.eclipse.tractusx.traceability.qualitynotification.application.base.service.QualityNotificationService;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Profile;
import org.springframework.http.HttpStatus;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import qualitynotification.alert.response.AlertResponse;
import qualitynotification.base.request.CloseQualityNotificationRequest;
import qualitynotification.base.request.QualityNotificationStatusRequest;
Expand All @@ -60,7 +52,7 @@
import static org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotificationDomain.from;
import static org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationStatus.from;

@Profile(FeatureFlags.NOTIFICATIONS_ENABLED_PROFILES)

@RestController
@RequestMapping(value = "/alerts", consumes = "application/json", produces = "application/json")
@PreAuthorize("hasAnyRole('ROLE_ADMIN', 'ROLE_SUPERVISOR', 'ROLE_USER')")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,16 @@
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.eclipse.tractusx.traceability.common.config.FeatureFlags;
import org.eclipse.tractusx.traceability.common.model.PageResult;
import org.eclipse.tractusx.traceability.common.request.OwnPageable;
import org.eclipse.tractusx.traceability.common.response.ErrorResponse;
import org.eclipse.tractusx.traceability.qualitynotification.application.base.service.QualityNotificationService;
import org.eclipse.tractusx.traceability.qualitynotification.application.investigation.mapper.InvestigationResponseMapper;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Profile;
import org.springframework.http.HttpStatus;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import qualitynotification.base.request.CloseQualityNotificationRequest;
import qualitynotification.base.request.QualityNotificationStatusRequest;
import qualitynotification.base.request.StartQualityNotificationRequest;
Expand All @@ -61,7 +53,7 @@
import static org.eclipse.tractusx.traceability.qualitynotification.application.validation.UpdateQualityNotificationValidator.validate;
import static org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotificationDomain.from;
import static org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationStatus.from;
@Profile(FeatureFlags.NOTIFICATIONS_ENABLED_PROFILES)

@RestController
@RequestMapping(value = "/investigations", consumes = "application/json", produces = "application/json")
@PreAuthorize("hasAnyRole('ROLE_ADMIN', 'ROLE_SUPERVISOR', 'ROLE_USER')")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,12 @@
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.eclipse.tractusx.traceability.common.config.FeatureFlags;
import org.eclipse.tractusx.traceability.common.response.ErrorResponse;
import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.service.AlertsReceiverService;
import org.eclipse.tractusx.traceability.qualitynotification.domain.investigation.model.exception.InvestigationIllegalUpdate;
import org.eclipse.tractusx.traceability.qualitynotification.domain.investigation.service.InvestigationsReceiverService;
import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotification;
import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.NotificationType;
import org.springframework.context.annotation.Profile;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
Expand All @@ -46,7 +44,6 @@
import static org.eclipse.tractusx.traceability.common.model.SecurityUtils.sanitize;

@Slf4j
@Profile(FeatureFlags.NOTIFICATIONS_ENABLED_PROFILES)
@Hidden
@RestController
@Validated
Expand Down

0 comments on commit faec1d8

Please sign in to comment.