does anyone else get these errors when they clean ...
# contributing-to-airbyte
c
does anyone else get these errors when they clean build? it's like a dependency isn't getting respected or something. curious if i'm the only one.
Copy code
> Task :airbyte-integrations:connectors:source-facebook-marketing-api-singer:unitTest FAILED
[python] .venv/bin/python -m pytest unit_tests
         ============================= test session starts ==============================
         platform darwin -- Python 3.7.8, pytest-6.1.2, py-1.9.0, pluggy-0.13.1
         rootdir: /Users/charles/code/airbyte/airbyte-integrations/connectors/source-facebook-marketing-api-singer
         collected 0 items / 1 error

         ==================================== ERRORS ====================================
         ___________________ ERROR collecting unit_tests/unit_test.py ___________________
         ImportError while importing test module '/Users/charles/code/airbyte/airbyte-integrations/connectors/source-facebook-marketing-api-singer/unit_tests/unit_test.py'.
         Hint: make sure your test modules/packages have valid Python names.
         Traceback:
         .venv/lib/python3.7/importlib/__init__.py:127: in import_module
             return _bootstrap._gcd_import(name[level:], package, level)
         unit_tests/unit_test.py:25: in <module>
             from base_python import AirbyteLogger
         base_python/__init__.py:25: in <module>
             from .integration import AirbyteSpec, ConfigContainer, Destination, Integration, Source
         base_python/integration.py:30: in <module>
             from airbyte_protocol import AirbyteCatalog, AirbyteConnectionStatus, AirbyteMessage, ConnectorSpecification
         airbyte_protocol/__init__.py:25: in <module>
             from .models import (
         airbyte_protocol/models/__init__.py:2: in <module>
             from .airbyte_protocol import *
         E   ModuleNotFoundError: No module named 'airbyte_protocol.models.airbyte_protocol'
         =========================== short test summary info ============================
         ERROR unit_tests/unit_test.py
         !!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
         =============================== 1 error in 0.51s ===============================
u
not just for fb, it's for a bunch of the python integrations.
u
getting the same error for mkto
u
yeah.
u
it feels like it's an order of operations thing.
u
I’m gonna go on a limb and say this is related to the recent build changes?
u
seems like a rasonable guess.
u
i have seen this exact same issue before.
u
but i don't remember if it was before we got rid of python caching last time. or after.
u
ah. here
u
similar but not quite the same.
u
i kinda think i saw this before the most recent build changes.
u
but not 100% sure.
u
I think I see the problem
u
there’s a race condition with generating python protocol class files
u
I think
u
integrations should only run after the generation process has run, but I’m seeing the two steps run in parallel. generation cleans up output dir before putting files there so that would explain why they can’t find that module, it’s the generated stuff
u
dope.
u
did it work?
u
like adding a dependson or somethign?
u
incedentally, i
rm -rf .gradle
and then rebuilt and it all worked fine.
u
🤔
u
huh
u
Copy code
rm -rf .gradle
./gradlew clean
./gradlew build
u
^ this is what worked for me.
u
maybe it needed to get reset since all of the caching changes?
u
lmk if it works for you?
u
giving it a shot
u
still getting same problem
u
it works for me to do
./gradlew :airbyte-integrations:connectors:source-facebook-marketing-api-singer:unitTest
on a clean repo
u
I'm wondering if we need a
implementation files(project(':airbyte-integrations:bases:airbyte-protocol').generateProtocolClassFiles.outputs)
in
base-python
u
but I guess airbyteDocker should depend on build anyways
u
Running the unit test tasks individually always seems fine. But when just hitting build it all doesn't work.
u
should we install main reqs and test reqs before unit tests?
u
it seems that way.
u
well is it that or is it that it is depending on a module that hasn't installed its own deps.
u
haven't full dug into the stack trace.