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

Use pytest v6.2.5 #19848

Merged
merged 2 commits into from
Nov 29, 2022
Merged

Use pytest v6.2.5 #19848

merged 2 commits into from
Nov 29, 2022

Conversation

evantahler
Copy link
Contributor

@evantahler evantahler commented Nov 28, 2022

On MacOS, you often encounter errors like: TypeError: required field "lineno" missing from alias when running SAT. Using a version of pytest >= 6.2.5 fixes this.

Full Stack Trace:

> Task :airbyte-integrations:bases:source-acceptance-test:_unitTestCoverage FAILED
[python] .venv/bin/python -m coverage run --data-file=unit_tests/.coverage.unitTest --rcfile=/Users/evan/workspace/airbyte/airbyte/pyproject.toml -m pytest -s unit_tests -c pytest.ini
         Traceback (most recent call last):
           File "/Users/evan/workspace/airbyte/airbyte/airbyte-integrations/bases/source-acceptance-test/.venv/lib/python3.10/site-packages/pytest/__main__.py", line 5, in <module>
             raise SystemExit(pytest.console_main())
           File "/Users/evan/workspace/airbyte/airbyte/airbyte-integrations/bases/source-acceptance-test/.venv/lib/python3.10/site-packages/_pytest/config/__init__.py", line 187, in console_main
             code = main()
           File "/Users/evan/workspace/airbyte/airbyte/airbyte-integrations/bases/source-acceptance-test/.venv/lib/python3.10/site-packages/_pytest/config/__init__.py", line 143, in main
             config = _prepareconfig(args, plugins)
           File "/Users/evan/workspace/airbyte/airbyte/airbyte-integrations/bases/source-acceptance-test/.venv/lib/python3.10/site-packages/_pytest/config/__init__.py", line 318, in _prepareconfig
             config = pluginmanager.hook.pytest_cmdline_parse(
           File "/Users/evan/workspace/airbyte/airbyte/airbyte-integrations/bases/source-acceptance-test/.venv/lib/python3.10/site-packages/pluggy/hooks.py", line 286, in __call__
             return self._hookexec(self, self.get_hookimpls(), kwargs)
           File "/Users/evan/workspace/airbyte/airbyte/airbyte-integrations/bases/source-acceptance-test/.venv/lib/python3.10/site-packages/pluggy/manager.py", line 93, in _hookexec
             return self._inner_hookexec(hook, methods, kwargs)
           File "/Users/evan/workspace/airbyte/airbyte/airbyte-integrations/bases/source-acceptance-test/.venv/lib/python3.10/site-packages/pluggy/manager.py", line 84, in <lambda>
             self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
           File "/Users/evan/workspace/airbyte/airbyte/airbyte-integrations/bases/source-acceptance-test/.venv/lib/python3.10/site-packages/pluggy/callers.py", line 203, in _multicall
             gen.send(outcome)
           File "/Users/evan/workspace/airbyte/airbyte/airbyte-integrations/bases/source-acceptance-test/.venv/lib/python3.10/site-packages/_pytest/helpconfig.py", line 100, in pytest_cmdline_parse
             config = outcome.get_result()  # type: Config
           File "/Users/evan/workspace/airbyte/airbyte/airbyte-integrations/bases/source-acceptance-test/.venv/lib/python3.10/site-packages/pluggy/callers.py", line 80, in get_result
             raise ex[1].with_traceback(ex[2])
           File "/Users/evan/workspace/airbyte/airbyte/airbyte-integrations/bases/source-acceptance-test/.venv/lib/python3.10/site-packages/pluggy/callers.py", line 187, in _multicall
             res = hook_impl.function(*args)
           File "/Users/evan/workspace/airbyte/airbyte/airbyte-integrations/bases/source-acceptance-test/.venv/lib/python3.10/site-packages/_pytest/config/__init__.py", line 1003, in pytest_cmdline_parse
             self.parse(args)
           File "/Users/evan/workspace/airbyte/airbyte/airbyte-integrations/bases/source-acceptance-test/.venv/lib/python3.10/site-packages/_pytest/config/__init__.py", line 1280, in parse
             self._preparse(args, addopts=addopts)
           File "/Users/evan/workspace/airbyte/airbyte/airbyte-integrations/bases/source-acceptance-test/.venv/lib/python3.10/site-packages/_pytest/config/__init__.py", line 1172, in _preparse
             self.pluginmanager.load_setuptools_entrypoints("pytest11")
           File "/Users/evan/workspace/airbyte/airbyte/airbyte-integrations/bases/source-acceptance-test/.venv/lib/python3.10/site-packages/pluggy/manager.py", line 299, in load_setuptools_entrypoints
             plugin = ep.load()
           File "/opt/homebrew/Cellar/python@3.10/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
             module = import_module(match.group('module'))
           File "/opt/homebrew/Cellar/python@3.10/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/__init__.py", line 126, in import_module
             return _bootstrap._gcd_import(name[level:], package, level)
           File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
           File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
           File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
           File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
           File "/Users/evan/workspace/airbyte/airbyte/airbyte-integrations/bases/source-acceptance-test/.venv/lib/python3.10/site-packages/_pytest/assertion/rewrite.py", line 162, in exec_module
             source_stat, co = _rewrite_test(fn, self.config)
           File "/Users/evan/workspace/airbyte/airbyte/airbyte-integrations/bases/source-acceptance-test/.venv/lib/python3.10/site-packages/_pytest/assertion/rewrite.py", line 359, in _rewrite_test
             co = compile(tree, fn_, "exec", dont_inherit=True)
         TypeError: required field "lineno" missing from alias
         /Users/evan/workspace/airbyte/airbyte/airbyte-integrations/bases/source-acceptance-test/.venv/lib/python3.10/site-packages/coverage/control.py:788: CoverageWarning: No data was collected. (no-data-collected)
           self._warn("No data was collected.", slug="no-data-collected")

This has been a problem for a while (see slack link)

@evantahler evantahler temporarily deployed to more-secrets November 28, 2022 21:28 Inactive
@evantahler evantahler temporarily deployed to more-secrets November 28, 2022 21:29 Inactive
@evantahler evantahler requested review from a team and erohmensing November 28, 2022 21:29
@evantahler evantahler marked this pull request as ready for review November 28, 2022 21:29
@evantahler evantahler requested a review from a team as a code owner November 28, 2022 21:29
@github-actions
Copy link
Contributor

github-actions bot commented Nov 28, 2022

Affected Connector Report

NOTE ⚠️ Changes in this PR affect the following connectors. Make sure to do the following as needed:

  • Run integration tests
  • Bump connector or module version
  • Add changelog
  • Publish the new version

❌ Sources (64)

Connector Version Changelog Publish
source-airtable 0.1.3
source-amazon-ads 0.1.25
source-amazon-seller-partner 0.2.28
source-amazon-sqs 0.1.0
source-amplitude 0.1.17
source-appsflyer 0.1.0
(doc not found)

(not in seed)
source-asana 0.1.5
source-azure-table 0.1.3
source-braintree 0.1.3
source-cart 0.2.0
(changelog missing)
source-chargebee 0.1.16
(diff seed version)
source-commercetools 0.1.0
source-confluence 0.1.1
source-datadog 0.1.0
source-delighted 0.1.4
source-drift 0.2.5
source-facebook-marketing 0.2.74
source-facebook-pages 0.1.6
source-freshcaller 0.1.0
source-freshsales 0.1.2
source-freshservice 0.1.1
source-github 0.3.8
source-gitlab 0.1.6
source-google-ads 0.2.5
source-google-search-console 0.1.18
source-greenhouse 0.3.0
source-harvest 0.1.11
source-instagram 1.0.0
source-iterable 0.1.21
source-klaviyo 0.1.10
source-lemlist 0.1.1
(changelog missing)

(diff seed version)
source-lever-hiring 0.1.3
source-linnworks 0.1.5
(changelog missing)
source-mailchimp 0.2.15
source-mailgun 0.1.0
(doc not found)
source-monday 0.1.4
source-notion 0.1.10
source-okta 0.1.13
source-onesignal 0.1.2
source-openweather 0.1.6
source-outreach 0.1.2
source-pardot 0.1.0
(doc not found)

(not in seed)
source-paystack 0.1.1
source-pinterest 0.1.9
source-pipedrive 0.1.13
source-plaid 0.3.2
(changelog missing)
source-posthog 0.1.7
source-prestashop 0.3.0
(doc not found)
source-quickbooks-singer 0.1.5
(doc not found)
source-recharge 0.2.4
(changelog missing)
source-retently 0.1.2
source-salesforce 1.0.26
source-salesloft 0.1.3
source-sendgrid 0.2.16
source-sentry 0.1.7
source-strava 0.1.2
source-surveymonkey 0.1.12
source-tplcentral 0.1.1
(not in seed)
source-twilio 0.1.13
source-weatherstack 0.1.0
source-youtube-analytics 0.1.3
source-zendesk-sunshine 0.1.1
source-zendesk-talk 0.1.5
source-zenloop 0.1.3
  • See "Actionable Items" below for how to resolve warnings and errors.

✅ Destinations (0)

Connector Version Changelog Publish
  • See "Actionable Items" below for how to resolve warnings and errors.

✅ Other Modules (0)

Actionable Items

(click to expand)

Category Status Actionable Item
Version
mismatch
The version of the connector is different from its normal variant. Please bump the version of the connector.

doc not found
The connector does not seem to have a documentation file. This can be normal (e.g. basic connector like source-jdbc is not published or documented). Please double-check to make sure that it is not a bug.
Changelog
doc not found
The connector does not seem to have a documentation file. This can be normal (e.g. basic connector like source-jdbc is not published or documented). Please double-check to make sure that it is not a bug.

changelog missing
There is no chnagelog for the current version of the connector. If you are the author of the current version, please add a changelog.
Publish
not in seed
The connector is not in the seed file (e.g. source_definitions.yaml), so its publication status cannot be checked. This can be normal (e.g. some connectors are cloud-specific, and only listed in the cloud seed file). Please double-check to make sure that it is not a bug.

diff seed version
The connector exists in the seed file, but the latest version is not listed there. This usually means that the latest version is not published. Please use the /publish command to publish the latest version.

Copy link
Contributor

@erohmensing erohmensing left a comment

Choose a reason for hiding this comment

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

Thank you for finding all of the locations of this dependency! Would have missed a ton if we'd merged it on my PR.

Copy link
Contributor

@sherifnada sherifnada left a comment

Choose a reason for hiding this comment

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

@evantahler do you have context on why upgrading the version fixes this issue?

@evantahler
Copy link
Contributor Author

Here's a link from the Pytest folks about why this is the version to choose - pytest-dev/pytest#9195 (comment)

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

Successfully merging this pull request may close these issues.

4 participants