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

Fix datamodel_code_generator exception in connector build #9894

Merged
merged 5 commits into from
Jan 30, 2022

Conversation

tuliren
Copy link
Contributor

@tuliren tuliren commented Jan 30, 2022

The connector build failed with the following exception:

> Task :airbyte-cdk:python:generateProtocolClassFiles FAILED
Traceback (most recent call last):
  File "/usr/local/bin/datamodel-codegen", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/site-packages/datamodel_code_generator/__main__.py", line 329, in main
    pyproject_toml_path = root / "pyproject.toml"
TypeError: unsupported operand type(s) for /: 'tuple' and 'str'

After inspecting the source code of datamodel_code_generator, it appeared that the root variable returned from the black library had a wrong type. Interestingly, black just had a new version, 22.1.0, a few hours ago, which coincided with the time this build started to fail. I compared the version of black pulled by pip when the build was working, and it was 21.12b0. So the new version was probably the root cause of the invalid type. This exception was gone after I pinned black to the old version. It could still fail because of a flaky test in airbyte-worker. But that's a different problem.

@tuliren tuliren temporarily deployed to more-secrets January 30, 2022 03:58 Inactive
@tuliren tuliren temporarily deployed to more-secrets January 30, 2022 04:50 Inactive
@tuliren tuliren temporarily deployed to more-secrets January 30, 2022 05:30 Inactive
@tuliren tuliren temporarily deployed to more-secrets January 30, 2022 05:59 Inactive
@tuliren tuliren changed the title Fix connector build Fix datamodel_code_generator exception in connector build Jan 30, 2022
@tuliren tuliren marked this pull request as ready for review January 30, 2022 06:08
@tuliren tuliren merged commit c873898 into master Jan 30, 2022
@tuliren tuliren deleted the liren/fix-connector-build branch January 30, 2022 06:08
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.

None yet

1 participant