-
Notifications
You must be signed in to change notification settings - Fork 544
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
eng 135 wrap all db reads with a retry (#1708)
* refactor(init.ts): increase database connection retry to 3 * fix(ratelimit): update error handling in DurableObjectRatelimiter
- Loading branch information
Showing
6 changed files
with
136 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { ApiCheck, AssertionBuilder } from "checkly/constructs"; | ||
|
||
new ApiCheck("books-api-check-1", { | ||
name: "Books API", | ||
alertChannels: [], | ||
degradedResponseTime: 10000, | ||
maxResponseTime: 20000, | ||
request: { | ||
url: "https://danube-web.shop/api/books", | ||
method: "GET", | ||
followRedirects: true, | ||
skipSSL: false, | ||
assertions: [ | ||
AssertionBuilder.statusCode().equals(200), | ||
AssertionBuilder.jsonBody("$[0].id").isNotNull(), | ||
], | ||
}, | ||
runParallel: true, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { HeartbeatCheck } from "checkly/constructs"; | ||
|
||
// Heartbeat checks allow you to monitor jobs or recurring tasks. | ||
// This feature is only available on paid plans. | ||
// Upgrade your plan to start using it https://app.checklyhq.com/new-billing | ||
// If you're already on a paid plan, uncomment the following lines to create a heartbeat check. | ||
|
||
/* new HeartbeatCheck('heartbeat-check-1', { | ||
name: 'Send weekly newsletter job', | ||
period: 1, | ||
periodUnit: 'hours', | ||
grace: 30, | ||
graceUnit: 'minutes', | ||
}) | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { expect, test } from "@playwright/test"; | ||
|
||
// You can override the default Playwright test timeout of 30s | ||
// test.setTimeout(60_000); | ||
|
||
test("webshop homepage", async ({ page }) => { | ||
const response = await page.goto("https://danube-web.shop"); | ||
expect(response?.status()).toBeLessThan(400); | ||
await expect(page).toHaveTitle(/Danube WebShop/); | ||
await page.screenshot({ path: "homepage.jpg" }); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { ApiCheck, AssertionBuilder } from "checkly/constructs"; | ||
|
||
new ApiCheck("/v1/liveness", { | ||
name: "Liveness", | ||
alertChannels: [], | ||
degradedResponseTime: 10000, | ||
maxResponseTime: 20000, | ||
request: { | ||
url: "https://api.unkey.dev/v1/liveness", | ||
method: "GET", | ||
followRedirects: true, | ||
skipSSL: false, | ||
assertions: [ | ||
AssertionBuilder.statusCode().equals(200), | ||
AssertionBuilder.jsonBody("$[0].id").isNotNull(), | ||
], | ||
}, | ||
runParallel: true, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { defineConfig } from "checkly"; | ||
|
||
/** | ||
* See https://www.checklyhq.com/docs/cli/project-structure/ | ||
*/ | ||
const config = defineConfig({ | ||
/* A human friendly name for your project */ | ||
projectName: "unkey", | ||
/** A logical ID that needs to be unique across your Checkly account, | ||
* See https://www.checklyhq.com/docs/cli/constructs/ to learn more about logical IDs. | ||
*/ | ||
logicalId: "unkey", | ||
/* An optional URL to your Git repo */ | ||
repoUrl: "https://github.com/unkeyed/unkey", | ||
/* Sets default values for Checks */ | ||
checks: { | ||
/* A default for how often your Check should run in minutes */ | ||
frequency: 10, | ||
/* Checkly data centers to run your Checks as monitors */ | ||
locations: ["us-east-1", "eu-west-1"], | ||
/* An optional array of tags to organize your Checks */ | ||
tags: ["mac"], | ||
/** The Checkly Runtime identifier, determining npm packages and the Node.js version available at runtime. | ||
* See https://www.checklyhq.com/docs/cli/npm-packages/ | ||
*/ | ||
runtimeId: "2023.09", | ||
/* A glob pattern that matches the Checks inside your repo, see https://www.checklyhq.com/docs/cli/using-check-test-match/ */ | ||
checkMatch: "**/__checks__/**/*.check.ts", | ||
/* Global configuration option for Playwright-powered checks. See https://docs/browser-checks/playwright-test/#global-configuration */ | ||
browserChecks: { | ||
/* A glob pattern matches any Playwright .spec.ts files and automagically creates a Browser Check. This way, you | ||
* can just write native Playwright code. See https://www.checklyhq.com/docs/cli/using-check-test-match/ | ||
* */ | ||
testMatch: "**/__checks__/**/*.spec.ts", | ||
}, | ||
}, | ||
cli: { | ||
/* The default datacenter location to use when running npx checkly test */ | ||
runLocation: "eu-west-1", | ||
/* An array of default reporters to use when a reporter is not specified with the "--reporter" flag */ | ||
reporters: ["list"], | ||
}, | ||
}); | ||
|
||
export default config; |
d6059b3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
planetfall – ./apps/planetfall
planetfall-unkey.vercel.app
planetfall-git-main-unkey.vercel.app
planetfall-two.vercel.app
planetfall.unkey.dev