Skip to content

BUG: Coverage that works for v2.4.0 breaks after v2.5.0 #383

Closed

Activity

  1. Cadair commented on Mar 24, 2026

    @Cadair
    Member

    Ok the root of this problem is this change: a15a6d2#diff-9b9d037b5a83c64c3ffdf4df04bbf0839f52bceefafd0827168e82e91497cab1L155-R158

    which has lead to astropy & sunpy and others having two instances of the --cov flag on the pytest command run by tox, which seems to break it.

    I'd argue from our perspective as the workflows if we are appending any coverage commands to the pytest command it makes sense to include the --cov as otherwise it wouldn't work, but then that would require all the downstreams to adapt.

    The alternative is that we drop appending any coverage commands to the pytest command and document exactly where users have to put their xml coverage report for codecov to pick it up?

  2. neutrinoceros commented on Mar 24, 2026

    @neutrinoceros
    Contributor

    if we are appending any coverage commands to the pytest command it makes sense to include the --cov as otherwise it wouldn't work, but then that would require all the downstreams to adapt.

    could we add --cov only if it's not already present, to preserve backwards compat ? or does this argument injection happen before user arguments are included, preventing us from sanitzing the end result ?

  3. Cadair commented on Mar 24, 2026

    @Cadair
    Member

    Yes, we generate these arguments as part of the matrix generation and the other ones are injects as posargs to tox, so it'd require some bash shennanigans to deduplicate.

    As a temporary fix I've removed the --cov in #384 while we figure out a better solution.

  4. pllim commented on Mar 24, 2026

    @pllim
    ContributorAuthor

    I would rather you make downstream adapt because as it stands, affected packages are silently breaking and no one even noticed it until Ned after a while.

  5. Cadair commented on Mar 24, 2026

    @Cadair
    Member

    I wonder if we should make the codecov upload task fail if there's no files generated so people know it errors?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions