Skip to content

Commit

Permalink
Merge branch 'master' into feature/pensjon-oppdatert-validering
Browse files Browse the repository at this point in the history
  • Loading branch information
betsytraran authored Oct 5, 2023
2 parents 61d4f1f + 435bb8a commit acdd178
Show file tree
Hide file tree
Showing 71 changed files with 165 additions and 1,036 deletions.
7 changes: 1 addition & 6 deletions .nais/alerting-dolly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ metadata:
labels:
team: dolly
spec:
receivers:
- name: 'dolly-alerts'
slackConfigs:
channel: "#dolly-alerts"
icon_emoji: ':dolly-panic:'
groups:
- name: dolly-alerts
rules:
Expand All @@ -34,7 +29,7 @@ spec:
annotations:
summary: 'Applikasjonen *{{ $labels.app }}* har hatt mer enn 1 ERRORs i loggen i løpet av de siste 15 minuttene.'
action: |
Alertmanager: '<https://alertmanager.dev-gcp.nav.cloud.nais.io/#/alerts?silenced=false&inhibited=false&active=true&filter=%7Balertname%3D%22dolly-log-errors%22%2C%20app%3D%22{{ $labels.app }}%22%7D&customGrouping=true|Link>'
Alertmanager: <https://alertmanager.dev-gcp.nav.cloud.nais.io/#/alerts?silenced=false&inhibited=false&active=true&filter=%7Balertname%3D%22dolly-log-errors%22%2C%20app%3D%22{{ $labels.app }}%22%7D&customGrouping=true|Link>
Events: `kubectl describe pod -l app={{ $labels.app }}`
Logger: `kubectl logs -l app={{ $labels.app }}`
Kibana: <https://logs.adeo.no/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:60000),time:(from:now-30m,to:now))&_a=(columns:!(level,message,envclass,application,pod),filters:!(),grid:(columns:(x_WorkerID:(width:325))),index:'96e648c0-980a-11e9-830a-e17bbd64b4db',interval:auto,query:(language:kuery,query:'namespace:%20%22dolly%22%20AND%20level:%20%22Error%22%20AND%20application:%20%22{{ $labels.app }}%22'),sort:!(!('@timestamp',desc)))|Link>
Expand Down
3 changes: 0 additions & 3 deletions apps/dolly-backend/config.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,12 @@ spec:
cluster: dev-gcp
outbound:
rules:
- application: generer-navn-service
- application: testnav-amelding-service
- application: testnav-arbeidsforhold-service
- application: testnav-inntektsmelding-service
- application: testnav-miljoer-service
- application: testnav-organisasjon-forvalter
- application: testnav-organisasjon-service
- application: testnav-organisasjon-tilgang-service
- application: testnav-pdl-forvalter-dev
- application: testnav-person-service
- application: testnav-synt-sykemelding-api
Expand All @@ -64,7 +62,6 @@ spec:
- host: testnav-pdl-proxy.dev-fss-pub.nais.io
- host: testnav-sigrunstub-proxy.dev-fss-pub.nais.io
- host: testnav-skjermingsregister-proxy.dev-fss-pub.nais.io
- host: testnav-statisk-data-forvalter-proxy.dev-fss-pub.nais.io
- host: testnav-udistub-proxy.dev-fss-pub.nais.io
- host: tps-forvalteren-dev-proxy.dev-fss-pub.nais.io
webproxy: true
Expand Down
4 changes: 0 additions & 4 deletions apps/dolly-backend/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,12 @@ spec:
namespace: navdig
outbound:
rules:
- application: generer-navn-service
- application: testnav-amelding-service
- application: testnav-arbeidsforhold-service
- application: testnav-inntektsmelding-service
- application: testnav-miljoer-service
- application: testnav-organisasjon-forvalter
- application: testnav-organisasjon-service
- application: testnav-organisasjon-tilgang-service
cluster: prod-gcp
- application: testnav-pdl-forvalter
- application: testnav-person-service
- application: testnav-synt-sykemelding-api
Expand All @@ -72,7 +69,6 @@ spec:
- host: testnav-pdl-proxy.dev-fss-pub.nais.io
- host: testnav-sigrunstub-proxy.dev-fss-pub.nais.io
- host: testnav-skjermingsregister-proxy.dev-fss-pub.nais.io
- host: testnav-statisk-data-forvalter-proxy.dev-fss-pub.nais.io
- host: testnav-udistub-proxy.dev-fss-pub.nais.io
- host: tps-forvalteren-proxy.dev-fss-pub.nais.io
webproxy: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import lombok.extern.slf4j.Slf4j;
import no.nav.dolly.bestilling.ConsumerStatus;
import no.nav.dolly.bestilling.arbeidsplassencv.command.ArbeidsplassenDeleteCVCommand;
import no.nav.dolly.bestilling.arbeidsplassencv.command.ArbeidsplassenGetCVCommand;
import no.nav.dolly.bestilling.arbeidsplassencv.command.ArbeidsplassenGodtaHjemmelCommand;
import no.nav.dolly.bestilling.arbeidsplassencv.command.ArbeidsplassenGodtaVilkaarCommand;
import no.nav.dolly.bestilling.arbeidsplassencv.command.ArbeidsplassenPostPersonCommand;
Expand Down Expand Up @@ -48,14 +47,6 @@ public ArbeidsplassenCVConsumer(
.build();
}

