getgauge/Flash

Not able to use flash on kubernetes/docker pod

prakhargupta-mt opened this issue · 12 comments

Tried using flash on our project, on local it was working fine but when I tried to run the tests on our kubernetes pod, the data on page was not updating, on further debugging, saw that the localhost ip (127.0.0.1) was hardcoded in listener/http.go, in which the data is fetched from /progress route.

Then I tried to replace that local ip with our internal ip, made a distro, installed the plugin, but during runtime getting this error.

Compatible version of plugin flash not found. Installing plugin flash...
........................
Successfully installed plugin 'flash' version 0.0.1
Compatible Flash plugin version to current Gauge version 1.0.6 not found

Used this command to install flash

# Install Gauge Flash
RUN gauge install flash --file lib/flash-0.0.2-linux.x86_64.zip

sriv commented

I suppose we could make the host configurable, but we also need to look at making the port configurable. Right now it just uses a free port.

Also note that we recently changed the way gauge and plugins communicate, they use gRPC now. Just FYI.

sriv commented

Forgot the compatibility error -

Due to the gRPC changes, we marked the HEAD of flash to be compatible with gauge 1.0.7 onwards. Gauge 1.0.7 is yet to be released.

You can set gaugeVersionSupport.minimum to 1.0.6 in plugin.json

@prakhargupta-mt The Port can be configured using FLASH_SERVER_PORT. Refer https://github.com/getgauge/Flash/#configuration

Then you can access the live reporting server at the <KUBE_POD_IP>:<FLASH_SERVER_PORT>

Changing the IP in the source code will not work as the server won't be able to assign the IP.

Regarding port, I've already configured it. Also, I don't want to port forward to kubernetes pod every time I want to access the run details. Will try to modify gaugeVersionSupport.minimum and update here. Thanks @BugDiver @sriv

Updated gaugeVersionSupport.minimum in plugin.json to 1.0.6, but now I'm getting this error.

[Flash] Starting progress reporting at http://127.0.0.1:7001
Listening on port:43463
Error starting plugin Flash 0.0.2. Failed to connect to plugin. Timed out connecting to 127.0.0.1:46581

@BugDiver Realised later what you meant by Changing the IP in the source code will not work as the server won't be able to assign the IP.. But I'm trying to change the IP only in /progress call, everything else is left as it is. Won't that work?

sriv commented

@prakhargupta-mt - I assume that gauge and flash running in the same POD? And your use case like to access flash's UI from outside?

@sriv Yes and Yes.

sriv commented

I can replicate this issue. Here's the sample I created: https://github.com/sriv/flash-7

@sriv : Can we expect a fix anytime soon?

@vikalp-mindtickle Currently the team is quite busy with other things (few pending releases, some other work in priority). But we will try to prioritize it and push a fix as soon as possible.

@sriv @BugDiver - Any progress regarding this?

sriv commented

Hi @prakhargupta-mt - the team is a bit swamped at the moment, and hence we are unable to pick this up right away. If you'd like to send a pull request, we would be happy to get merge it!