Skip to content

Commit

Permalink
Send version information in connection parameters
Browse files Browse the repository at this point in the history
This requires a change in the selective-ruby-rspec gem, which is not
yet released. We'll need to consider how to handle this scenario so that
we do not break the gem for users who are not using the latest version.

Co-authored-by: Nate Vick <nate.vick@hint.io>
  • Loading branch information
benjaminwood and natevick committed Dec 30, 2023
1 parent a0c532f commit 0c56984
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion lib/selective/ruby/core/controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,12 @@ def transport_url(reconnect: false)
"run_id" => run_id,
"run_attempt" => run_attempt,
"api_key" => api_key,
"runner_id" => runner_id
"runner_id" => runner_id,
"language" => "ruby",
"core_version" => Selective::Ruby::Core::VERSION,
"framework" => runner.framework,
"framework_version" => runner.framework_version,
"framework_wrapper_version" => runner.wrapper_version,
}.merge(metadata: build_env.to_json)

prams[:reconnect] = true if reconnect
Expand Down
2 changes: 1 addition & 1 deletion spec/selective/ruby/core/controller_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

RSpec.describe Selective::Ruby::Core::Controller do
let(:runner) { double("runner", finish: nil, exit_status: 1) }
let(:runner) { double("runner", finish: nil, exit_status: 1, framework: 'rspec', framework_version: "1.0", wrapper_version: "1.0") }
let(:controller) { dirty_dirty_unprivate_class(described_class).new(runner) }

let!(:pipe) { Selective::Ruby::Core::NamedPipe.new("/tmp/#{controller.runner_id}_test_2", "/tmp/#{controller.runner_id}_test_1", skip_reset: true) }
Expand Down

0 comments on commit 0c56984

Please sign in to comment.