@Timed(name = "providers", tags = { "operation", "arbeidsplassen_getCV" })
public Flux<ArbeidsplassenCVStatusDTO> hentCV(String ident, String uuid) {

return tokenService.exchange(serviceProperties)
.flatMapMany(token -> new ArbeidsplassenGetCVCommand(webClient, ident, uuid, token.getTokenValue()).call())
.doOnNext(resultat -> log.info("Hentet CV for ident {} {}", ident, resultat));
}

@Timed(name = "providers", tags = { "operation", "arbeidsplassen_oppdaterCV" })
public Flux<ArbeidsplassenCVStatusDTO> oppdaterCV(String ident, PAMCVDTO arbeidsplassenCV, String uuid) {

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,24 @@
import no.nav.dolly.bestilling.inntektstub.command.InntektstubGetCommand;
import no.nav.dolly.bestilling.inntektstub.command.InntektstubPostCommand;
import no.nav.dolly.bestilling.inntektstub.domain.Inntektsinformasjon;
import no.nav.dolly.bestilling.inntektstub.domain.ValiderInntekt;
import no.nav.dolly.config.credentials.InntektstubProxyProperties;
import no.nav.dolly.metrics.Timed;
import no.nav.dolly.util.WebClientFilter;
import no.nav.testnav.libs.securitycore.config.UserConstant;
import no.nav.testnav.libs.securitycore.domain.ServerProperties;
import no.nav.testnav.libs.standalone.servletsecurity.exchange.TokenExchange;
import org.springframework.http.HttpHeaders;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.reactive.function.client.WebClient;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.util.retry.Retry;

import java.time.Duration;
import java.util.List;

import static no.nav.dolly.util.JacksonExchangeStrategyUtil.getJacksonStrategy;
import static no.nav.dolly.util.TokenXUtil.getUserJwt;

@Service
@Slf4j
public class InntektstubConsumer implements ConsumerStatus {

private static final String VALIDER_INNTEKTER_URL = "/api/v2/valider";

private static final int BLOCK_SIZE = 10;

private final WebClient webClient;
Expand Down Expand Up @@ -83,24 +74,6 @@ public Flux<Inntektsinformasjon> postInntekter(List<Inntektsinformasjon> inntekt
.flatMapMany(token -> new InntektstubPostCommand(webClient, inntektsinformasjon, token.getTokenValue()).call());
}

@Timed(name = "providers", tags = { "operation", "inntk_validerInntekt" })
public ResponseEntity<Object> validerInntekter(ValiderInntekt validerInntekt) {

return tokenService.exchange(serviceProperties)
.flatMap(token -> webClient.post()
.uri(uriBuilder -> uriBuilder
.path(VALIDER_INNTEKTER_URL)
.build())
.header(HttpHeaders.AUTHORIZATION, "Bearer " + token.getTokenValue())
.header(UserConstant.USER_HEADER_JWT, getUserJwt())
.bodyValue(validerInntekt)
.retrieve()
.toEntity(Object.class)
.retryWhen(Retry.backoff(3, Duration.ofSeconds(5))
.filter(WebClientFilter::is5xxException)))
.block();
}

@Override
public String serviceUrl() {
return serviceProperties.getUrl();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
package no.nav.dolly.bestilling.pensjonforvalter;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.netty.channel.ChannelOption;
import lombok.extern.slf4j.Slf4j;
import no.nav.dolly.bestilling.ConsumerStatus;
import no.nav.dolly.bestilling.pensjonforvalter.command.AnnullerSamboerCommand;
import no.nav.dolly.bestilling.pensjonforvalter.command.HentMiljoerCommand;
import no.nav.dolly.bestilling.pensjonforvalter.command.HentPoppInntekterCommand;
import no.nav.dolly.bestilling.pensjonforvalter.command.HentSamboerCommand;
import no.nav.dolly.bestilling.pensjonforvalter.command.HentTpForholdCommand;
import no.nav.dolly.bestilling.pensjonforvalter.command.LagreAlderspensjonCommand;
import no.nav.dolly.bestilling.pensjonforvalter.command.LagrePoppInntektCommand;
import no.nav.dolly.bestilling.pensjonforvalter.command.LagreSamboerCommand;
Expand Down Expand Up @@ -141,14 +138,6 @@ public Flux<PensjonforvalterResponse> lagreUforetrygd(PensjonUforetrygdRequest r
.flatMapMany(token -> new LagreUforetrygdCommand(webClient, token.getTokenValue(), request).call());
}

@Timed(name = "providers", tags = {"operation", "pen_getInntekter"})
public JsonNode getInntekter(String ident, String miljoe) {

return tokenService.exchange(serviceProperties)
.flatMap(token -> new HentPoppInntekterCommand(webClient, token.getTokenValue(), ident, miljoe).call())
.block();
}

@Timed(name = "providers", tags = {"operation", "pen_lagreTpForhold"})
public Flux<PensjonforvalterResponse> lagreTpForhold(PensjonTpForholdRequest pensjonTpForholdRequest) {

Expand All @@ -169,14 +158,6 @@ public void sletteTpForhold(List<String> identer) {
.subscribe(response -> log.info("Slettet mot PESYS (tp) i alle miljoer"));
}

@Timed(name = "providers", tags = {"operation", "pen_getTpForhold"})
public JsonNode getTpForhold(String ident, String miljoe) {

return tokenService.exchange(serviceProperties)
.flatMap(token -> new HentTpForholdCommand(webClient, token.getTokenValue(), ident, miljoe).call())
.block();
}

@Timed(name = "providers", tags = {"operation", "pen_lagreTpYtelse"})
public Flux<PensjonforvalterResponse> lagreTpYtelse(PensjonTpYtelseRequest pensjonTpYtelseRequest) {

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,6 @@ public SkjermingsRegisterConsumer(
.build();
}

@Timed(name = "providers", tags = {"operation", "skjermingsdata-hent"})
public SkjermingDataResponse getSkjerming(String ident) {

return tokenService.exchange(serviceProperties)
.flatMap(token -> new SkjermingsregisterGetCommand(webClient, ident, token.getTokenValue()).call())
.block();
}

@Timed(name = "providers", tags = {"operation", "skjermingsdata-slett"})
public Mono<List<Void>> deleteSkjerming(List<String> identer) {

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit acdd178

Please sign in to comment.