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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cockpit-ci: Update container to 2024-04-25 #20372

Conversation

github-actions[bot]
Copy link
Contributor

No description provided.

@github-actions github-actions bot added the bot label Apr 25, 2024
@github-actions github-actions bot changed the title [no-test] cockpit-ci: Update container to 2024-04-25 cockpit-ci: Update container to 2024-04-25 Apr 25, 2024
martinpitt pushed a commit that referenced this pull request Apr 25, 2024
@martinpitt martinpitt force-pushed the tasks-container-update-cockpit-ci-container-20240425-125429 branch from d8c5262 to 8229d67 Compare April 25, 2024 12:54
@jelly
Copy link
Member

jelly commented Apr 25, 2024

@allisonkarlitskaya do you want to take a look?

not ok 6 /static-code/test-mypy
make[1]: *** [Makefile:8150: check-am] Error 2
make: *** [Makefile:8154: check] Error 2
# test/common/testlib.py:49: error: Incompatible types in assignment (expression has type "None", variable has type Module)  [assignment]
# test/common/testlib.py:1206: error: Module "PIL.Image" is not valid as a type  [valid-type]
# test/common/testlib.py:1206: note: Perhaps you meant to use a protocol matching the module structure?
# test/common/testlib.py:1209: error: Image? has no attribute "load"  [attr-defined]
# test/common/testlib.py:1210: error: Image? has no attribute "load"  [attr-defined]
# test/common/testlib.py:1211: error: Image? has no attribute "load"  [attr-defined]
# test/common/testlib.py:1214: error: Image? has no attribute "size"  [attr-defined]
# test/common/testlib.py:1217: error: Image? has no attribute "size"  [attr-defined]
# test/common/testlib.py:1236: error: Call to untyped function "putalpha" in typed context  [no-untyped-call]
# src/cockpit/transports.py:405: error: Argument 2 to "add_child_handler" of "AbstractChildWatcher" has incompatible type "Callable[[int, int], None]"; expected "Callable[[], object]"  [arg-type]

@allisonkarlitskaya allisonkarlitskaya self-assigned this Apr 29, 2024
@allisonkarlitskaya
Copy link
Member

The Pillow stuff is partially caused by python-pillow/Pillow#8029 but the AbstractChildWatcher is the same stuff we've been seeing for a while, getting louder and louder with every Python release. I'm gonna look into fixing this "properly" (for some value of properly that allows a fallback on Python 3.6 and kernels without pidfd, read: RHEL8).

Pillow upstream added a `py.typed` file in their last release, which is
causing us problems because:

  - we `from PIL import Image`, which kinda looks like the class `Image`
    in the `PIL` module, but is actually a submodule.  In particular,
    `PIL.Image.open()` is not a static method, but a function call, and
    it doesn't return `PIL.Image`, but rather `PIL.Image.Image`.  Fix a
    couple of annotations.

  - our hacks for setting `Image = None` if the import is missing are no
    longer working (since the import now has a better type than `Any`).
    Let's make the import unconditional.  `dnf install python3-pillow`.

  - several methods are unannotated in the upstream code, leading to
    warnings about "untyped call from typed code".  We use an #ignore
    for those; cf. python-pillow/Pillow#8029
allisonkarlitskaya pushed a commit that referenced this pull request Apr 30, 2024
This brings in a buggy definition in the version of the typeshed
included in the new container image.  Add an #ignore.

See python/typeshed#11548

Closes #20372
@allisonkarlitskaya allisonkarlitskaya force-pushed the tasks-container-update-cockpit-ci-container-20240425-125429 branch from 8229d67 to 7d72a1f Compare April 30, 2024 05:32
allisonkarlitskaya added a commit that referenced this pull request Apr 30, 2024
This brings in a buggy definition in the version of the typeshed
included in the new container image.  Add an #ignore.

See python/typeshed#11548

Closes #20372
@allisonkarlitskaya allisonkarlitskaya force-pushed the tasks-container-update-cockpit-ci-container-20240425-125429 branch from 7d72a1f to ea18726 Compare April 30, 2024 05:33
@allisonkarlitskaya allisonkarlitskaya requested review from martinpitt and removed request for martinpitt April 30, 2024 05:34
@allisonkarlitskaya allisonkarlitskaya marked this pull request as draft April 30, 2024 05:37
@allisonkarlitskaya
Copy link
Member

