Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ci: Introduce ubuntu-24.04 to restore GTK test coverage with recent PyGObject versions#29765

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

jayaddison
Copy link
Contributor

PR summary

  • Why is this change necessary?

GitHub Actions continuous integration unit test coverage is reduced on Linux due to an unsatisfied system dependency requested by recent versions of the PythonPyGObject library.

In particular,PyGObject version 3.52.0 introduces a requirement forgirepository-2.0:https://gitlab.gnome.org/GNOME/pygobject/-/blob/e3dee9719e7249acfa7e78a3bbae251301a134a4/NEWS#L9-10

The relevant system package to fulfil the requirement is not available on Ubuntu 22.04, and seems unlikely to become available on that platform. This causes some Linux GTK UI tests in the CI here to be skipped.

  • What problem does it solve?

Test coverage can be improved by including an Ubuntu 24.04 test job using a host that provides thegirepository-2.0 dependency.

  • What is the reasoning for this implementation?

This is intended to be a minimal approach, adding a single job to the existingtests.yml workflow definitions.

A compatible possibility would be to place an upper-bound on the version ofPyGObject installed during jobs on previous versions of Ubuntu.

PR checklist

Resolves#29749

@jayaddison
Copy link
ContributorAuthor

Thegeninfo error thatappears in theubuntu-24.04 build logs from commit2dd9560:

geninfo: ERROR: "/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/site-packages/pybind11/include/pybind11/pytypes.h":1562: mismatched exception tag for id 1, 1: '1' -> '0'

..seems to relate to this line of code:https://github.com/pybind/pybind11/blob/a2e59f0e7065404b44dfe92a28aca47ba1378dc4/include/pybind11/pytypes.h#L1562

From what I gather from starting to read a separate-but-similar discussion thread inlinux-test-project/lcov#209, this means that there's a mismatch betweenlcov's expectation about exceptions in the code during coverage testing.

@tacaswell
Copy link
Member

It looks like the verion of gcov has gone from 11 -> 13 as well.

Perlinux-test-project/lcov#209 (comment) I suspect that we are seeing the lines from the pybind11 headers showing up sometimes in exceptions and sometimes not hence confusing the tools. I suspect we should go the route of flagging these as ignorable?

@tacaswelltacaswell added this to thev3.11.0 milestoneMar 18, 2025
@jayaddison
Copy link
ContributorAuthor

It looks like the verion of gcov has gone from 11 -> 13 as well.

Perlinux-test-project/lcov#209 (comment) I suspect that we are seeing the lines from the pybind11 headers showing up sometimes in exceptions and sometimes not hence confusing the tools. I suspect we should go the route of flagging these as ignorable?

Thanks - possibly, yep. I've been trying to figure out what the cause of that is. As best I can tell, it's a string conversion (CVT) macro inpybind11 that is emitting the error -- and it's within apy::str class declared by that library. I have aguess that it may be atypecast topy::str where the mismatch occurs -- but I haven't experimented with that yet.

I did buildpybind11 locally with coverage enabled, ran thepytest suite for it, and those didnot result in anlcov mismatch error -- so there may be a coverage gap that we can report upstream to them if we can identify it.

@jayaddison
Copy link
ContributorAuthor

It looks like the verion of gcov has gone from 11 -> 13 as well.

Perlinux-test-project/lcov#209 (comment) I suspect that we are seeing the lines from the pybind11 headers showing up sometimes in exceptions and sometimes not hence confusing the tools. I suspect we should go the route of flagging these as ignorable?

I've opened a discussion thread (a request for assistance, really) about this at:pybind/pybind11#5573

tacaswell reacted with thumbs up emoji

@jayaddison

This comment was marked as resolved.

