From a2cdc520e6e98d866cf8d73199669cb5ae265d40 Mon Sep 17 00:00:00 2001 From: rafaelsideguide <150964962+rafaelsideguide@users.noreply.github.com> Date: Fri, 5 Jul 2024 14:49:03 -0300 Subject: [PATCH] dependabot for security checks, fixed crawl test --- .github/dependabot.yml | 30 +++----- apps/test-suite/data/crawl.json | 103 +++++++++++----------------- apps/test-suite/tests/crawl.test.ts | 8 +-- 3 files changed, 52 insertions(+), 89 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 262f9005..6ab9059b 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,11 +5,8 @@ updates: directory: "/apps/playwright-service" schedule: interval: "weekly" - groups: - prod-deps: - dependency-type: "production" - dev-deps: - dependency-type: "development" + open-pull-requests-limit: 0 # Disable version updates + security-updates: "all" commit-message: prefix: "apps/playwright-service" include: "scope" @@ -19,11 +16,8 @@ updates: directory: "/apps/python-sdk" schedule: interval: "weekly" - groups: - prod-deps: - dependency-type: "production" - dev-deps: - dependency-type: "development" + open-pull-requests-limit: 0 # Disable version updates + security-updates: "all" commit-message: prefix: "apps/python-sdk" include: "scope" @@ -33,11 +27,8 @@ updates: directory: "/apps/api" schedule: interval: "weekly" - groups: - prod-deps: - dependency-type: "production" - dev-deps: - dependency-type: "development" + open-pull-requests-limit: 0 # Disable version updates + security-updates: "all" commit-message: prefix: "apps/api" include: "scope" @@ -47,11 +38,8 @@ updates: directory: "/apps/test-suite" schedule: interval: "weekly" - groups: - prod-deps: - dependency-type: "production" - dev-deps: - dependency-type: "development" + open-pull-requests-limit: 0 # Disable version updates + security-updates: "all" commit-message: prefix: "apps/test-suite" - include: "scope" + include: "scope" \ No newline at end of file diff --git a/apps/test-suite/data/crawl.json b/apps/test-suite/data/crawl.json index 8bc28a67..1499a1ed 100644 --- a/apps/test-suite/data/crawl.json +++ b/apps/test-suite/data/crawl.json @@ -5,47 +5,46 @@ "expected_crawled_pages": ["https://www.vellum.ai/llm-leaderboard"] }, { - "website": "https://openai.com/news", - "expected_min_num_of_pages": 4, - "expected_crawled_pages": [ - "https://openai.com/news/company/", - "https://openai.com/news/research/", - "https://openai.com/news/safety-and-alignment/", - "https://openai.com/news/stories/" + "website": "https://openai.com/news", + "expected_min_num_of_pages": 4, + "expected_crawled_pages": [ + "https://openai.com/news/company/", + "https://openai.com/news/research/", + "https://openai.com/news/safety-and-alignment/", + "https://openai.com/news/stories/" ] -}, + }, { - "website": "https://www.framer.com/pricing", - "expected_min_num_of_pages": 1, - "expected_not_crawled_pages": [ - "https://www.framer.com/features/navigation/", - "https://www.framer.com/contact/", - "https://www.framer.com/add-ons/", - "https://www.framer.com/free-saas-ui-kit/", - "https://www.framer.com/help/", - "https://www.framer.com/features/effects/", - "https://www.framer.com/enterprise/", - "https://www.framer.com/templates/" - ] -}, + "website": "https://www.framer.com/pricing", + "expected_min_num_of_pages": 1, + "expected_not_crawled_pages": [ + "https://www.framer.com/features/navigation/", + "https://www.framer.com/contact/", + "https://www.framer.com/add-ons/", + "https://www.framer.com/free-saas-ui-kit/", + "https://www.framer.com/help/", + "https://www.framer.com/features/effects/", + "https://www.framer.com/enterprise/", + "https://www.framer.com/templates/" + ] + }, { - "website": "https://mendable.ai/pricing", - "expected_min_num_of_pages": 1, - "expected_not_crawled_pages": [ - "https://mendable.ai/", - "https://mendable.ai/blog", - "https://mendable.ai/signin", - "https://mendable.ai/signup", - "https://mendable.ai", - "https://mendable.ai/usecases/sales-enablement", - "https://mendable.ai/usecases/documentation", - "https://mendable.ai/usecases/cs-enablement", - "https://mendable.ai/usecases/productcopilot", - "https://mendable.ai/security" - ], - "notes": "This one should not go backwards, but it does!" -}, - + "website": "https://mendable.ai/pricing", + "expected_min_num_of_pages": 1, + "expected_not_crawled_pages": [ + "https://mendable.ai/", + "https://mendable.ai/blog", + "https://mendable.ai/signin", + "https://mendable.ai/signup", + "https://mendable.ai", + "https://mendable.ai/usecases/sales-enablement", + "https://mendable.ai/usecases/documentation", + "https://mendable.ai/usecases/cs-enablement", + "https://mendable.ai/usecases/productcopilot", + "https://mendable.ai/security" + ], + "notes": "This one should not go backwards, but it does!" + }, { "website": "https://agentops.ai/blog", "expected_min_num_of_pages": 6, @@ -99,12 +98,10 @@ "website": "https://firecrawl.dev", "expected_min_num_of_pages": 2, "expected_crawled_pages": [ - "https://firecrawl.dev/", - "https://firecrawl.dev/pricing" + "https://www.firecrawl.dev/", + "https://www.firecrawl.dev/pricing" ] }, - - { "website": "https://fly.io/docs/gpus/gpu-quickstart", "expected_min_num_of_pages": 1, @@ -119,7 +116,6 @@ ], "notes": "This one should not go backwards, but it does!" }, - { "website": "https://www.instructables.com/circuits", "expected_min_num_of_pages": 12, @@ -153,26 +149,5 @@ "https://richmondconfidential.org/2009/10/13/before-napa-there-was-winehaven/", "https://richmondconfidential.org/2009/10/13/family-calls-for-end-to-violence-at-memorial-for-slain-woman-friend/" ] - }, - { - "website": "https://www.boardgamegeek.com", - "expected_min_num_of_pages": 15, - "expected_crawled_pages": [ - "https://www.boardgamegeek.com/browse/boardgameartist", - "https://www.boardgamegeek.com/browse/boardgamehonor", - "https://www.boardgamegeek.com/browse/boardgamepublisher", - "https://www.boardgamegeek.com/browse/boardgamepodcast", - "https://www.boardgamegeek.com/wiki/page/Index", - "https://www.boardgamegeek.com/browse/boardgamecategory", - "https://www.boardgamegeek.com/boardgame/random", - "https://www.boardgamegeek.com/browse/boardgamemechanic", - "https://www.boardgamegeek.com/forums", - "https://www.boardgamegeek.com/gonecardboard", - "https://www.boardgamegeek.com/browse/boardgameaccessory", - "https://www.boardgamegeek.com/browse/boardgamedesigner", - "https://www.boardgamegeek.com/", - "https://www.boardgamegeek.com/previews", - "https://www.boardgamegeek.com/browse/boardgame" - ] } ] diff --git a/apps/test-suite/tests/crawl.test.ts b/apps/test-suite/tests/crawl.test.ts index 577725a2..533bade3 100644 --- a/apps/test-suite/tests/crawl.test.ts +++ b/apps/test-suite/tests/crawl.test.ts @@ -96,8 +96,8 @@ describe("Crawling Checkup (E2E)", () => { website: websiteData.website, prompt: 'CRAWL', expected_output: `SUCCESS: ${websiteData.expected_crawled_pages}`, - actual_output: `FAILURE: ${completedResponse.body.data}`, - error: `Expected crawled pages to contain ${websiteData.expected_crawled_pages}, but got ${completedResponse.body.data}` + actual_output: `FAILURE: ${completedResponse.body.data.map((d: { url: string }) => d.url)}`, + error: `Expected crawled pages to contain ${websiteData.expected_crawled_pages}, but got ${completedResponse.body.data.map((d: { url: string }) => d.url)}` }); console.log('Error: ', errorLog); continue; @@ -109,8 +109,8 @@ describe("Crawling Checkup (E2E)", () => { website: websiteData.website, prompt: 'CRAWL', expected_output: `SUCCESS: ${websiteData.expected_not_crawled_pages}`, - actual_output: `FAILURE: ${completedResponse.body.data}`, - error: `Expected crawled pages to not contain ${websiteData.expected_not_crawled_pages}, but got ${completedResponse.body.data}` + actual_output: `FAILURE: ${completedResponse.body.data.map((d: { url: string }) => d.url)}`, + error: `Expected crawled pages to not contain ${websiteData.expected_not_crawled_pages}, but got ${completedResponse.body.data.map((d: { url: string }) => d.url)}` }); console.log('Error: ', errorLog); continue;