Skip to content

Commit

Permalink
feature(grpc): Add engine version to version svc
Browse files Browse the repository at this point in the history
Fixes #1269

Add two new fields in the version service for falco's engine version and
the checksum of all of the fields it understands.

This will require rebuilding/re-releasing all the clients.

Signed-off-by: Spencer Krum <nibz@spencerkrum.com>
  • Loading branch information
nibalizer authored and poiana committed Dec 15, 2020
1 parent 574e7f4 commit d03a1f4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions userspace/falco/grpc_server_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ limitations under the License.
*/

#include "config_falco.h"
#include "falco_engine_version.h"
#include "grpc_server_impl.h"
#include "grpc_queue.h"
#include "logger.h"
Expand Down Expand Up @@ -75,6 +76,9 @@ void falco::grpc::server_impl::version(const context& ctx, const version::reques
auto& version = *res.mutable_version();
version = FALCO_VERSION;

res.set_engine_version(FALCO_ENGINE_VERSION);
res.set_engine_fields_checksum(FALCO_FIELDS_CHECKSUM);

res.set_major(FALCO_VERSION_MAJOR);
res.set_minor(FALCO_VERSION_MINOR);
res.set_patch(FALCO_VERSION_PATCH);
Expand Down
6 changes: 5 additions & 1 deletion userspace/falco/version.proto
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,14 @@ message request
// its parts as per semver 2.0 specification (https://semver.org).
message response
{
// falco version
string version = 1;
uint32 major = 2;
uint32 minor = 3;
uint32 patch = 4;
string prerelease = 5;
string build = 6;
}
// falco engine version
uint32 engine_version = 7;
string engine_fields_checksum = 8;
}

0 comments on commit d03a1f4

Please sign in to comment.