Skip to content

Commit

Permalink
upgrade elasticsearch 7.10
Browse files Browse the repository at this point in the history
  • Loading branch information
elishowk committed Jun 28, 2023
1 parent 949f6f6 commit 0663265
Show file tree
Hide file tree
Showing 19 changed files with 8,923 additions and 27,538 deletions.
2 changes: 1 addition & 1 deletion back/integration-tests/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ services:
- net.core.somaxconn=511

elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.8.0
image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2
restart: "${DOCKER_RESTART_POLICY:-unless-stopped}"
environment:
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
Expand Down
35,847 changes: 8,590 additions & 27,257 deletions back/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion back/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"@aws-sdk/lib-storage": "^3.359.0",
"@bull-board/api": "^4.12.2",
"@bull-board/express": "^4.12.2",
"@elastic/elasticsearch": "^7.17.0",
"@elastic/elasticsearch": "7.13",
"@fast-csv/format": "^4.3.0",
"@graphql-tools/load-files": "^6.6.1",
"@graphql-tools/merge": "^8.4.0",
Expand Down
2 changes: 1 addition & 1 deletion back/prisma/scripts/reindexTransporterInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ export class ReindexTransporterInfo implements Updater {
...bsdas.map(bsda => bsdaToBsdElastic(bsda)),
...bsdasris.map(bsdasri => bsdasriToBsdElastic(bsdasri)),
...bsffs.map(bsff => bsffToBsdElastic(bsff))
]);
], index.elasticSearchUrl);
}
}
14 changes: 7 additions & 7 deletions back/src/bsds/__tests__/where.integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe("StringFilter to elastic query", () => {
}
];

await indexBsds(index.alias, bsds as any);
await indexBsds(index.alias, bsds as any, index.elasticSearchUrl);
await refreshElasticSearch();
});

Expand Down Expand Up @@ -177,7 +177,7 @@ describe("TextFilter to elastic query", () => {
}
];

await indexBsds(index.alias, bsds as any);
await indexBsds(index.alias, bsds as any, index.elasticSearchUrl);
await refreshElasticSearch();
});

Expand Down Expand Up @@ -307,7 +307,7 @@ describe("StringNullableFilter to elastic query", () => {
}
];

await indexBsds(index.alias, bsds as any);
await indexBsds(index.alias, bsds as any, index.elasticSearchUrl);
await refreshElasticSearch();
});

Expand Down Expand Up @@ -482,7 +482,7 @@ describe("DateFilter to elastic query", () => {
}
];

await indexBsds(index.alias, bsds as any);
await indexBsds(index.alias, bsds as any, index.elasticSearchUrl);
await refreshElasticSearch();
});

Expand Down Expand Up @@ -573,7 +573,7 @@ describe("Compound filter to elastic query", () => {
}
];

await indexBsds(index.alias, bsds as any);
await indexBsds(index.alias, bsds as any, index.elasticSearchUrl);
await refreshElasticSearch();
});

Expand Down Expand Up @@ -749,7 +749,7 @@ describe("search on readableId", () => {
}
];

await indexBsds(index.alias, bsds as any);
await indexBsds(index.alias, bsds as any, index.elasticSearchUrl);
await refreshElasticSearch();
});

Expand Down Expand Up @@ -786,7 +786,7 @@ describe("search on wasteCode", () => {
}
];

await indexBsds(index.alias, bsds as any);
await indexBsds(index.alias, bsds as any, index.elasticSearchUrl);
await refreshElasticSearch();
});

Expand Down
41 changes: 23 additions & 18 deletions back/src/bsds/indexation/__tests__/bulkIndexBsds.integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { formFactory, userFactory } from "../../../__tests__/factories";
import {
getBsdIdentifiers,
indexAllBsds,
indexAllBsdTypeConcurrently,
indexAllBsdTypeConcurrentJobs,
indexAllBsdTypeSync,
processBsdIdentifiersByChunk
} from "../bulkIndexBsds";
Expand Down Expand Up @@ -70,7 +70,7 @@ describe("indexAllBsdTypeSync", () => {
formFactory({ ownerId: user.id })
]);

await indexAllBsdTypeSync({ bsdName: "bsdd", index: index.alias });
await indexAllBsdTypeSync({ bsdName: "bsdd", index: index.alias, indexConfig: index });
await refreshElasticSearch();

const { body }: ApiResponse<SearchResponse<BsdElastic>> =
Expand All @@ -94,7 +94,7 @@ describe("indexAllBsdTypeSync", () => {
bsdaFactory({})
]);

