Skip to content

Commit

Permalink
fix: fixing feature flag (#1069)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulushcgcj committed Aug 7, 2024
1 parent 2df41c1 commit 38c8968
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
5 changes: 4 additions & 1 deletion backend/openshift.configmap.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ objects:
app: ${NAME}-${ZONE}
name: ${NAME}-${ZONE}-${COMPONENT}-config
data:
application.yml: |
application.yml: |
features:
staff:
match: false
info:
app:
component: ${COMPONENT}
2 changes: 1 addition & 1 deletion backend/openshift.configmap.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ parameters:
value: backend
- name: ZONE
description: Deployment zone, e.g. pr-### or prod
required: true
required: true
objects:
- kind: ConfigMap
apiVersion: v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,23 @@ public Predicate<BcRegistryAddressDto> isMultiAddressDisabled() {
@Bean
@ConditionalOnProperty(name = "features.bcregistry.multiaddress", matchIfMissing = true)
public Predicate<BcRegistryAddressDto> isMultiAddressEnabled() {
log.warn("Multi address feature is enabled due to missing property");
log.warn("Multi address feature is enabled");
return addressDto -> true;
}


@Bean
@ConditionalOnProperty(name = "features.staff.match", havingValue = "true")
public Predicate<ClientSubmissionDto> isMatcherEnabled() {
log.warn("Staff match feature is enabled due to property set as true");
@ConditionalOnProperty(prefix = "features", name = "staff.match", matchIfMissing = true)
public Predicate<ClientSubmissionDto> isMatcherDisabled() {
log.warn("Staff match feature is enabled");
return dto -> true;
}

@Bean
@ConditionalOnProperty(name = "features.staff.match", matchIfMissing = true)
public Predicate<ClientSubmissionDto> isMatcherDisabled() {
log.warn("Staff match feature is disabled due to missing property");
@ConditionalOnProperty(prefix = "features", name = "staff.match", havingValue = "false")
public Predicate<ClientSubmissionDto> isMatcherDisabledByValue() {
log.warn("Staff match feature is disabled due to property set as false");
return dto -> false;
}


}

0 comments on commit 38c8968

Please sign in to comment.