Skip to content

chore(vcpkg-ports): Expose grpc feature in monitoring_system overlay port #570

Description

@kcenon

Part of kcenon/common_system#454

What

The project vcpkg.json defines a grpc feature (gRPC + protobuf), but the overlay port vcpkg-ports/kcenon-monitoring-system/vcpkg.json does not expose it. Consumers installing via the overlay port cannot enable gRPC-based metrics export.

  • Current: Port has logging and network features only
  • Expected: Port also exposes a grpc feature matching the project manifest
  • Scope: vcpkg-ports/kcenon-monitoring-system/vcpkg.json and portfile.cmake

Feature Comparison

Feature Project vcpkg.json Port vcpkg.json Status
logging kcenon-logger-system kcenon-logger-system Aligned
network kcenon-network-system Port-only (OK)
grpc grpc >= 1.51.1, protobuf >= 3.21.0 Missing from port
testing gtest[gmock] Intentionally excluded (build-time only)

Why

  • The project CMakeLists.txt supports gRPC monitoring via find_package(gRPC CONFIG QUIET) at line 343
  • The portfile already passes CMake options based on features but has no grpc feature to trigger them
  • Consumers wanting gRPC-based OTLP/Prometheus monitoring cannot enable it through the vcpkg overlay port
  • Feature parity between the project manifest and the port ensures consistent behavior

Where

  • vcpkg-ports/kcenon-monitoring-system/vcpkg.json — features section
  • vcpkg-ports/kcenon-monitoring-system/portfile.cmake — feature check and CMake option passthrough

How

Technical Approach

  1. Add grpc feature to vcpkg-ports/kcenon-monitoring-system/vcpkg.json:

    "grpc": {
        "description": "Enable gRPC-based metrics export (OTLP, Prometheus)",
        "dependencies": [
            { "name": "grpc", "version>=": "1.51.1" },
            { "name": "protobuf", "version>=": "3.21.0" }
        ]
    }
  2. Add feature passthrough in portfile.cmake:

    vcpkg_check_features(OUT_PREFIX MONITORING
        FEATURES
            logging WITH_LOGGER
            network WITH_NETWORK
            grpc    WITH_GRPC
    )
    # ... in vcpkg_cmake_configure OPTIONS:
    -DMONITORING_WITH_GRPC=${MONITORING_WITH_GRPC}

Acceptance Criteria

  • Port vcpkg.json includes grpc feature with correct dependencies
  • portfile.cmake passes MONITORING_WITH_GRPC flag based on feature
  • vcpkg install kcenon-monitoring-system[grpc] builds with gRPC support
  • Existing features (logging, network) are unaffected

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions