haf image builds fail: unit.sql_serializer's data_processor_tests.cpp cannot find transactions_controller/transaction_controllers.hpp
Problem and intended result
The aidev/integration -> develop hand-off (!1030 (merged), pipeline 185407, aidev/integration a6303fda) fails all four image builds: haf_image_build, haf_image_build_testnet, haf_image_build_mirrornet, haf_image_build_pg17 (for example job 3388363):
FAILED: tests/unit/sql_serializer/CMakeFiles/unit.sql_serializer.dir/data_processor_tests.cpp.o
/home/hived/source/src/sql_serializer/include/hive/plugins/sql_serializer/data_processor.hpp:4:10: fatal error: transactions_controller/transaction_controllers.hpp: No such file or directory
ninja: build stopped: subcommand failed.#33 (closed) (faa67b14, "Queue sql_serializer data_processor batches") and #428 (closed) (63deadac) added tests/unit/sql_serializer/data_processor_tests.cpp. That test includes data_processor.hpp, which includes transactions_controller/transaction_controllers.hpp, a header that lives at src/transaction_controllers/include/transactions_controller/transaction_controllers.hpp. tests/unit/sql_serializer/CMakeLists.txt adds the protocol, chain, utilities, appbase and src/sql_serializer/include directories, but not src/transaction_controllers/include. haf's aidev gates do not compile the C++ unit tests (cxx-scope is skipped), so only CI's full build found it. Every CI image build, and so every downstream job, is blocked until it is fixed.
Intended result: the full CMake build, unit tests included, compiles, and the image build jobs pass.
Required behavior
- Give the
unit.sql_serializertest target whatdata_processor.hppneeds: thesrc/transaction_controllers/includeinclude directory, and the transaction_controllers library link if the test also needs its symbols. Prefer taking it transitively from the library target (target_include_directories(... PUBLIC ...)on transaction_controllers or sql_serializer_plugin) over hard-coding the path, if that is how the rest of the tree does it. - Check that every other unit-test target that includes sql_serializer headers builds as well.
Acceptance criteria
- A full HAF build (the CI
haf_image_buildconfiguration, unit tests included) compilestests/unit/sql_serializer/data_processor_tests.cppand linksunit.sql_serializer. unit.sql_serializer, including the data_processor tests #33 (closed) added, runs and passes.
Verification
Build the full tree with the unit tests in the CI base toolchain image, as #425 (closed)'s verification did, and run unit.sql_serializer. The aidev gates alone cannot show this. Record the build command and where it ran.
Integration points
tests/unit/sql_serializer/CMakeLists.txt(or the transaction_controllers / sql_serializer_plugin target's public include directories):transactions_controller/transaction_controllers.hppreachable from the test target
Related-To: #33 (closed)