Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/navikt/testnorge into fea…
Browse files Browse the repository at this point in the history
…ture/bestillingsvisning-omskrivning
  • Loading branch information
betsytraran committed Jan 5, 2024
2 parents 6397b09 + c6175a6 commit 1fcd11f
Show file tree
Hide file tree
Showing 412 changed files with 647 additions and 11,022 deletions.
27 changes: 0 additions & 27 deletions .github/workflows/app.hodejegeren.yml

This file was deleted.

29 changes: 0 additions & 29 deletions .github/workflows/app.mn-synt-arbeidsforhold-service.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/proxy.hodejegeren-proxy.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/proxy.inst-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/inst-proxy"
deploy-tag: "#deploy-proxy"
deploy-tag: "#deploy-inst-proxy"
permissions:
contents: read
id-token: write
Expand Down
4 changes: 2 additions & 2 deletions apps/adresse-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jacocoTestReport {

sonarqube {
properties {
property "sonar.coverage.jacoco.xmlReportPaths", "${project.buildDir}/reports/jacoco/test/jacocoTestReport.xml"
property "sonar.coverage.jacoco.xmlReportPaths", "${project.layout.buildDirectory}/reports/jacoco/test/jacocoTestReport.xml"
property "sonar.dynamicAnalysis", "reuseReports"
property "sonar.host.url", "https://sonarcloud.io"
property "sonar.java.coveragePlugin", "jacoco"
property "sonar.language", "java"
property "sonar.login", System.getenv("SONAR_TOKEN")
property "sonar.token", System.getenv("SONAR_TOKEN")
property "sonar.organization", "navikt"
property "sonar.project.monorepo.enabled", true
property "sonar.projectKey", "navit_testnorge_adresse_service"
Expand Down
2 changes: 1 addition & 1 deletion apps/adresse-service/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
labels:
team: dolly
spec:
image: {{ image }}
image: "{{image}}"
webproxy: true
tokenx:
enabled: true
Expand Down
4 changes: 2 additions & 2 deletions apps/amelding-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ jacocoTestReport {

sonarqube {
properties {
property "sonar.coverage.jacoco.xmlReportPaths", "${project.buildDir}/reports/jacoco/test/jacocoTestReport.xml"
property "sonar.coverage.jacoco.xmlReportPaths", "${project.layout.buildDirectory}/reports/jacoco/test/jacocoTestReport.xml"
property "sonar.dynamicAnalysis", "reuseReports"
property "sonar.host.url", "https://sonarcloud.io"
property "sonar.java.coveragePlugin", "jacoco"
property "sonar.language", "java"
property "sonar.login", System.getenv("SONAR_TOKEN")
property "sonar.token", System.getenv("SONAR_TOKEN")
property "sonar.organization", "navikt"
property "sonar.project.monorepo.enabled", true
property "sonar.projectKey", "navit_testnorge_amelding_service"
Expand Down
2 changes: 1 addition & 1 deletion apps/amelding-service/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
labels:
team: dolly
spec:
image: {{ image }}
image: "{{image}}"
port: 8080
accessPolicy:
inbound:
Expand Down
4 changes: 2 additions & 2 deletions apps/app-tilgang-analyse-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ jacocoTestReport {

sonarqube {
properties {
property "sonar.coverage.jacoco.xmlReportPaths", "${project.buildDir}/reports/jacoco/test/jacocoTestReport.xml"
property "sonar.coverage.jacoco.xmlReportPaths", "${project.layout.buildDirectory}/reports/jacoco/test/jacocoTestReport.xml"
property "sonar.dynamicAnalysis", "reuseReports"
property "sonar.host.url", "https://sonarcloud.io"
property "sonar.java.coveragePlugin", "jacoco"
property "sonar.language", "java"
property "sonar.login", System.getenv("SONAR_TOKEN")
property "sonar.token", System.getenv("SONAR_TOKEN")
property "sonar.organization", "navikt"
property "sonar.project.monorepo.enabled", true
property "sonar.projectKey", "navit_testnorge_app_tilgang_analyse_service"
Expand Down
2 changes: 1 addition & 1 deletion apps/app-tilgang-analyse-service/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
allowAllUsers: true
enabled: true
tenant: nav.no
image: {{image}}
image: "{{image}}"
port: 8080
accessPolicy:
inbound:
Expand Down
4 changes: 2 additions & 2 deletions apps/arbeidsforhold-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ jacocoTestReport {

sonarqube {
properties {
property "sonar.coverage.jacoco.xmlReportPaths", "${project.buildDir}/reports/jacoco/test/jacocoTestReport.xml"
property "sonar.coverage.jacoco.xmlReportPaths", "${project.layout.buildDirectory}/reports/jacoco/test/jacocoTestReport.xml"
property "sonar.dynamicAnalysis", "reuseReports"
property "sonar.host.url", "https://sonarcloud.io"
property "sonar.java.coveragePlugin", "jacoco"
property "sonar.language", "java"
property "sonar.login", System.getenv("SONAR_TOKEN")
property "sonar.token", System.getenv("SONAR_TOKEN")
property "sonar.organization", "navikt"
property "sonar.project.monorepo.enabled", true
property "sonar.projectKey", "testnav-arbeidsforhold-service"
Expand Down
2 changes: 1 addition & 1 deletion apps/arbeidsforhold-service/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
labels:
team: dolly
spec:
image: {{ image }}
image: "{{image}}"
port: 8080
tokenx:
enabled: true
Expand Down
4 changes: 2 additions & 2 deletions apps/batch-bestilling-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ jacocoTestReport {

sonarqube {
properties {
property "sonar.coverage.jacoco.xmlReportPaths", "${project.buildDir}/reports/jacoco/test/jacocoTestReport.xml"
property "sonar.coverage.jacoco.xmlReportPaths", "${project.layout.buildDirectory}/reports/jacoco/test/jacocoTestReport.xml"
property "sonar.dynamicAnalysis", "reuseReports"
property "sonar.host.url", "https://sonarcloud.io"
property "sonar.java.coveragePlugin", "jacoco"
property "sonar.language", "java"
property "sonar.login", System.getenv("SONAR_TOKEN")
property "sonar.token", System.getenv("SONAR_TOKEN")
property "sonar.organization", "navikt"
property "sonar.project.monorepo.enabled", true
property "sonar.projectKey", "testnav-batch-bestilling-service"
Expand Down
2 changes: 1 addition & 1 deletion apps/batch-bestilling-service/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
labels:
team: dolly
spec:
image: {{image}}
image: "{{image}}"
port: 8080
webproxy: true
tokenx:
Expand Down
4 changes: 2 additions & 2 deletions apps/brreg-stub/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jacocoTestReport {

sonarqube {
properties {
property "sonar.coverage.jacoco.xmlReportPaths", "${project.buildDir}/reports/jacoco/test/jacocoTestReport.xml"
property "sonar.coverage.jacoco.xmlReportPaths", "${project.layout.buildDirectory}/reports/jacoco/test/jacocoTestReport.xml"
property "sonar.dynamicAnalysis", "reuseReports"
property "sonar.host.url", "https://sonarcloud.io"
property "sonar.java.coveragePlugin", "jacoco"
property "sonar.language", "java"
property "sonar.login", System.getenv("SONAR_TOKEN")
property "sonar.token", System.getenv("SONAR_TOKEN")
property "sonar.organization", "navikt"
property "sonar.project.monorepo.enabled", true
property "sonar.projectKey", "brreg-stub"
Expand Down
2 changes: 1 addition & 1 deletion apps/brreg-stub/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
labels:
team: dolly
spec:
image: {{image}}
image: "{{image}}"
port: 8080
liveness:
path: /isAlive
Expand Down
4 changes: 2 additions & 2 deletions apps/bruker-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ jacocoTestReport {

sonarqube {
properties {
property "sonar.coverage.jacoco.xmlReportPaths", "${project.buildDir}/reports/jacoco/test/jacocoTestReport.xml"
property "sonar.coverage.jacoco.xmlReportPaths", "${project.layout.buildDirectory}/reports/jacoco/test/jacocoTestReport.xml"
property "sonar.dynamicAnalysis", "reuseReports"
property "sonar.host.url", "https://sonarcloud.io"
property "sonar.java.coveragePlugin", "jacoco"
property "sonar.language", "java"
property "sonar.login", System.getenv("SONAR_TOKEN")
property "sonar.token", System.getenv("SONAR_TOKEN")
property "sonar.organization", "navikt"
property "sonar.project.monorepo.enabled", true
property "sonar.projectKey", "testnav-bruker-service"
Expand Down
2 changes: 1 addition & 1 deletion apps/bruker-service/config.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
labels:
team: dolly
spec:
image: {{image}}
image: "{{image}}"
port: 8080
tokenx:
enabled: true
Expand Down
2 changes: 1 addition & 1 deletion apps/bruker-service/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
labels:
team: dolly
spec:
image: {{ image }}
image: "{{image}}"
port: 8080
tokenx:
enabled: true
Expand Down
2 changes: 1 addition & 1 deletion apps/budpro-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jacocoTestReport {

sonarqube {
properties {
property "sonar.coverage.jacoco.xmlReportPaths", "${project.buildDir}/reports/jacoco/test/jacocoTestReport.xml"
property "sonar.coverage.jacoco.xmlReportPaths", "${project.layout.buildDirectory}/reports/jacoco/test/jacocoTestReport.xml"
property "sonar.dynamicAnalysis", "reuseReports"
property "sonar.host.url", "https://sonarcloud.io"
property "sonar.java.coveragePlugin", "jacoco"
Expand Down
2 changes: 1 addition & 1 deletion apps/budpro-service/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
allowAllUsers: true
enabled: true
tenant: nav.no
image: {{image}}
image: "{{image}}"
ingresses:
- "https://testnav-budpro-service.intern.dev.nav.no"
liveness:
Expand Down
1 change: 0 additions & 1 deletion apps/dolly-backend/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.retry:spring-retry:2.0.0'
Expand Down
2 changes: 1 addition & 1 deletion apps/dolly-backend/config.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ spec:
allowAllUsers: true
enabled: true
tenant: nav.no
image: {{image}}
image: "{{image}}"
openSearch:
instance: bestillinger
access: admin
Expand Down
2 changes: 1 addition & 1 deletion apps/dolly-backend/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ spec:
allowAllUsers: true
enabled: true
tenant: nav.no
image: {{image}}
image: "{{image}}"
openSearch:
instance: bestillinger
access: admin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import no.nav.dolly.util.TransactionHelperService;
import org.springframework.stereotype.Service;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

import java.time.LocalDateTime;
import java.util.List;
Expand Down Expand Up @@ -58,11 +59,17 @@ public Flux<ClientFuture> gjenopprett(RsDollyUtvidetBestilling bestilling, Dolly
.flatMap(request -> dokarkivConsumer.getEnvironments()
.flatMapIterable(env -> env)
.filter(env -> bestilling.getEnvironments().contains(env))
.filter(env -> !transaksjonMappingService.existAlready(DOKARKIV,
dollyPerson.getIdent(), env, bestilling.getId()) || isOpprettEndre)
.flatMap(env -> dokarkivConsumer.postDokarkiv(env, request)
.map(status ->
getStatus(dollyPerson.getIdent(), progress.getBestilling().getId(), status))))
.flatMap(env ->
!transaksjonMappingService.existAlready(DOKARKIV,
dollyPerson.getIdent(), env, bestilling.getId()) || isOpprettEndre ?

dokarkivConsumer.postDokarkiv(env, request)
.map(status ->
getStatus(dollyPerson.getIdent(),
bestilling.getId(), status)) :

Mono.just(env + ":OK")
))
.collect(Collectors.joining(",")))
.map(status -> futurePersist(progress, status)));
}
Expand All @@ -79,6 +86,8 @@ private ClientFuture futurePersist(BestillingProgress progress, String status) {

private String getStatus(String ident, Long bestillingId, DokarkivResponse response) {

log.info("Dokarkiv response {} for ident {}", response, ident);

if (isNull(response)) {
return null;
}
Expand Down Expand Up @@ -123,6 +132,8 @@ private DokarkivRequest buildRequest(RsDokarkiv rsDokarkiv, PdlPersonBolk.Person

private void saveTransaksjonId(DokarkivResponse response, String ident, Long bestillingId, String miljoe) {

log.info("Lagrer transaksjon for {} i {} ", ident, miljoe);

transaksjonMappingService.save(
TransaksjonMapping.builder()
.ident(ident)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public DokarkivConsumer(
@Timed(name = "providers", tags = { "operation", "dokarkiv-opprett" })
public Flux<DokarkivResponse> postDokarkiv(String environment, DokarkivRequest dokarkivRequest) {

log.info("Sender dokarkiv melding for ident {} miljoe {} request {}",
log.info("Dokarkiv sender melding for ident {} miljoe {} request {}",
dokarkivRequest.getBruker().getId(), environment, dokarkivRequest);

return tokenService.exchange(serverProperties)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public Mono<List<String>> call() {
.bodyToMono(String[].class)
.map(Arrays::asList)
.doOnError(WebClientFilter::logErrorMessage)
.onErrorResume(error -> Mono.just(List.of("q1", "q2", "q4")))
.retryWhen(Retry.backoff(3, Duration.ofSeconds(5))
.filter(WebClientFilter::is5xxException));
}
Expand Down
Loading

0 comments on commit 1fcd11f

Please sign in to comment.