Skip to content

Commit

Permalink
fix(alert): scrap MT qui est à jour par rapport à CDTN (#1127)
Browse files Browse the repository at this point in the history
  • Loading branch information
m-maillot authored Nov 20, 2023
1 parent c143c02 commit e9fa5a9
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 16 deletions.
1 change: 1 addition & 0 deletions .kontinuous/env/dev/templates/alert.sealed-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ spec:
OAUTH_CLIENT_ID: AgArQkOL4xboz11Z4eIMh6pdAjGxf28Hz2XqhiPakOKejcPyj9qf278K4rX1D909avOel0B83zXaliYjwWG4FA0M36bea6VXe0hemlB42zz7yEcCvdrVcbPzq9k9aCzWfey4I8gVaNjgBny1bG2Yu7BtnT09AIDyCdDcdOj2TO7D+HY6XJWozTvOg4GrkD8Lh0yS0SMMPzTts1aHKk1qSRGixq9vqwcZaR0aTm9emqU42NwV4mceZQM8EuUBmljmB+3OQc5hhX6JqwJaLqga2q2USF9XaU3gDK3Z+WSsyde9lGKLB/NYzin5KALzwlPVZeubJJyi47i/bzAkSvrUu7TQtBj8tdODfRlNBy08hy71SB3dG8G9YcaPOfXwkfANkDnGmahKk++221rbXIgv7LK7b0wpj44vfrQ2y5AC/PHaxT9NRh7FIQ6kJuE/jGgTZLy6YoVzwGteraTApspZRznHdJvzhcQH8blbEYo3+2PyIZul7c4ACMrTASsx0VY8aS36sR0Aisejt6CmX49eUVr4hlzHTTioLS8npKbsHh+Uj5nqLzZlXaLkCQs6MiF4lOwFh7xrf0L3BhkNLHu5amm9D0krmd7KJZehUVg9p7S8OoAqO7lTAmGnm+uV9I61OFP7r1AxEDEUUhVDRTYrXLrlbUUidyBc/dzmrqrEFbDw6dJymSwxXjyThbiJF9HlToWuI75LgoUY5d44DlWVnytWwlhMIT+n+HJSOy/ze9JqSmc4lWc=
OAUTH_CLIENT_SECRET: AgC29Je/+h1fU1khidDZxsqHmkcbkV2bXzGyMeI/9DUknwg3n3SoBGGt9qcTqqdORoX1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isTAH/68T0sk5sSlcYZZfBoe1QW+unsOQDi+ZYPw9f8BS49JgPCCDX/fkvF8WB5zD1l2E1hKPRkv9Y8CcTKIRQnRJidtzHFD1zYvnSQJyDYg+0=
template:
metadata:
annotations: *a1
Expand Down
1 change: 1 addition & 0 deletions .kontinuous/env/preprod/templates/alert.sealed-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ spec:
OAUTH_CLIENT_ID: AgArQkOL4xboz11Z4eIMh6pdAjGxf28Hz2XqhiPakOKejcPyj9qf278K4rX1D909avOel0B83zXaliYjwWG4FA0M36bea6VXe0hemlB42zz7yEcCvdrVcbPzq9k9aCzWfey4I8gVaNjgBny1bG2Yu7BtnT09AIDyCdDcdOj2TO7D+HY6XJWozTvOg4GrkD8Lh0yS0SMMPzTts1aHKk1qSRGixq9vqwcZaR0aTm9emqU42NwV4mceZQM8EuUBmljmB+3OQc5hhX6JqwJaLqga2q2USF9XaU3gDK3Z+WSsyde9lGKLB/NYzin5KALzwlPVZeubJJyi47i/bzAkSvrUu7TQtBj8tdODfRlNBy08hy71SB3dG8G9YcaPOfXwkfANkDnGmahKk++221rbXIgv7LK7b0wpj44vfrQ2y5AC/PHaxT9NRh7FIQ6kJuE/jGgTZLy6YoVzwGteraTApspZRznHdJvzhcQH8blbEYo3+2PyIZul7c4ACMrTASsx0VY8aS36sR0Aisejt6CmX49eUVr4hlzHTTioLS8npKbsHh+Uj5nqLzZlXaLkCQs6MiF4lOwFh7xrf0L3BhkNLHu5amm9D0krmd7KJZehUVg9p7S8OoAqO7lTAmGnm+uV9I61OFP7r1AxEDEUUhVDRTYrXLrlbUUidyBc/dzmrqrEFbDw6dJymSwxXjyThbiJF9HlToWuI75LgoUY5d44DlWVnytWwlhMIT+n+HJSOy/ze9JqSmc4lWc=
OAUTH_CLIENT_SECRET: AgC29Je/+h1fU1khidDZxsqHmkcbkV2bXzGyMeI/9DUknwg3n3SoBGGt9qcTqqdORoX1tUADLaWpKYNXoXG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cYZZfBoe1QW+unsOQDi+ZYPw9f8BS49JgPCCDX/fkvF8WB5zD1l2E1hKPRkv9Y8CcTKIRQnRJidtzHFD1zYvnSQJyDYg+0=
template:
metadata:
annotations:
Expand Down
9 changes: 5 additions & 4 deletions .kontinuous/env/prod/templates/alert.sealed-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ metadata:
namespace: cdtn-admin
spec:
encryptedData:
HASURA_GRAPHQL_ADMIN_SECRET: AgCjb716TUWCu18Z5oPiYfifKKCozj9S9yxBJpuGNziG5yNMCn+UPP0NfXAT5QBztbW4f4WfQ01CZ0zS9/uPJYZ7TlVSDiv2X9JWZzQqGZoBQJnsCBE2E4pqK7VFsz2pDwYn7leX558FH8OV+csaoMsV2IfrFRnygMh3T5E0iXAxs6TsogGugMob58pX+FbMUaFPI2PVDbRBcc5AS+bICU8/Ry14UlL88HNkOSM0KTYLNFwpwo87GbWBi99FayiUTxR8zgfXpi7ov+RhieyFqUyoUT6sGpMvjvhT4n8KrxbRbamBy9cuTRPgjshKm3/nAZZ/Z+dDeM3+Ior4jSK/Ofuq09bAc4ZCo/ialnef7XQXnG7pvHb3j+W/ER7lnoJW2dr/DMlIw8pAlmeMu5qHc7yrDPGr61iFYN8W9Wxj3oiWTO0LrfnWpeEpSjY1fH9N+JiMEqoOWPv8Ym2ri4k+HbWb848spmuyQCZozSoorcesnb7MczT85E+u1nTe0HZCVQLUdDJ2DVXX0uXe/8MQOfv9OcEdKAbC95MwUgv0sGgskj4OjLz7DpX4pFmrnAVcVSyyyI8fBYohzVk703mlYljsKmIaYIdzvocF42rbn1sk6xeqVvz5Vi6nt4zq95rdpOHHXs0dJSUxbWH7GGdvykwJUzxqdCYvouaI8RHmx8tHr+sMecsUgkq4WiO+WAyLve2AsZ0EiodozaFcb4GHNpvxgp74RAo/0d9EjoSFeCU=
OAUTH_CLIENT_ID: AgADXiJHti1toGUshvqQ2hdqWLIWqMuMozYHt0wkNCD5+sJR6QY3nILb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T1y9nEGMvINwSD3YuyodM9Y+1hKxPa9YNEMEoWAYE/6drchfC8jsxFgI8/lsjOmbGEbvyOAacfhmk1YVENXfwVQ8hRG+F1R51k+kOsVCxddw6afyOfwHPM7keEzdxtvntSMOVFvFr2k=
TOKEN_MT: AgBNfNKC/62MDcmVmToCQKADXiEwiA6nGdhgqNWtFemYd0vkl5E05vr8+eOcyZxUth8J9Fphs6kR4c+YMyVI5DpKdcpLiVQOf+GbknS96aHrh8mkXtwuvglRus1QLMQ++lfUpBbmRSybDDvKFuop3TvnDM9ywVxmLK32ubXXABJeBw38Jh8/xywgI8kdaXrO+2hFXYIIPV3PsTHDg8byx+7ho1+9JSK3hBzBqti9Kl5nhoD4zNY4HKOseQUcWdfiEAQvd4DzGY5433v921ZYzu4IQgdu3r2tXCJxxZNa05ZoslSn506+0vNPHKZuPXZRteT7Y3SXJboFVct2PTVDBCzgSiA+PGxxWmlT4ntz+hMCHDIKcXdhQW52+AfeqHwKJIkwVioLaXoA2D/gh6Ixz5P6v5AlpYnER5cBjPYZmfBrWlVR/R8xpqbHd5o3SQw5pGeOPCIHtOEmOxVCl2DawVab2XMNeZpq/uQnHnWEE5UEwXGTWf6jgemt1EdOAzN8HoS+a4rsWuxSWc+hdporNmIji9GnhgmvAWLzsT2HpPLy18bMjFKOts3FC9rzyNUu17ClNYFw/mYd5ajGFc2bLWWBM1OsPKPTV8MbVdvDOJT4bHPGgP5jOAfQs86r6k/YQKaEn7AgaUGlMgIt+rqRtzWxBgm0S3X4rZVjHXoGpdYV8SJGcMUlHvmdkC/0Crl45WcAaRderL/ABjK0iVvGMungCygrAhbBpT5sJ6O91zw=
template:
metadata:
annotations:
Expand Down
29 changes: 24 additions & 5 deletions targets/alert-cli/src/dares/__tests__/scrapping.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
import axios from "axios";
import { extractXlsxFromUrl } from "../scrapping";
import { extractDaresXlsxFromMT } from "../scrapping";

jest.mock("axios");

describe("extractXlsxFromUrl", () => {
it("should extract xlsx file from url", async () => {
const url = "https://example.com/files";
const html = `
<html>
<head>
<base href="https://www.domain.com" />
</head>
<body>
<a href="file1.xlsx">File 1</a>
<a href="file2.xlsx">File 2</a>
</body>
</html>
`;
(axios.get as jest.Mock).mockResolvedValueOnce({ data: html });
const result = await extractDaresXlsxFromMT();
expect(result).toBe("https://www.domain.com/file1.xlsx");
});

it("should throw error if xlsx file is present but url is relative with base tag", async () => {
const html = `
<html>
<body>
Expand All @@ -15,8 +31,9 @@ describe("extractXlsxFromUrl", () => {
</html>
`;
(axios.get as jest.Mock).mockResolvedValueOnce({ data: html });
const result = await extractXlsxFromUrl(url);
expect(result).toBe("file1.xlsx");
await expect(extractDaresXlsxFromMT()).rejects.toThrow(
"xlsx file url not valid : file1.xlsx"
);
});

it("should throw error if no xlsx file found", async () => {
Expand All @@ -29,6 +46,8 @@ describe("extractXlsxFromUrl", () => {
</html>
`;
(axios.get as jest.Mock).mockResolvedValueOnce({ data: html });
await expect(extractXlsxFromUrl(url)).rejects.toThrow("No xlsx file found");
await expect(extractDaresXlsxFromMT()).rejects.toThrow(
"No xlsx file found"
);
});
});
3 changes: 2 additions & 1 deletion targets/alert-cli/src/dares/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const URL_SCRAPING =
"https://code.travail.gouv.fr/fiche-ministere-travail/conventions-collectives-nomenclatures";
"https://travail-emploi.gouv.fr/dialogue-social/negociation-collective/article/conventions-collectives-nomenclatures";

export const URL_KALI =
"https://raw.githubusercontent.com/SocialGouv/kali-data/master/data/index.json";
6 changes: 3 additions & 3 deletions targets/alert-cli/src/dares/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { URL_KALI, URL_SCRAPING } from "./config";
import { URL_KALI } from "./config";
import { getDifferenceBetweenIndexAndDares } from "./difference";
import { downloadFileInTempFolder } from "./download";
import { saveDiff } from "./save";
import { extractXlsxFromUrl } from "./scrapping";
import { extractDaresXlsxFromMT } from "./scrapping";

export const runDares = async () => {
const xlsxUrl = await extractXlsxFromUrl(URL_SCRAPING);
const xlsxUrl = await extractDaresXlsxFromMT();
const xlsxPath = await downloadFileInTempFolder(xlsxUrl, "dares.xlsx");
const indexPath = await downloadFileInTempFolder(URL_KALI, "index.json");
const diff = await getDifferenceBetweenIndexAndDares(xlsxPath, indexPath);
Expand Down
19 changes: 16 additions & 3 deletions targets/alert-cli/src/dares/scrapping.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
import axios from "axios";
import { URL_SCRAPING } from "./config";

export const extractXlsxFromUrl = async (url: string) => {
const response = await axios.get(url);
export const extractDaresXlsxFromMT = async () => {
const response = await axios.get(URL_SCRAPING, {
headers: {
Cookie: `cgtoken=${process.env.TOKEN_MT};`,
},
});
const html = response.data;
const regex = /href="([^"]*\.xlsx)"/g;
const match = regex.exec(html);
if (!match) {
throw new Error("No xlsx file found");
}
return match[1];
if (match[1].startsWith("http")) {
return match[1];
}
const baseRegex = /<base href="(.*)" \/>/g;
const baseMatch = baseRegex.exec(html);
if (!baseMatch) {
throw new Error(`xlsx file url not valid : ${match[1]}`);
}
return `${baseMatch[1]}/${match[1]}`;
};

0 comments on commit e9fa5a9

Please sign in to comment.