Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

dials.background: Fix error writing out file when no display connection available #1550

Merged
merged 4 commits into from
Jan 18, 2021

Conversation

ndevenish
Copy link
Member

@ndevenish ndevenish commented Jan 16, 2021

Jenkins has failed on the new background_plot test because apparently the X server isn't properly configured the connection to the desktop isn't available on mac CI

 FAILED TO establish the default connection to the WindowServer

I had actually tested a fix to do exactly this before, because when DISPLAY is set the X server is connected to, even if it doesn't display anything, but had decided my complaint was small and technical and the cost of connecting to the window server was also small (on macOS, when logged in remotely, the X server opens but doesn't display anything). Additionally, forcing the agg backend causes issues if you want to use the command line tools functionally from a program that wants to .show() plots, so I thought leaving it would be sufficient to avoid problems. C'est la vie. 馃う

ndevenish and others added 2 commits January 16, 2021 12:29
If the X server isn't configured properly or available, then don't
crash when trying to write a file out, in which case it needn't
connect to the X server to begin with.
@ndevenish ndevenish changed the title dials.background: Fix error writing out file when no X connection available dials.background: Fix error writing out file when no display connection available Jan 16, 2021
Bad X11 connection probably causes much broader problems and
isn't something that we need to test specific cases for (if
we were insistent about this full test suite with bad display
would be a much less intrusive way to verify)
@codecov
Copy link

codecov bot commented Jan 16, 2021

Codecov Report

Merging #1550 (b10cf05) into master (2443d13) will not change coverage.
The diff coverage is 66.66%.

@@           Coverage Diff           @@
##           master    #1550   +/-   ##
=======================================
  Coverage   66.66%   66.66%           
=======================================
  Files         616      616           
  Lines       69195    69198    +3     
  Branches     9558     9559    +1     
=======================================
+ Hits        46130    46132    +2     
  Misses      21125    21125           
- Partials     1940     1941    +1     

@ndevenish ndevenish merged commit 342a054 into dials:master Jan 18, 2021
@ndevenish ndevenish deleted the background_display branch January 18, 2021 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants