-
Notifications
You must be signed in to change notification settings - Fork 439
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
Add CI workflow to test VTK master branch #3704
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3704 +/- ##
=======================================
Coverage 95.77% 95.77%
=======================================
Files 97 97
Lines 20755 20755
=======================================
Hits 19879 19879
Misses 876 876 |
vtkExplicitStructuredGrid DeepCopy is broken on master. Tracking here: https://gitlab.kitware.com/vtk/vtk/-/issues/18758 |
Threshold API changes
There is a MR to re-add this method: https://gitlab.kitware.com/vtk/vtk/-/merge_requests/9709 There is also a discussion about these changes here: https://discourse.vtk.org/t/unnecessary-vtk-api-change/9929 Other errorsTwo errors we may need to look into on our side:
|
@akaszynski, do you recall why you added this check in #732: pyvista/pyvista/plotting/plotting.py Lines 1774 to 1777 in 4bc2064
This is no longer failing for VTK master branch and thus the |
It's been a while, but I do recall genuine segfaults and having to work around them. I agree with your workaround. |
Okay! CI is finally running with the Unfortunately we have tests failures with the main branch of VTK |
@pyvista/developers, this is ready for review. IMO, we should merge this without addressing the testing failures, as this PR is to set up a CI routine that will make it easier to debug PyVista+VTK master issues. After merging, we should follow up with individual PRs that address the testing failures here so that we can have targeted development for specific issues. |
.github/workflows/vtk-pre-test.yml
Outdated
- name: Set up VTK with OSMesa | ||
run: | | ||
pip uninstall vtk -y | ||
pip install vtk_osmesa --pre --no-cache --extra-index-url https://gitlab.kitware.com/api/v4/projects/13/packages/pypi/simple |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@akaszynski, @MatthewFlamm, @AlejandroFernandezLuces: this is the issue I am referring to in pyvista/pytest-pyvista#41
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From CI:
$ pip uninstall vtk -y
Found existing installation: vtk 9.2.5
Uninstalling vtk-9.2.5:
Successfully uninstalled vtk-9.2.5
Looking in indexes: https://pypi.org/simple, https://gitlab.kitware.com/api/v4/projects/13/packages/pypi/simple
Collecting vtk_osmesa
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a separate issue from the issue you linked, but the impact is sometimes encountered in installing that package. We have a dependency for vtk
in pyvista, but apparently vtk_osmesa
can be used without problem. But, this means that pyvista
still looks for vtk
. The problem is in the dependencies for pyvista
itself, not in pytest-pyvista
IMO. I dont know if there is a solution for an 'either/or' dependency resolution in pip specification.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed the issue is pyvista
having vtk
in its hard requirements. This is something I think we will have a lot more friction changing. And so a simpler fix is to just remove pyvista
from pytest-pyvista
's hard requirements to work around this.
@pyvista/developers, I recommend merging this PR as is to help track testing failures against VTK |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow here is manually triggered, so will not cause failures on PRs.
Works for me as long as someone sets up to be notified on failures and actually fixes them. In MNE we have had a run for a while now where we install all sorts of stuff either from main
/master
including PyVista(Qt) and other stuff from daily/weekly CDNs (NumPy, SciPy, pandas, as of a couple of days ago VTK, etc.), but we do run it on all PRs rather than on a schedule. It means that once a month or so some CI breaks in someone's PR for an unrelated reason, but these are easy to ignore during review ("merge anyway ignoring requirements", or just don't add to "Required" list!) but also annoying enough that we fix them. It also catches stuff like using a deprecated APIs which would be missed until after merge by a scheduled run. You might consider trying this approach and seeing how onerous it is, and resorting to a scheduled one only if necessary.
But a scheduled run is better than no run at all so +1 from me either way! Hopefully a follow-up PR soon will make this green 🙂
- name: Set up VTK with OSMesa | ||
run: | | ||
pip uninstall vtk -y | ||
pip install vtk_osmesa --pre --no-cache --extra-index-url https://wheels.vtk.org |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to have one run that uses VTK-osmesa and another that uses Xvfb-and-standard-VTK. The failure modes could be different and the latter is a (much more?) widely used test case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I will put that off for another PR -- due to current time constraints and because I want to use the new OSMesa wheel throughout our testing suite.
I'm of the opinion that it's better to be notified of failures early on and have this workflow (at least for one version of python) be always on. However, I'm reminded of alert fatigue If this fails every so often, it's acceptable. If it's all the time and we can't correct it, we should have the option of disabling it. Since it's failing right now, let's keep this manual for now and consider enabling it by default later. |
Thanks for the excellent example. I'd prefer not to have flaky CI jobs on PRs -- it signals that some things are okay to fail and then we as a community are quick to ignore that failure and soon other failures because we're used to merging with a red X. "alert fatigue" as @akaszynski pointed out. I've seen this be a big problem on some projects that now I'm very averse to it.
Indeed - this is failing right now, and I think we need to raise an issue or two upstream in VTK before these things can be addressed. I suspect many failures moving forward are going to be things are broken upstream and thus we don't have a lot of control here in PyVista -- a further reason I'd prefer this to be a manual job we intentionally run to report issues upstream at once. One such (serious) issue was discovered in this PR (see https://gitlab.kitware.com/vtk/vtk/-/issues/18758). I need to dig into the logs here and report any current failures |
This uses VTK's GitLab package index to download and install a wheel for the latest VTK (master branch). To install, run:
Specifically, this branch uses the OSMesa wheel to prevent the need to xvfb
This runs as a cron job on
main
, has aworkflow_dispatch
trigger to run on request, and has a branch naming pattern for'maint/vtk-master*'
to be able to open branches/PRs that will verify things are working against VTK master.