When running the e2e tests, we used to start all the esm modules in parallel. When running using yarn, it uses ports 8081-8086 for those esm modules.
However, in Ubuntu 22.04 (ubuntu-latest) runner, port 8084 is used by a service called mono in default. Therefore the esm-patient-lists app fails to run on port 8084.
Hello @chiran, If starting the dev server on some different ports will not cause any issue then we can also change the ports when running yarn start command by specifying a specific port to use using --port in the yarn start command. Further improving the solution we can also check if the series of ports which we are trying to access are free or not and based on that we can modify the command for starting the dev by specifying different ports.
The yarn start ''packages/esm-*-app" command is currently configured to use a number of consecutive ports (starting from 8081) depending on the number of esm-modules. As we discussed in the last meeting, the best solution would be configuring it to skip the busy ports while assigning the consecutive ports for esm-modules.
This is also good as a temporary solution. But still, we didn’t encounter problems with any other ports except port 8084. So I think it would be better to free the port before running the dev server, instead of hardcoding the port in the yarn start command. (as a temporary solution)
@jayasanka@ibacher what do you think?
To summarize, In the GitHub action workflows, the esm-patient-list-app fails to start since port 8084 is already occupied by a service in ubuntu-latest runner in default. Due to that, we can’t run the related e2e tests. So we thought to free the port before running the dev server in github workflow.
Yeah. That will solve the problem for every repository with a single fix. Otherwise we’ll have to free the port in each workflow in every repository. But we need to check whether that range of ports are not occupied in ubuntu-runner by default. @chiran can you please look into that?
@ibacher, then we will have to update all the related documentations where we have mentioned about the base port (8080). Is that ok?