close
Skip to content

chore(deps): Bump gRPC to v1.80.0#3270

Open
vladbologa wants to merge 2 commits intomasterfrom
vb/bump-grpc-1.80
Open

chore(deps): Bump gRPC to v1.80.0#3270
vladbologa wants to merge 2 commits intomasterfrom
vb/bump-grpc-1.80

Conversation

@vladbologa
Copy link
Copy Markdown
Contributor

@vladbologa vladbologa commented Apr 24, 2026

Description

Update gRPC from v1.67.0 to v1.80.0, along with its required dependency bumps:

  • protobuf v28.3 to v31.1
  • abseil-cpp 20240722.0 to 20250512.1.

The abseil-cpp bump triggers GCC bug #71962 (tracked in abseil#1634): -fsanitize=undefined breaks constexpr evaluation of function pointer comparisons in abseil's hash_policy_traits.h, causing a build failure in ConfigLoaderTest.cpp when building with address sanitizer enabled. Worked around by disabling UBSan for that file only.

Adapt collector code to protobuf v31 breaking changes:

  • Arena::CreateMessage<T>() removed, replaced with Arena::Create<T>()
  • google::protobuf::uint64 removed, replaced with uint64_t
  • FieldDescriptor::name() now returns absl::string_view instead of const std::string&

This bump will make it easier to upgrade to v1.81.0 when it'll be available (which will include required PQC fixes). It could also be merged before #3269, since in that PR I used some APIs that are now deprecated.

Checklist

  • Investigated and inspected CI test results
  • Updated documentation accordingly

Automated testing

  • Added unit tests
  • Added integration tests
  • Added regression tests

If any of these don't apply, please comment below.

Testing Performed

CI is sufficient.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 25, 2026

Codecov Report

❌ Patch coverage is 21.05263% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 27.31%. Comparing base (04161de) to head (c5db7d5).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
collector/lib/ConfigLoader.cpp 12.50% 0 Missing and 14 partials ⚠️
collector/lib/ProtoAllocator.h 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3270      +/-   ##
==========================================
- Coverage   27.38%   27.31%   -0.07%     
==========================================
  Files          95       95              
  Lines        5427     5425       -2     
  Branches     2548     2548              
==========================================
- Hits         1486     1482       -4     
- Misses       3214     3216       +2     
  Partials      727      727              
Flag Coverage Δ
collector-unit-tests 27.31% <21.05%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vladbologa vladbologa changed the title chore(deps): Bump gRPC to v1.80.0 (protobuf v31.1, abseil 20250512.1) chore(deps): Bump gRPC to v1.80.0 Apr 25, 2026
Update gRPC from v1.67.0 to v1.80.0, along with its required
dependency bumps: protobuf v28.3 to v31.1 and abseil-cpp
20240722.0 to 20250512.1.

Adapt collector code to protobuf v31 breaking changes:
- Arena::CreateMessage<T>() removed, replaced with Arena::Create<T>()
- google::protobuf::uint64 removed, replaced with uint64_t
- FieldDescriptor::name() now returns absl::string_view instead
  of const std::string&
@github-actions
Copy link
Copy Markdown

/retest collector-on-push

if (value == nullptr) {
ParserError err;
err << file_ << ": Invalid enum value '" << enum_name << "' for field " << (read_camelcase_ ? SnakeCaseToCamel(field->name()) : field->name());
err << file_ << ": Invalid enum value '" << enum_name << "' for field " << (read_camelcase_ ? SnakeCaseToCamel(std::string(field->name())) : std::string(field->name()));
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a huge deal because it is in the error side of a configuration reload which should not happen very often, but do we need to build std::string because the field->name() method is returning an abseil string_view? Can we create std::string_view instead so we don't have to copy the entire string over?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, field->name() used to return std::string, and after the protobuf bump it's a absl:string_view (which I think it's just a typedef to std::string_view).

But I'd also have to modify SnakeCaseToCamel to take std::string_view instead of const std::string&. Should I do that?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it could be worth it, right now the case where read_camelcase_ is true creating a new std::string before calling SnakeCaseToCamel and this in turn will create a separate string with the case changed (the compiler might be smart enough to not do these multiple allocations, but I would rather not rely on it).

We still need to create a std::string for the false case because SnakeCaseToCamel needs to return that type and the compiler will get upset if we have different types as the result of the branches in a ternary operator.

I'll leave it up to you, I think I'm just putting too much effort on a piece of code that will most likely not be hit and is not in a hot path.


std::string camel;
const std::string* name = &field->name();
std::string name(field->name());
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to my previous comment.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also here, SnakeCaseToCamel, ConcatPath and ParseScalar should then be modified to use std::string_view instead of const std::string&.

And it looks like we'd still need a copy on the read_camelcase_ path:

  std::string name(field->name());
  if (read_camelcase_) {
    name = SnakeCaseToCamel(name);
  }

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as my answer to the previous comment, I'll leave it up to you, it might not be worth the effort since this is not code that is on any hot path.

@vladbologa vladbologa marked this pull request as ready for review April 27, 2026 21:03
@vladbologa vladbologa requested a review from a team as a code owner April 27, 2026 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants