Skip to content

Commit

Permalink
chore: update dev node version to fix intermittent fetch errors (#5866)
Browse files Browse the repository at this point in the history
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 #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)*.
  • Loading branch information
MarkMcCulloh authored Mar 8, 2024
1 parent 4a9f821 commit dbe7de9
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {},
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/matrix-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
workflow_call: {}

env:
NODE_VERSION: "20.11.0"
NODE_VERSION: "20.11.1"
PNPM_VERSION: "8.15.1"

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tf-aws-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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' }}
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.11.0
20.11.1
37 changes: 1 addition & 36 deletions libs/wingsdk/test/target-sim/topic.test.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down

0 comments on commit dbe7de9

Please sign in to comment.