Skip to content

Conversation

@bsorbo
Copy link
Collaborator

@bsorbo bsorbo commented Sep 15, 2025

Still investigating the root cause, but want to stabilize main. It appears that the graphql gem's 2.5.12 version (released today) introduces a test failure in elasticgraph-apollo (see below).

Can repro by running bundle udpate && ./script/run_specs off of main.

How tested?

  • Clean CI build.
  • bundle update && ./script/run_specs fails off main, but on this branch succeeds.

Failure w/o Fix

  1) ElasticGraph::Apollo::GraphQL::HTTPEndpointExtension adds Apollo tracing if the `Apollo-Federation-Include-Trace` header is set to `ftv1`, regardless of its casing
     Failure/Error: Google::Protobuf::Timestamp.new(seconds: time.to_i, nanos: time.nsec)
     
     NoMethodError:
       undefined method 'nsec' for nil
     # /Users/bsorbo/.rvm/gems/ruby-3.4.3/gems/apollo-federation-3.10.1/lib/apollo-federation/tracing/tracer.rb:271:in 'ApolloFederation::Tracing::Tracer.to_proto_timestamp'
     # /Users/bsorbo/.rvm/gems/ruby-3.4.3/gems/apollo-federation-3.10.1/lib/apollo-federation/tracing/tracer.rb:254:in 'ApolloFederation::Tracing::Tracer.attach_trace_to_result'
     # /Users/bsorbo/.rvm/gems/ruby-3.4.3/gems/apollo-federation-3.10.1/lib/apollo-federation/tracing/tracer.rb:101:in 'block in ApolloFederation::Tracing::Tracer.execute_multiplex'
     # /Users/bsorbo/.rvm/gems/ruby-3.4.3/gems/apollo-federation-3.10.1/lib/apollo-federation/tracing/tracer.rb:101:in 'Array#map'
     # /Users/bsorbo/.rvm/gems/ruby-3.4.3/gems/apollo-federation-3.10.1/lib/apollo-federation/tracing/tracer.rb:101:in 'ApolloFederation::Tracing::Tracer.execute_multiplex'
     # /Users/bsorbo/.rvm/gems/ruby-3.4.3/gems/apollo-federation-3.10.1/lib/apollo-federation/tracing/tracer.rb:80:in 'ApolloFederation::Tracing::Tracer.trace'
     # /Users/bsorbo/.rvm/gems/ruby-3.4.3/gems/graphql-2.5.12/lib/graphql/tracing.rb:63:in 'GraphQL::Tracing::Traceable#call_tracers'
     # /Users/bsorbo/.rvm/gems/ruby-3.4.3/gems/graphql-2.5.12/lib/graphql/tracing.rb:47:in 'GraphQL::Tracing::Traceable#trace'
     # /Users/bsorbo/.rvm/gems/ruby-3.4.3/gems/graphql-2.5.12/lib/graphql/tracing/call_legacy_tracers.rb:30:in 'GraphQL::Tracing::CallLegacyTracers#execute_multiplex'
     # /Users/bsorbo/.rvm/gems/ruby-3.4.3/gems/graphql-2.5.12/lib/graphql/execution/interpreter.rb:42:in 'GraphQL::Execution::Interpreter.run_all'
     # /Users/bsorbo/.rvm/gems/ruby-3.4.3/gems/graphql-2.5.12/lib/graphql/query.rb:281:in 'GraphQL::Query#result'
     # ./elasticgraph-graphql/lib/elastic_graph/graphql/query_executor.rb:147:in 'ElasticGraph::GraphQL::QueryExecutor#execute_query'
     # ./elasticgraph-graphql/lib/elastic_graph/graphql/query_executor.rb:138:in 'ElasticGraph::GraphQL::QueryExecutor#build_and_execute_query'
     # ./elasticgraph-graphql/lib/elastic_graph/graphql/query_executor.rb:55:in 'ElasticGraph::GraphQL::QueryExecutor#execute'
     # ./elasticgraph-graphql/lib/elastic_graph/graphql/http_endpoint.rb:53:in 'block in ElasticGraph::GraphQL::HTTPEndpoint#process'
     # ./elasticgraph-graphql/lib/elastic_graph/graphql/http_endpoint.rb:78:in 'block (3 levels) in ElasticGraph::GraphQL::HTTPEndpoint#with_parsed_request'
     # ./elasticgraph-apollo/lib/elastic_graph/apollo/graphql/http_endpoint_extension.rb:41:in 'block in ElasticGraph::Apollo::GraphQL::HTTPEndpointExtension#with_context'
     # ./elasticgraph-graphql/lib/elastic_graph/graphql/http_endpoint.rb:168:in 'ElasticGraph::GraphQL::HTTPEndpoint#with_context'
     # ./elasticgraph-apollo/lib/elastic_graph/apollo/graphql/http_endpoint_extension.rb:32:in 'ElasticGraph::Apollo::GraphQL::HTTPEndpointExtension#with_context'
     # ./elasticgraph-graphql/lib/elastic_graph/graphql/http_endpoint.rb:77:in 'block (2 levels) in ElasticGraph::GraphQL::HTTPEndpoint#with_parsed_request'
     # ./elasticgraph-graphql/lib/elastic_graph/graphql/http_endpoint.rb:155:in 'ElasticGraph::GraphQL::HTTPEndpoint#with_timeout'
     # ./elasticgraph-graphql/lib/elastic_graph/graphql/http_endpoint.rb:76:in 'block in ElasticGraph::GraphQL::HTTPEndpoint#with_parsed_request'
     # ./elasticgraph-graphql/lib/elastic_graph/graphql/http_endpoint.rb:137:in 'ElasticGraph::GraphQL::HTTPEndpoint#with_request_params'
     # ./elasticgraph-graphql/lib/elastic_graph/graphql/http_endpoint.rb:75:in 'ElasticGraph::GraphQL::HTTPEndpoint#with_parsed_request'
     # ./elasticgraph-graphql/lib/elastic_graph/graphql/http_endpoint.rb:52:in 'ElasticGraph::GraphQL::HTTPEndpoint#process'
     # ./elasticgraph-apollo/spec/unit/elastic_graph/apollo/graphql/http_endpoint_extension_spec.rb:61:in 'RSpec::ExampleGroups::ElasticGraphApolloGraphQLHTTPEndpointExtension#execute_expecting_no_errors'
     # ./elasticgraph-apollo/spec/unit/elastic_graph/apollo/graphql/http_endpoint_extension_spec.rb:34:in 'block (2 levels) in <module:GraphQL>'
     # /Users/bsorbo/.rvm/gems/ruby-3.4.3/gems/rspec-retry-0.6.2/lib/rspec/retry.rb:124:in 'block in RSpec::Retry#run'
     # /Users/bsorbo/.rvm/gems/ruby-3.4.3/gems/rspec-retry-0.6.2/lib/rspec/retry.rb:110:in 'RSpec::Retry#run'
     # /Users/bsorbo/.rvm/gems/ruby-3.4.3/gems/rspec-retry-0.6.2/lib/rspec_ext/rspec_ext.rb:12:in 'RSpec::Core::Example::Procsy#run_with_retry'
     # /Users/bsorbo/.rvm/gems/ruby-3.4.3/gems/rspec-retry-0.6.2/lib/rspec/retry.rb:37:in 'block (2 levels) in RSpec::Retry.setup'
     # ./spec_support/spec_helper.rb:71:in 'block (2 levels) in <top (required)>'
     # /Users/bsorbo/.rvm/gems/ruby-3.4.3/gems/thor-1.4.0/lib/thor/command.rb:28:in 'Thor::Command#run'
     # /Users/bsorbo/.rvm/gems/ruby-3.4.3/gems/thor-1.4.0/lib/thor/invocation.rb:127:in 'Thor::Invocation#invoke_command'
     # /Users/bsorbo/.rvm/gems/ruby-3.4.3/gems/thor-1.4.0/lib/thor.rb:538:in 'Thor.dispatch'
     # /Users/bsorbo/.rvm/gems/ruby-3.4.3/gems/thor-1.4.0/lib/thor/base.rb:584:in 'Thor::Base::ClassMethods#start'

@bsorbo bsorbo merged commit 239527e into main Sep 15, 2025
19 checks passed
@bsorbo bsorbo deleted the bsorbo/graphql_lock_to_2.5.11 branch September 15, 2025 20:52
@myronmarston
Copy link
Collaborator

Thanks for the quick fix here, @bsorbo! Dependabot has also opened #845 which attempts to upgrade the graphql gem and reproduces the error as well, so we can build on that in the future.

bsorbo added a commit that referenced this pull request Sep 15, 2025
Lock graphql gem to 2.5.11 to resolve elasticgraph-apollo test failure introduced in 2.5.12
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.

4 participants