Skip to content

tests/system/test_alembic.py::test_alembic_scenario is failing for system-3.8 #382

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

Closed
aucampia opened this issue Dec 21, 2021 · 3 comments
Closed
Assignees
Labels
api: bigquery Issues related to the googleapis/python-bigquery-sqlalchemy API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@aucampia
Copy link
Contributor

GOOGLE_CLOUD_PROJECT=... nox -s system-3.8 fails on tests/system/test_alembic.py::test_alembic_scenario.

Environment details

  • OS type and version: GNU/Linux fedora 34
  • Python version: Python 3.9.9
  • pip version: pip 21.0.1 from /usr/lib/python3.9/site-packages/pip (python 3.9)
  • sqlalchemy-bigquery version: main branch

Steps to reproduce

  1. Run:
GOOGLE_CLOUD_PROJECT=... nox -s system-3.8 

Code example

See https://github.com/googleapis/python-bigquery-sqlalchemy/blob/6e2fa4925b5407c9d7d66f5840d51e9bf44f5008/tests/system/test_alembic.py

Stack trace

$ GOOGLE_CLOUD_PROJECT=... nox -s system-3.8 
nox > Running session system-3.8
nox > Creating virtual environment (virtualenv) using python3.8 in .nox/system-3-8
nox > python -m pip install --pre grpcio
nox > python -m pip install mock pytest google-cloud-testutils -c /home/iwana/d.x/github.com/googleapis/python-bigquery-sqlalchemy/testing/constraints-3.8.txt
nox > python -m pip install -e .[tests,alembic] -c /home/iwana/d.x/github.com/googleapis/python-bigquery-sqlalchemy/testing/constraints-3.8.txt
nox > py.test --quiet --junitxml=system_3.8_sponge_log.xml tests/system
============================================================================ test session starts ============================================================================
platform linux -- Python 3.8.12, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /home/iwana/d.x/github.com/googleapis/python-bigquery-sqlalchemy, configfile: setup.cfg
collected 50 items / 1 skipped / 49 selected                                                                                                                                

tests/system/test__struct.py ..s                                                                                                                                      [  6%]
tests/system/test_alembic.py F                                                                                                                                        [  8%]
tests/system/test_helpers.py ssss                                                                                                                                     [ 16%]
tests/system/test_sqlalchemy_bigquery.py ........................................ss                                                                                   [100%]

================================================================================= FAILURES ==================================================================================
___________________________________________________________________________ test_alembic_scenario ___________________________________________________________________________
Traceback (most recent call last):
  File "/home/iwana/d.x/github.com/googleapis/python-bigquery-sqlalchemy/tests/system/test_alembic.py", line 80, in test_alembic_scenario
    assert alembic_table("account", "schema") == [
AssertionError: assert ["SchemaField... 'NULLABLE')"] == ["SchemaField...one, (), ())"]
  At index 0 diff: "SchemaField('id', 'INTEGER', 'REQUIRED')" != "SchemaField('id', 'INTEGER', 'REQUIRED', None, (), ())"
  Use -v to get the full diff
--------------------------------------------------------------------------- Captured stderr setup ---------------------------------------------------------------------------
/home/iwana/d.x/github.com/googleapis/python-bigquery-sqlalchemy/.nox/system-3-8/lib/python3.8/site-packages/google/auth/_default.py:73: UserWarning: Your application has authenticated using end user credentials from Google Cloud SDK without a quota project. You might receive a "quota exceeded" or "API not enabled" error. We recommend you rerun `gcloud auth application-default login` and make sure a quota project is added. Or you can use service accounts instead. For more information about service accounts, see https://cloud.google.com/docs/authentication/
  warnings.warn(_CLOUD_SDK_CREDENTIALS_WARNING)
/home/iwana/d.x/github.com/googleapis/python-bigquery-sqlalchemy/.nox/system-3-8/lib/python3.8/site-packages/google/auth/_default.py:73: UserWarning: Your application has authenticated using end user credentials from Google Cloud SDK without a quota project. You might receive a "quota exceeded" or "API not enabled" error. We recommend you rerun `gcloud auth application-default login` and make sure a quota project is added. Or you can use service accounts instead. For more information about service accounts, see https://cloud.google.com/docs/authentication/
  warnings.warn(_CLOUD_SDK_CREDENTIALS_WARNING)
/home/iwana/d.x/github.com/googleapis/python-bigquery-sqlalchemy/.nox/system-3-8/lib/python3.8/site-packages/google/cloud/bigquery/client.py:535: UserWarning: Cannot create BigQuery Storage client, the dependency google-cloud-bigquery-storage is not installed.
  warnings.warn(
------------------------------ generated xml file: /home/iwana/d.x/github.com/googleapis/python-bigquery-sqlalchemy/system_3.8_sponge_log.xml -------------------------------
========================================================================== short test summary info ==========================================================================
FAILED tests/system/test_alembic.py::test_alembic_scenario - assert ["SchemaField... 'NULLABLE')"] == ["SchemaField...one, (), ())"]
============================================================ 1 failed, 42 passed, 8 skipped in 251.99s (0:04:11) ============================================================
nox > Command py.test --quiet --junitxml=system_3.8_sponge_log.xml tests/system failed with exit code 1
nox > Session system-3.8 failed.

Running with -vv

Traceback (most recent call last):
  File "/home/iwana/d.x/github.com/googleapis/python-bigquery-sqlalchemy/tests/system/test_alembic.py", line 80, in test_alembic_scenario
    assert alembic_table("account", "schema") == [
AssertionError: assert ["SchemaField('id', 'INTEGER', 'REQUIRED')",\n "SchemaField('name', 'STRING(50)', 'REQUIRED', 'The name')",\n "SchemaField('description', 'STRING(200)', 'NULLABLE')"] == ["SchemaField('id', 'INTEGER', 'REQUIRED', None, (), ())",\n "SchemaField('name', 'STRING(50)', 'REQUIRED', 'The name', (), ())",\n "SchemaField('description', 'STRING(200)', 'NULLABLE', None, (), ())"]
  At index 0 diff: "SchemaField('id', 'INTEGER', 'REQUIRED')" != "SchemaField('id', 'INTEGER', 'REQUIRED', None, (), ())"
  Full diff:
    [
  -  "SchemaField('id', 'INTEGER', 'REQUIRED', None, (), ())",
  ?                                          --------------
  +  "SchemaField('id', 'INTEGER', 'REQUIRED')",
  -  "SchemaField('name', 'STRING(50)', 'REQUIRED', 'The name', (), ())",
  ?                                                           --------
  +  "SchemaField('name', 'STRING(50)', 'REQUIRED', 'The name')",
  -  "SchemaField('description', 'STRING(200)', 'NULLABLE', None, (), ())",
  ?                                                       --------------
  +  "SchemaField('description', 'STRING(200)', 'NULLABLE')",
    ]
@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery-sqlalchemy API. label Dec 21, 2021
@aucampia
Copy link
Contributor Author

actually I guess this is a dupe of this: #373

@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Dec 22, 2021
@tswast tswast added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. and removed 🚨 This issue needs some love. triage me I really want to be triaged. labels Dec 29, 2021
@tswast tswast self-assigned this Dec 29, 2021
@tswast
Copy link
Collaborator

tswast commented Dec 29, 2021

Closing as a duplicate of #373. Mailed #384 to fix.

@tswast tswast closed this as completed Dec 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery-sqlalchemy API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

3 participants