winglang / wing

A programming language for the cloud ☁️ A unified programming model, combining infrastructure and runtime code into one language ⚡
https://winglang.io
Other
5k stars 196 forks source link

Wing Console doesn't indicate that a container failed to start #7005

Open eladb opened 2 months ago

eladb commented 2 months ago

I tried this:

bring sim;

new sim.Container(
  name: "http-echo",
  image: "hashicorp/http-echox",
);

I also tried to use containers.Workload:

bring containers;

new containers.Workload(
  name: "http-echo",
  image: "hashicorp/http-echox",
  port: 5678,
  public: true,
  replicas: 2,
  args: ["-text=hello1234"],
);

This happened:

  1. The Wing Console starts with status: Success,
  2. The Container node doesn't have any status indicator

If I change to "verbose" log level I see:

Error response from daemon: pull access denied for hashicorp/http-echox, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

When I used containers.Workload, the Console showed a blue screen:

Failed to start simulator.

Failed to start resources: "root/Default/Workload/http-echo/Field/Handler", "root/Default/Workload/http-echo/readiness", "root/Default/Workload/internal_url/Handler", "root/Default/Workload/public_url/Handler"

Internal error: An internal compiler error occurred. Please report this bug by creating an issue on GitHub (github.com/winglang/wing/issues) with your code and this trace.

I expected this:

In both cases (sim.Container and containers.Workload), I expected the error to show in the logs and the Container node to have a RED indicator.

Is there a workaround?

No response

Anything else?

No response

Wing Version

No response

Node.js Version

No response

Platform(s)

No response

Community Notes

skyrpex commented 2 months ago

@Chriscbr we should discuss this BSOD behavior when some resources can't be resolved (e.g. Failed to start resources). Off the top of my head, I'm not sure if I can change the behavior without altering the SDK or the simulator.