jayaddison added a commit to jayaddison/matplotlib that referenced this pull requestMar 23, 2025
@jayaddisonjayaddisonforce-pushed theissue-29749/add-ubuntu2404-runner branch from3b81246 to6d15950CompareMarch 23, 2025 15:59
Comment on lines 190 to 175
elif [[ "${{ matrix.os }}" = ubuntu-22.04 || "${{ matrix.os }}" = ubuntu-22.04-arm ]]; then
sudo apt-get install -yy --no-install-recommends \
gir1.2-gtk-4.0 \
libgirepository1.0-dev
else # ubuntu-24.04
sudo apt-get install -yy --no-install-recommends \
libgirepository-2.0-dev
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Note: I think we should also add GTK4 to the system packages on Ubuntu 24.04 here.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Hmm.. attempting to do that exposes a missing dependency of GLESv2 for GTK4 on Ubuntu 24.04 -maybe want to do that, but I'll defer that initially.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Ref:https://github.com/matplotlib/matplotlib/actions/runs/14021446821/job/39253940887#step:14:323

Surrounding context:

_ test_interactive_backend[toolbar2-MPLBACKEND=gtk4agg-BACKEND_DEPS=cairo,gi] __...E           Failed: Subprocess failed to test intended behaviorE           libEGL warning: DRI3: Screen seems not DRI3 capableE           libEGL warning: DRI3: Screen seems not DRI3 capableE           MESA: error: ZINK: vkCreateInstance failed (VK_ERROR_INCOMPATIBLE_DRIVER)E           libEGL warning: egl: failed to create dri2 screenE           E           (process:16046): Gtk-WARNING **: 17:51:27.373: Unable to acquire the address of the accessibility bus: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files. If you are attempting to run GTK without a11y support, GTK_A11Y should be set to 'none'.E           Couldn't open libGLESv2.so.2: libGLESv2.so.2: cannot open shared object file: No such file or directoryE           Fatal Python error: Aborted

@jayaddison

This comment was marked as resolved.

@jayaddison

This comment was marked as resolved.

@jayaddison
Copy link
ContributorAuthor

I think I will go ahead and ignore those warnings/errors, at least in the short term. The main reason for this is that I would like to merge this -- adding additional test coverage -- before removing Ubuntu 20.04 from the test mix to resolve#29766.

Note: my updated understanding from therelevantlcov manual section is that mentioning an error-name (e.g.mismatch) a single time (as opposed to repeated twice or more) in the--ignore-errors list means that corresponding errors are downgraded towarning-level -- so they should still be visible, without failing the build.

@jayaddison
Copy link
ContributorAuthor

I've a local rebase/squash of these changes prepared, and can push that soon, if preferred. There were a few details in some of the interim commits - particularly the GLESv2 requirement if we want to enable GTK4 - that could be relevant for easier inspection, though.

@jayaddison

This comment was marked as off-topic.

@jayaddison

This comment was marked as off-topic.

@jayaddison
Copy link
ContributorAuthor

I've a local rebase/squash of these changes prepared, and can push that soon, if preferred. There were a few details in some of the interim commits - particularly the GLESv2 requirement if we want to enable GTK4 - that could be relevant for easier inspection, though.

(clarification: by this I mean that the interim commits are slightly easier to inspect during code review if not replaced by force-pushes; in this case I would prefer to squash the commits before merge)

@jayaddisonjayaddisonforce-pushed theissue-29749/add-ubuntu2404-runner branch from1bc5c19 toad69c7eCompareApril 1, 2025 01:18
@tacaswell
Copy link
Member

I do not understand the circleci error. It looks like it is trying to run on the branch from@jayaddison 's account rather than on the PR from the mpl org. We should not hold merging on that.

@jayaddison
Copy link
ContributorAuthor

Thanks@tacaswell - that has confused me slightly too; I don't have a CircleCI account.

@tacaswelltacaswell merged commit7d5d027 intomatplotlib:mainApr 1, 2025
37 of 38 checks passed
@jayaddisonjayaddison deleted the issue-29749/add-ubuntu2404-runner branchApril 1, 2025 08:55
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@timhoffmtimhoffmtimhoffm approved these changes

@tacaswelltacaswelltacaswell approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
v3.11.0
Development

Successfully merging this pull request may close these issues.

[Bug]: Unit tests: Ubuntu 22.04 lacks dependencies required for recent PyGObject versions
3 participants
@jayaddison@tacaswell@timhoffm

[8]ページ先頭

©2009-2025 Movatter.jp