Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump versions to 3.20230807.0 #648

Merged
merged 2 commits into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 52 additions & 52 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@miniflare/root",
"version": "3.20230801.1",
"version": "3.20230807.0",
"private": true,
"description": "Fun, full-featured, fully-local simulator for Cloudflare Workers",
"keywords": [
Expand Down
4 changes: 2 additions & 2 deletions packages/miniflare/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "miniflare",
"version": "3.20230801.1",
"version": "3.20230807.0",
"description": "Fun, full-featured, fully-local simulator for Cloudflare Workers",
"keywords": [
"cloudflare",
Expand Down Expand Up @@ -39,7 +39,7 @@
"source-map-support": "0.5.21",
"stoppable": "^1.1.0",
"undici": "^5.13.0",
"workerd": "1.20230801.0",
"workerd": "1.20230807.0",
"ws": "^8.11.0",
"youch": "^3.2.2",
"zod": "^3.20.6"
Expand Down
27 changes: 13 additions & 14 deletions packages/miniflare/src/plugins/queues/gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,17 @@ const DEFAULT_BATCH_TIMEOUT = 1; // second
const DEFAULT_RETRIES = 2;

// https://github.com/cloudflare/workerd/blob/01b87642f4eac932aa9074d7e5eec4fd3c90968a/src/workerd/io/outcome.capnp
const Outcome = {
UNKNOWN: 0,
OK: 1,
EXCEPTION: 2,
EXCEEDED_CPU: 3,
KILL_SWITCH: 4,
DAEMON_DOWN: 5,
SCRIPT_NOT_FOUND: 6,
CANCELED: 7,
EXCEEDED_MEMORY: 8,
} as const;
const OutcomeSchema = z.nativeEnum(Outcome);
const OutcomeSchema = z.enum([
"unknown",
"ok",
"exception",
"exceededCpu",
"killSwitch",
"daemonDown",
"scriptNotFound",
"cancelled",
"exceededMemory",
]);

const QueueResponseSchema = z.object({
outcome: OutcomeSchema,
Expand All @@ -37,7 +36,7 @@ const QueueResponseSchema = z.object({
});
type QueueResponse = z.infer<typeof QueueResponseSchema>;
const exceptionQueueResponse: QueueResponse = {
outcome: Outcome.EXCEPTION,
outcome: "exception",
retryAll: false,
ackAll: false,
explicitRetries: [],
Expand Down Expand Up @@ -153,7 +152,7 @@ export class QueuesGateway {

// Get messages to retry. If dispatching the batch failed for any reason,
// retry all messages.
const retryAll = response.retryAll || response.outcome !== Outcome.OK;
const retryAll = response.retryAll || response.outcome !== "ok";
const explicitRetries = new Set(response.explicitRetries);

let failedMessages = 0;
Expand Down