New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DEFAULT_VIEWPORT_WIDTH too narrow for non tty gitlab runners #5919
Comments
Thank you for your suggestion. We are not sure if environment variables should be used for this purpose. Please give us additional time to research this. |
Yes please! The output from our Jenkins CI server jobs is miserably narrow, which makes automated failure analysis very difficult.
As far as I know, it is impossible to start a TTY with a set width/columns. Just a quick Google search shows that trying to control this in an OS-agnostic way is a fools errand. So having some way to override this If needed, I'll make the PR myself. |
Thank you for your suggestion. We would greatly appreciate your help. You are welcome to open a PR. |
@VasilyStrelyaev Done |
Thank you, @PayBas, we will take a look! |
Release v1.20.0-alpha.1 addresses this. |
What is your Test Scenario?
The problem occurs when testcafe is run by non-interactive runner. E.g. gitlab docker-machine runner. By default this runner runs its jobs in non-interactive mode(in other words non-tty). That is why this line fails:
get-viewport-width.js:
if (outStream === process.stdout && tty.isatty(1)) {
And DEFAULT_VIEWPORT_WIDTH is set. As a result all the formatted lines are cut to 78 chars. Which is very limiting. In my case this constant limits length of SELECTOR shown in exceptions to 1/2 of full length. That makes my debugging more complicated. I am suggesting an override to this constant so I am able to see whole selector.
What are you suggesting?
I am suggesting to be able to override this default value by env variable. It could be also placed in some env file if there is some?
What alternatives have you considered?
For non-tty runners there is no alternative then to switch to tty-runners. That means register gitlab runner (docker-executor) as interactive.
Additional context
Whole proposed change:
get-viewport-width.js:
The text was updated successfully, but these errors were encountered: