-
Notifications
You must be signed in to change notification settings - Fork 24
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
Remove bootstrap.sh and collector-wrapper.sh #1814
Conversation
These two scripts have been pretty much redundant for some time now. bootstrap.sh used to have the responsibility of removing the kernel module when collector stopped and printing some additional system information, but we no longer support kernel modules and printing the system information can be done with the C++ binary all the same. collector-wrapper.sh gave the ability to manipulate how the collector binary was called, allowing things like running collector under valgrind. Without bootstrap.sh, the same thing can be achieved with entrypoint and command.
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.
Thanks you for this one ! I really like the idea to get rid of those scripts 👊
set(COLLECTOR_VERSION "0.0.0") | ||
endif() | ||
|
||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Version.h.in ${CMAKE_CURRENT_BINARY_DIR}/Version.h) |
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 am curious about when this gets reevaluated. For instance, in a dev environment, is the Collector version going to remain the same until the project is reconfigured ?
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.
From the cmake docs:
If the input file is modified the build system will re-run CMake to re-configure the file and generate the build system again. The generated file is modified and its timestamp updated on subsequent cmake runs only if its content is changed.
So it will retrigger if you change the file or manually re-run cmake. The way we use it right now running with our make files, this file gets re-created on every make image
call.
PR #1814 removed the scripts used by collector to run, making it possible for it to be run directly. The Konflux build is still attempting to copy the scripts directory into the image even though it doesn't exist anymore, so we should remove that line from the dockerfile. As an additional cleanup, since we have been linking falco statically for some time now, there's no need to call ldconfig anymore.
Yet another mistake from #1814. The version of collector is now hardcoded into the binary, but that needs to be set at compile time, which was not being done in konflux builds. The label with the version was being set properly, this only affects collector printing its version to the logs.
Description
These two scripts have been pretty much redundant for some time now.
bootstrap.sh used to have the responsibility of removing the kernel module when collector stopped and printing some additional system information, but we no longer support kernel modules and printing the system information can be done with the C++ binary all the same.
collector-wrapper.sh gave the ability to manipulate how the collector binary was called, allowing things like running collector under valgrind. Without bootstrap.sh, the same thing can be achieved with entrypoint and command.
Checklist
Automated testing
If any of these don't apply, please comment below.
Testing Performed
CI should be enough, but just in case I deployed collector and checked it worked correctly.
Also compared the previous log output with the new one to check the information is the same:
New log
Old log