From dbe7de9dff20725577393fc9ff0c2e7853091164 Mon Sep 17 00:00:00 2001 From: Mark McCulloh Date: Fri, 8 Mar 2024 13:08:51 -0500 Subject: [PATCH] chore: update dev node version to fix intermittent fetch errors (#5866) Updates node used in workflow and for local dev from `20.11.0` to `20.11.1` Also removes an SDK test, per reasoning from https://github.com/winglang/wing/pull/5856 Fixes #5734 See 12 successful runs in a row (fully uncached): - https://github.com/winglang/wing/actions/runs/8206258494/attempts/1?pr=5866 - https://github.com/winglang/wing/actions/runs/8206258494/attempts/2?pr=5866 It actually succeeded more than that, but this is the cleanest list *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- .devcontainer/devcontainer.json | 2 +- .github/workflows/build.yml | 2 +- .github/workflows/matrix-update.yml | 2 +- .github/workflows/tf-aws-test.yml | 2 +- .node-version | 2 +- libs/wingsdk/test/target-sim/topic.test.ts | 37 +--------------------- package.json | 2 +- 7 files changed, 7 insertions(+), 42 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 4dedc44bee2..fe3b7e2bda0 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -4,7 +4,7 @@ "updateContentCommand": "pnpm install", "features": { "ghcr.io/devcontainers/features/node:1": { - "version": "20.11.0" + "version": "20.11.1" }, "ghcr.io/devcontainers/features/aws-cli:1": {}, "ghcr.io/devcontainers/features/terraform:1": {}, diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3711641133e..48acc140f38 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,7 +19,7 @@ concurrency: cancel-in-progress: true env: - NODE_VERSION: "20.11.0" + NODE_VERSION: "20.11.1" PNPM_VERSION: "8.15.1" CARGO_TERM_COLOR: always TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} diff --git a/.github/workflows/matrix-update.yml b/.github/workflows/matrix-update.yml index 490623d545d..f535ae3aeff 100644 --- a/.github/workflows/matrix-update.yml +++ b/.github/workflows/matrix-update.yml @@ -3,7 +3,7 @@ on: workflow_call: {} env: - NODE_VERSION: "20.11.0" + NODE_VERSION: "20.11.1" PNPM_VERSION: "8.15.1" jobs: diff --git a/.github/workflows/tf-aws-test.yml b/.github/workflows/tf-aws-test.yml index 03e6ee752bc..d63db67a64b 100644 --- a/.github/workflows/tf-aws-test.yml +++ b/.github/workflows/tf-aws-test.yml @@ -28,7 +28,7 @@ on: - sim env: AWS_REGION: "us-east-1" - NODE_VERSION: "20.11.0" + NODE_VERSION: "20.11.1" # this variable indicates wheater to use wing cli from a local version (using the current repo code) # or use the latest remote npm version LOCAL_BUILD: ${{ github.workflow == 'build' }} diff --git a/.node-version b/.node-version index 18c28417233..726a201e63a 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -20.11.0 \ No newline at end of file +20.11.1 \ No newline at end of file diff --git a/libs/wingsdk/test/target-sim/topic.test.ts b/libs/wingsdk/test/target-sim/topic.test.ts index d8c364657e4..5d8b08f925c 100644 --- a/libs/wingsdk/test/target-sim/topic.test.ts +++ b/libs/wingsdk/test/target-sim/topic.test.ts @@ -1,10 +1,5 @@ import { test, expect } from "vitest"; -import { - listMessages, - treeJsonOf, - waitUntilTrace, - waitUntilTraceCount, -} from "./util"; +import { treeJsonOf, waitUntilTrace } from "./util"; import * as cloud from "../../src/cloud"; import { Testing } from "../../src/simulator"; import { Node } from "../../src/std"; @@ -31,36 +26,6 @@ test("create a topic", async () => { expect(app.snapshot()).toMatchSnapshot(); }); -test("topic publishes messages as they are received", async () => { - // GIVEN - const app = new SimApp(); - const handler = Testing.makeHandler( - `async handle(message) { console.log("Received " + message); }` - ); - const topic = new cloud.Topic(app, "my_topic"); - topic.onMessage(handler); - - const s = await app.startSimulator(); - const topicClient = s.getResource("/my_topic") as cloud.ITopicClient; - - // WHEN - await topicClient.publish("Alpha"); - await topicClient.publish("Beta"); - await waitUntilTrace(s, (trace) => - trace.data.message.startsWith("Received Alpha") - ); - await waitUntilTrace(s, (trace) => - trace.data.message.startsWith("Received Beta") - ); - - // THEN - await s.stop(); - const messages = listMessages(s); - const alphaIndex = messages.findIndex((m) => m.startsWith("Received Alpha")); - const betaIndex = messages.findIndex((m) => m.startsWith("Received Beta")); - expect(alphaIndex).toBeLessThan(betaIndex); -}); - test("topic publishes messages to multiple subscribers", async () => { // GIVEN const app = new SimApp(); diff --git a/package.json b/package.json index 8db14bbe981..d5d70b8853b 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "wing": "turbo compile --filter=winglang --output-logs=errors-only && ./apps/wing/bin/wing" }, "volta": { - "node": "20.11.0", + "node": "20.11.1", "pnpm": "8.15.1" }, "pnpm": {