This is turning into quite the adventure...

make[3]: Entering directory '/work/make-checkout-workdir/cockpit-316+git/_build/sub'
if test -d "cockpit-316+git"; then find "cockpit-316+git" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "cockpit-316+git" || { sleep 5 && rm -rf "cockpit-316+git"; }; else :; fi
test -d "cockpit-316+git" || mkdir "cockpit-316+git"
cp: setting permissions for 'cockpit-316+git/src/bridge/mock-resource': Operation not permitted
make[3]: *** [Makefile:7979: distdir-am] Error 1
make[3]: Leaving directory '/work/make-checkout-workdir/cockpit-316+git/_build/sub'

@jelly
Copy link
Member

jelly commented Apr 30, 2024

This is turning into quite the adventure...

make[3]: Entering directory '/work/make-checkout-workdir/cockpit-316+git/_build/sub'
if test -d "cockpit-316+git"; then find "cockpit-316+git" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "cockpit-316+git" || { sleep 5 && rm -rf "cockpit-316+git"; }; else :; fi
test -d "cockpit-316+git" || mkdir "cockpit-316+git"
cp: setting permissions for 'cockpit-316+git/src/bridge/mock-resource': Operation not permitted
make[3]: *** [Makefile:7979: distdir-am] Error 1
make[3]: Leaving directory '/work/make-checkout-workdir/cockpit-316+git/_build/sub'

Runs fine locally in the tasks container, so it's some Github issue?

make[1]: Leaving directory '/home/jelle/projects/cockpit/main/cockpit-316+git/_build/sub'
if test -d "cockpit-316+git"; then find "cockpit-316+git" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "cockpit-316+git" || { sleep 5 && rm -rf "cockpit-316+git"; }; else :; fi
=================================================
cockpit-316+git archives ready for distribution:
cockpit-316+git.tar.xz

@allisonkarlitskaya
Copy link
Member

Runs fine locally in the tasks container, so it's some Github issue?

I also couldn't get it locally, and I basically copy-pasted the workflow... it's also hard to imagine what the issue here might be...

@allisonkarlitskaya allisonkarlitskaya added the no-test For doc/workflow changes, or experiments which don't need a full CI run, label Apr 30, 2024
@allisonkarlitskaya allisonkarlitskaya force-pushed the tasks-container-update-cockpit-ci-container-20240425-125429 branch from 7711497 to 5faab49 Compare April 30, 2024 10:12
For some reason this starts causing trouble with `make distcheck` in
Fedora 40.
This brings in a buggy definition in the version of the typeshed
included in the new container image.  Add an #ignore.

See python/typeshed#11548

Closes #20372
@allisonkarlitskaya allisonkarlitskaya force-pushed the tasks-container-update-cockpit-ci-container-20240425-125429 branch from 5faab49 to 86788b8 Compare April 30, 2024 10:37
@allisonkarlitskaya allisonkarlitskaya marked this pull request as ready for review April 30, 2024 10:42
Copy link
Member

@allisonkarlitskaya allisonkarlitskaya left a comment

Choose a reason for hiding this comment

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

Fine by me, but someone else should review this by now...

@martinpitt martinpitt added the .github-changes Set by a reviewer just before landing to acknowledge that a PR changes github workflows label Apr 30, 2024
Copy link
Member

@martinpitt martinpitt left a comment

Choose a reason for hiding this comment

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

Cheers! Happy bots → happy pitti

@allisonkarlitskaya allisonkarlitskaya merged commit 5d06c7d into main Apr 30, 2024
24 of 33 checks passed
@allisonkarlitskaya allisonkarlitskaya deleted the tasks-container-update-cockpit-ci-container-20240425-125429 branch April 30, 2024 11:17
allisonkarlitskaya added a commit that referenced this pull request Jun 4, 2024
This also reverts the workaround introduced as part of 5d06c7d, now
fixed in the version of the typeshed that mypy is using.  See #20372.

Closes #20540
martinpitt pushed a commit that referenced this pull request Jun 4, 2024
This also reverts the workaround introduced as part of 5d06c7d, now
fixed in the version of the typeshed that mypy is using.  See #20372.

Closes #20540
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot .github-changes Set by a reviewer just before landing to acknowledge that a PR changes github workflows no-test For doc/workflow changes, or experiments which don't need a full CI run,
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants