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-12-08 #21410

Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Dec 9, 2024

No description provided.

@github-actions github-actions bot added the bot label Dec 9, 2024
@github-actions github-actions bot changed the title [no-test] cockpit-ci: Update container to 2024-12-08 cockpit-ci: Update container to 2024-12-08 Dec 9, 2024
allisonkarlitskaya pushed a commit that referenced this pull request Dec 9, 2024
@allisonkarlitskaya allisonkarlitskaya force-pushed the tasks-container-update-cockpit-ci-container-20241209-075211 branch from db1a8a3 to e6af5d4 Compare December 9, 2024 07:52
@martinpitt
Copy link
Member

martinpitt commented Dec 9, 2024

TODO:

@martinpitt martinpitt marked this pull request as draft December 9, 2024 08:20
@martinpitt martinpitt self-assigned this Dec 9, 2024
martinpitt pushed a commit that referenced this pull request Dec 9, 2024
Adjust pixel tests for subtle font rendering changes with updated
Chromium.

Closes #21410
@martinpitt martinpitt force-pushed the tasks-container-update-cockpit-ci-container-20241209-075211 branch from e6af5d4 to d75bce9 Compare December 9, 2024 09:12
martinpitt pushed a commit that referenced this pull request Dec 9, 2024
Adjust pixel tests for subtle font rendering changes with updated
Chromium.

Closes #21410
@martinpitt martinpitt force-pushed the tasks-container-update-cockpit-ci-container-20241209-075211 branch from d75bce9 to 38603f5 Compare December 9, 2024 11:23
@martinpitt
Copy link
Member

This testPageStatus flake is a nuisance.. I threw an hour of attempted workarounds at it, but no joy. It would be really good to move Chromium to real mouse events..

martinpitt pushed a commit that referenced this pull request Dec 9, 2024
Adjust pixel tests for subtle font rendering changes with updated
Chromium.

Closes #21410
@martinpitt martinpitt force-pushed the tasks-container-update-cockpit-ci-container-20241209-075211 branch from 38603f5 to afc2e19 Compare December 9, 2024 12:38
@martinpitt martinpitt marked this pull request as ready for review December 9, 2024 13:04
This should be obvious, but current mypy complains:

> Need type annotation for "js_error_codes"  [var-annotated]
Fixes ruff I001 with ruff 0.6.7.
> Using `yield` and `return {value}` in a generator function can lead to
confusing behavior

But that's the expected GeneratorChannel API (it looks at
`StopIteration.value`), and also tricky to avoid.
A005 Module `http` is shadowing a Python builtin module
Precisely type the various `tag_from_*()` helpers and the `_tag` member
variable.

Fix return type of `set_contents()` -- `tag_from_path()` can return
None, so this function can, too.

Fixes error with mypy 1.13.0:

> Incompatible types in assignment (expression has type "Any | str", variable has type "None")  [assignment]
The error name changed:

> No overload variant of "open" matches argument types "GzipFile", "str", "bool"  [call-overload]

So accept both the old and new spelling for the time being.
Fixes lots of complaints with ruff 0.8 like

> RUF039 First argument to `re.match()` is not raw string
Fixes lots of issues with ruff 0.8:

> RUF052 [*] Local dummy variable `_msg` is accessed

This is right -- all these `_msg` are actually being used.

Use `type_` and `class_`, follow ruff's recommendation:

> help: Prefer using trailing underscores to avoid shadowing a built-in
Our synthetic mouse events on latest Chromium 131 are sometimes missed.
It works reliably with TEST_SHOW_BROWSER and with the real mouse events
in Firefox. Given the resounding silence of our other chromium bug
reports, let's just skip that test there.
TestHostSwitching.testBasic does pixel tests of the host selector menu,
which is the top left element at position (0, 0). Current Chromium
changes behaviour to always focus that element, and it's fairly
stubborn.

To avoid pixel testing the focused (light-gray) variant, move the mouse
away first.
martinpitt pushed a commit that referenced this pull request Dec 9, 2024
Adjust pixel tests for subtle font rendering changes with updated
Chromium.

Closes #21410
@martinpitt martinpitt force-pushed the tasks-container-update-cockpit-ci-container-20241209-075211 branch from afc2e19 to 0c4755e Compare December 9, 2024 15:33
@martinpitt martinpitt requested a review from jelly December 9, 2024 15:34
@martinpitt
Copy link
Member

Dang, this 1-pixel diff is also real, new browser.. Updating.

jelly
jelly previously approved these changes Dec 9, 2024
Copy link
Member

@jelly jelly left a comment

Choose a reason for hiding this comment

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

That was a ruff update ;-)

@@ -183,6 +183,14 @@ class TestHostSwitching(testlib.MachineCase, HostSwitcherHelpers):
b.wait_not_present("#nav-system.interact")
b.set_layout("desktop")

# this looks different (focused) when the mouse is inside (default 0,0 possition), so move it away
# chromium is stubborn here, we *have* to move the real mouse, not just do this with synthetic MouseEvents
b.bidi("input.performActions", context=b.driver.context, actions=[{
Copy link
Member

Choose a reason for hiding this comment

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

Only affects chrome, then we could gate it? But lets get CI green again

Copy link
Member

Choose a reason for hiding this comment

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

I could make it conditional on .browser == chromium, but we don't run pixel tests on Firefox anyway, so it's no practical difference.

Adjust pixel tests for subtle font rendering changes with updated
Chromium.

Closes #21410
@martinpitt martinpitt force-pushed the tasks-container-update-cockpit-ci-container-20241209-075211 branch from 0c4755e to 16e7ee0 Compare December 9, 2024 18:30
@martinpitt
Copy link
Member

@jelly sorry, one more push for this..

@martinpitt martinpitt requested a review from jelly December 9, 2024 21:35
@martinpitt martinpitt merged commit aea1989 into main Dec 10, 2024
87 checks passed
@martinpitt martinpitt deleted the tasks-container-update-cockpit-ci-container-20241209-075211 branch December 10, 2024 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants