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

TypeError: diff_cover_report_quality() got an unexpected keyword argument 'reports' #306

Closed
rdvelazquez opened this issue Dec 12, 2022 · 8 comments

Comments

@rdvelazquez
Copy link

Just started getting errors on CircleCI within the past few days. We're using diff-quality to run a linter on only the sql files that changed in the pull request with diff-quality --violations sqlfluff --fail-under=100 --compare-branch origin/master and getting the following error:

Traceback (most recent call last):
  File "/home/circleci/.pyenv/versions/3.8.15/bin/diff-quality", line 8, in <module>
    sys.exit(main())
  File "/home/circleci/.pyenv/versions/3.8.15/lib/python3.8/site-packages/diff_cover/diff_quality_tool.py", line 347, in main
    reporter = reporter_factory_fn(reports=input_reports, options=user_options)
TypeError: diff_cover_report_quality() got an unexpected keyword argument 'reports'

Looks to be related to this recently merged PR that changed the offending line. Let me know what other info might be helpful to troubleshoot.

@Lomo89
Copy link

Lomo89 commented Dec 12, 2022

All my pipelines are failing with the same issue.

@Bachmann1234
Copy link
Owner

I would suggest rolling diff_cover 7.2.0 until we can get this resolved.

@barrywhart are you available to look into this?

@barrywhart
Copy link
Contributor

Yes, sorry -- this is my fault.

SQLFluff has a fix underway here: sqlfluff/sqlfluff#4148

For now, pinning to the earlier version of diff-cover is the recommended fix.

@barrywhart
Copy link
Contributor

Hoping to get that PR merged today or tomorrow. Not sure when the next release will be. Maybe before December 25.

@barrywhart
Copy link
Contributor

Fix in SQLFluff 1.4.3, released just now.

@barrywhart
Copy link
Contributor

@Bachmann1234: This issue can be closed now. Sorry for the kerfuffle!

@rdvelazquez
Copy link
Author

rdvelazquez commented Dec 14, 2022

Thank you for the quick fix!

@barrywhart
Copy link
Contributor

I was working on both ends of this (diff-quality and SQLFluff), so I had a headstart on the bug. 😛

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

No branches or pull requests

4 participants