Skip to content

[C++][FlightRPC] Use gRPC version macros if possible #36479

Closed

Description

@pitrou

Describe the enhancement requested

Currently, we have a suite of compilation-based configuration tests to find out the approximate gRPC version, for feature selection.

Starting with 1.51.0 however, the gRPC C++ API exposes version macros:
grpc/grpc#31033

We could start using those and fallback on the older method if the macros are not available.

Component(s)

C++, FlightRPC

Activity

  1. pitrou commented on Jul 5, 2023

    @pitrou
    MemberAuthor
  2. lidavidm commented on Jul 5, 2023

    @lidavidm
    Member

    Should we just drop support for older gRPC entirely? At this point 1.27 is from 3 years ago

  3. pitrou commented on Jul 5, 2023

    @pitrou
    MemberAuthor

    I have no idea. How hard is it to maintain support? @kou

    In any case, we have feature tests for many versions between 1.27 and 1.51 anyway.

  4. lidavidm commented on Jul 5, 2023

    @lidavidm
    Member

    Sure, but using the version macros doesn't really help us there.

  5. pitrou commented on Jul 5, 2023

    @pitrou
    MemberAuthor

    Except if we add another feature test for the presence of the version macros :-)

  6. kou commented on Jul 5, 2023

    @kou
    Member

    We can require gRPC 1.30 or later (drop support for 1.27) because:

    • Ubuntu 20.04 doesn't provide usable gRPC (1.16 and we require 1.17 or later now)
    • Ubuntu 22.04 provides gRPC 1.30
    • Debian stable (bookworm) provides gRPC 1.51

    Ubuntu versions: https://packages.ubuntu.com/search?keywords=libgrpc++-dev
    Debian versions: https://packages.debian.org/search?keywords=libgrpc++-dev

    BTW, we can use gRPC version detected by find_package(gRPCAlt) as macros in our C++ source codes. So we can use gRPC version information as macro without requiring gRPC 1.51 or later.

  7. pitrou commented on Jul 6, 2023

    @pitrou
    MemberAuthor

    What about RHEL and similar?

  8. kou commented on Jul 6, 2023

    @kou
    Member
    • RHEL 7: NA
    • RHEL 8: NA
    • RHEL 9: gRPC 1.46.7 by EPEL
  9. pitrou commented on Jul 6, 2023

    @pitrou
    MemberAuthor

    Then I agree we can require gRPC 1.30 or later. It won't simplify much, though ;-)

  10. self-assigned this
    on Jul 6, 2023
  11. changed the title [-][C++][Flight] Use gRPC version macros if possible[/-] [+][C++][FlightRPC] Use gRPC version macros if possible[/+] on Jul 9, 2023
  12. added a commit that references this issue on Jul 9, 2023
  13. added a commit that references this issue on Jul 10, 2023
  14. added this to the 13.0.0 milestone on Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions