8000 patch: workaround pytest-asyncio issue by paulomach · Pull Request #186 · canonical/data-platform-workflows · GitHub
[go: up one dir, main page]

Skip to content

patch: workaround pytest-asyncio issue #186

New issue < 10000 details-dialog class="Box Box--overlay d-flex flex-column anim-fade-in fast overflow-auto" aria-label="Sign up for GitHub">

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

Closed
wants to merge 1 commit into from

Conversation

paulomach
Copy link
@paulomach paulomach commented Jun 10, 2024

Issue

pytest-asyncio 0.27.3 is duplication function markers, breaking tests group collection, that are asserting for one group marker per test.
This could be also be fixed by pinning pytest-asyncio to ^0.21.1 on charms, but IMO it's better suited do it here, since avoid pinning on multiple repositories.

@paulomach paulomach changed the title workaround pytest-asyncio issue patch: workaround pytest-asyncio issue Jun 10, 2024
@paulomach
Copy link
Author

tested on canonical/mysql-k8s-operator#429

Copy link
@taurus-forever taurus-forever left a comment

Choose a reason for hiding this comment

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

Uff... nice trace!

Copy link
Contributor
@carlcsaposs-canonical carlcsaposs-canonical left a comment

Choose a reason for hiding this comment

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

This assertion is important to properly parallelize runners

IMO, this should be fixed by pinning pytest-asyncio, or by fixing a misconfigured pytest-asyncio

I don't think data-platform-workflows should carry a workaround for markers getting duplicated

Duplicated markers may also affect test parameterization and Allure

@paulomach
Copy link
Author

This assertion is important to properly parallelize runners

IMO, this should be fixed by pinning pytest-asyncio, or by fixing a misconfigured pytest-asyncio

I don't think data-platform-workflows should carry a workaround for markers getting duplicated

Duplicated markers may also affect test parameterization and Allure

It's an economy argument - this will eventually show up on many other repos while the bug is not fixed on upstream, doing centrally would make it easier to mange.
There's seems to be another issue with newer pytest-asyncio though (see test branch) that would justify pinning there instead, as tests are reaching max time on initial steps. This looks like a stronger argument against this one IMO

@carlcsaposs-canonical
Copy link
Contributor

I don't think the issue is pytest-asyncio, I think the issue is with our configuration and/or pytest-operator

@paulomach
Copy link
Author

Closed in favor of canonical/mysql-k8s-operator#430

@paulomach paulomach closed this Jun 12, 2024
@carlcsaposs-canonical carlcsaposs-canonical deleted the workaround-group-collection-duplication branch June 12, 2024 13:50
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.

4 participants
0