-
Notifications
You must be signed in to change notification settings - Fork 592
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
3rdparty: Disable tests and tools for ada #14618
Conversation
f533a85
to
ee4caca
Compare
new failures detected in https://buildkite.com/redpanda/redpanda/builds/40302#018b9014-082f-457f-8d12-f89d7d17bf4e: "rptest.tests.rpk_registry_test.RpkRegistryTest.test_produce_consume_proto" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe they would take patches to allow disabling testing via an ADA_TESTING
option, I don't love the workarounds here, but alas cmake.
Should we be doing this for vtools too?
cmake/dependencies.cmake
Outdated
FetchContent_Populate(ada) | ||
set(GIT_EXECUTABLE_OLD ${GIT_EXECUTABLE}) | ||
set(GIT_EXECUTABLE "" CACHE INTERNAL "Invalid path to the Git executable") | ||
add_subdirectory(${ada_SOURCE_DIR} ${ada_BINARY_DIR}) | ||
set(GIT_EXECUTABLE ${GIT_EXECUTABLE_OLD} CACHE STRING "location of git" FORCE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems not fun.
Should we be setting BUILD_TESTING
to OFF
instead of this hack around disabling the git
exec lookup?
Additionally we should be able to set(ADA_TOOLS OFF)
to disable building the tools right? That feels like a slightly better solution, but ideally they had an option like ADA_TESTING
instead of BUILD_TESTING
right?
I guess this ends up being net less because we'll have to do the same BUILD_TESTING
hack to disable and re-enable as we only want tests in our repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you mean like before I force pushed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was seeing some git activity, and was trying to get rid of: "detected dubious ownership in repository at"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm ambivalent. Ideally we just did something like:
set(ADA_TOOLS OFF)
and set(ADA_TESTING OFF)
and called it a day (without the set it back hack). I'm fine with this, but would love Noah's opinion here. I'm a CMake newbie.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was seeing some git activity, and was trying to get rid of: "detected dubious ownership in repository at"
Did this fix it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no git activity now! But same error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bummer...
It looks like they distribute a single header version in releases... Is it easy in CMake to download that and add it as a target?
https://github.com/ada-url/ada/releases/tag/v2.7.2
Anyways I'm not trying to add more work for you, we can just start with this.
new failures detected in https://buildkite.com/redpanda/redpanda/builds/40302#018b9023-0464-4a30-b3aa-8ad2feb8f29e: "rptest.tests.topic_recovery_test.TopicRecoveryTest.test_time_based_retention.cloud_storage_type=CloudStorageType.ABS" |
Yeah, I'll make equivalent changes when this is merged. |
cmake/dependencies.cmake
Outdated
FetchContent_GetProperties(ada) | ||
if(NOT ada_POPULATED) | ||
# Disable git to prevent CPM from downloading 3rdparty repositories. | ||
# An intentional side effect is that tests and tools are not built | ||
|
||
FetchContent_Populate(ada) | ||
set(GIT_EXECUTABLE_OLD ${GIT_EXECUTABLE}) | ||
set(GIT_EXECUTABLE "" CACHE INTERNAL "Invalid path to the Git executable") | ||
add_subdirectory(${ada_SOURCE_DIR} ${ada_BINARY_DIR}) | ||
set(GIT_EXECUTABLE ${GIT_EXECUTABLE_OLD} CACHE STRING "location of git" FORCE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the simplest thing to do is fork ada and write a better cmake file. i did it for several of the dependencies in here, and it is pretty easy since we don't have maintain tests, benchmarks, installation, etc...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alternatively, you can check-in a patch to the cmakefile and have fetchcontent apply the patch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think @travisdowns knows one of the maintainers, so maybe we can get them to apply the patch (or just write a dumb CMake file for the single file version).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeh if we want to go through upstream that works. the problems with the ada cmake file are pretty reasonable i would expect maintainers to pick fixes for them. here is the one i did for Avro https://github.com/redpanda-data/avro/blob/release-1.11.1-redpanda/redpanda_build/CMakeLists.txt as an example of a custom cmakefile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dotnwat Any objection to merging this as-is to mitigate this type of failure and then reworking the build in followup work?
new failures detected in https://buildkite.com/redpanda/redpanda/builds/40302#018b906e-19e6-41a5-b6c0-54cb82495fb3: "rptest.tests.partition_movement_test.PartitionMovementTest.test_deletion_stops_move.num_to_upgrade=2" |
CI Failures are unrelated as this just affects the public build. |
We are open to any patches :-) |
@anonrig Wow I don't know if someone pointed you here, but 🙏 I created a PR to what I believe would work for us: ada-url/ada#557 @BenPope and @dotnwat feel free to take a peek at that patch, I believe that should work here, but you're both better at CMake than I am. |
ada uses CPM: https://github.com/cpm-cmake/CPM.cmake Disable ADA_TESTING, ADA_TOOLS, ADA_BENCHMARKING to prevent CPM from downloading 3rdparty repositories. Also add the license. Signed-off-by: Ben Pope <ben@redpanda.com>
ee4caca
to
ad41585
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you still seeing the issue on dubious ownership? If not, please update the cover letter.
Yes, because the single header is always built. |
new failures in https://buildkite.com/redpanda/redpanda/builds/40829#018bb942-82e6-4915-ae94-35321b5ee95c:
|
ada uses CPM: https://github.com/cpm-cmake/CPM.cmake
Disable ADA_TESTING, ADA_TOOLS, ADA_BENCHMARKING to prevent CPM from downloading 3rdparty repositories.
I'm still seeing this message:
Also add the license.
Backports Required
Release Notes