await indexAllBsdTypeSync({ bsdName: "bsda", index: index.alias });
await indexAllBsdTypeSync({ bsdName: "bsda", index: index.alias, indexConfig: index });
await refreshElasticSearch();

const { body }: ApiResponse<SearchResponse<BsdElastic>> =
Expand All @@ -118,7 +118,7 @@ describe("indexAllBsdTypeSync", () => {
bsdasriFactory({})
]);

await indexAllBsdTypeSync({ bsdName: "bsdasri", index: index.alias });
await indexAllBsdTypeSync({ bsdName: "bsdasri", index: index.alias, indexConfig: index });
await refreshElasticSearch();

const { body }: ApiResponse<SearchResponse<BsdElastic>> =
Expand All @@ -142,7 +142,7 @@ describe("indexAllBsdTypeSync", () => {
createBsff({})
]);

await indexAllBsdTypeSync({ bsdName: "bsff", index: index.alias });
await indexAllBsdTypeSync({ bsdName: "bsff", index: index.alias, indexConfig: index });
await refreshElasticSearch();

const { body }: ApiResponse<SearchResponse<BsdElastic>> =
Expand All @@ -165,7 +165,7 @@ describe("indexAllBsdTypeSync", () => {
bsvhuFactory({}),
bsvhuFactory({})
]);
await indexAllBsdTypeSync({ bsdName: "bsvhu", index: index.alias });
await indexAllBsdTypeSync({ bsdName: "bsvhu", index: index.alias, indexConfig: index });
await refreshElasticSearch();

const { body }: ApiResponse<SearchResponse<BsdElastic>> =
Expand Down Expand Up @@ -194,9 +194,10 @@ describe("indexAllBsdTypeConcurrently", () => {
formFactory({ ownerId: user.id })
]);

const jobs = await indexAllBsdTypeConcurrently({
const jobs = await indexAllBsdTypeConcurrentJobs({
bsdName: "bsdd",
index: index.alias
index: index.alias,
indexConfig: index
});
await refreshElasticSearch();

Expand All @@ -223,9 +224,10 @@ describe("indexAllBsdTypeConcurrently", () => {
bsdaFactory({})
]);

const jobs = await indexAllBsdTypeConcurrently({
const jobs = await indexAllBsdTypeConcurrentJobs({
bsdName: "bsda",
index: index.alias
index: index.alias,
indexConfig: index
});
await refreshElasticSearch();

Expand All @@ -252,9 +254,10 @@ describe("indexAllBsdTypeConcurrently", () => {
bsdasriFactory({})
]);

const jobs = await indexAllBsdTypeConcurrently({
const jobs = await indexAllBsdTypeConcurrentJobs({
bsdName: "bsdasri",
index: index.alias
index: index.alias,
indexConfig: index
});
await refreshElasticSearch();

Expand All @@ -281,9 +284,10 @@ describe("indexAllBsdTypeConcurrently", () => {
createBsff({})
]);

const jobs = await indexAllBsdTypeConcurrently({
const jobs = await indexAllBsdTypeConcurrentJobs({
bsdName: "bsff",
index: index.alias
index: index.alias,
indexConfig: index
});
await refreshElasticSearch();

Expand All @@ -309,9 +313,10 @@ describe("indexAllBsdTypeConcurrently", () => {
bsvhuFactory({}),
bsvhuFactory({})
]);
const jobs = await indexAllBsdTypeConcurrently({
const jobs = await indexAllBsdTypeConcurrentJobs({
bsdName: "bsvhu",
index: index.alias
index: index.alias,
indexConfig: index
});
await refreshElasticSearch();

Expand Down Expand Up @@ -344,7 +349,7 @@ describe("indexAllBsds", () => {
const bsvhu = await bsvhuFactory({});
const bsds = [form, bsda, bsdasri, bsff, bsvhu];

await indexAllBsds(index.alias, false);
await indexAllBsds(index.alias, index, false);
await refreshElasticSearch();

const { body }: ApiResponse<SearchResponse<BsdElastic>> =
Expand All @@ -371,7 +376,7 @@ describe("indexAllBsds", () => {
const bsvhu = await bsvhuFactory({});
const bsds = [form, bsda, bsdasri, bsff, bsvhu];

await indexAllBsds(index.alias, true);
await indexAllBsds(index.alias, index, true);
await refreshElasticSearch();

const { body }: ApiResponse<SearchResponse<BsdElastic>> =
Expand Down
Loading

0 comments on commit 0663265

Please sign in to comment.