Skip to content

Commit 7fc7a30

Browse files
authored
Merge pull request #269 from instana/hm-open-issues-mar-28
Fix reported issues
2 parents 374e0de + ce6e331 commit 7fc7a30

File tree

5 files changed

+5
-44
lines changed

5 files changed

+5
-44
lines changed

.circleci/config.yml

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,6 @@
11
version: 2.1
22

33
executors:
4-
ruby_25:
5-
docker:
6-
- image: circleci/ruby:2.5-node
7-
environment:
8-
MEMCACHED_HOST: '127.0.0.1:11211'
9-
REDIS_URL: 'redis://127.0.0.1:6379'
10-
DATABASE_URL: 'sqlite3::memory:'
11-
- image: memcached
12-
- image: redis
13-
- image: circleci/dynamodb
14-
- image: minio/minio:latest
15-
command: ["server", "/data"]
16-
- image: s12v/sns
17-
- image: softwaremill/elasticmq-native
18-
- image: circleci/mongo:5-focal-ram
194
ruby_26:
205
docker:
216
- image: circleci/ruby:2.6-node
@@ -46,19 +31,6 @@ executors:
4631
- image: s12v/sns
4732
- image: softwaremill/elasticmq-native
4833
- image: circleci/mongo:5-focal-ram
49-
ruby_25_mysql2:
50-
docker:
51-
- image: circleci/ruby:2.5-node
52-
environment:
53-
DATABASE_URL: "mysql2://[email protected]:3306/ci_test"
54-
- image: mariadb
55-
environment:
56-
MYSQL_DATABASE: 'ci_test'
57-
MYSQL_USER: 'root'
58-
MYSQL_PASSWORD: ''
59-
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
60-
MYSQL_ROOT_PASSWORD: ''
61-
MYSQL_ROOT_HOST: '%'
6234
ruby_26_mysql2:
6335
docker:
6436
- image: circleci/ruby:2.6-node
@@ -85,15 +57,6 @@ executors:
8557
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
8658
MYSQL_ROOT_PASSWORD: ''
8759
MYSQL_ROOT_HOST: '%'
88-
ruby_25_postgres:
89-
docker:
90-
- image: circleci/ruby:2.6-node
91-
environment:
92-
DATABASE_URL: "postgres://postgres:[email protected]:5432/ci_test"
93-
- image: postgres
94-
environment:
95-
POSTGRES_PASSWORD: 'test'
96-
POSTGRES_DB: 'ci_test'
9760
ruby_26_postgres:
9861
docker:
9962
- image: circleci/ruby:2.6-node
@@ -251,7 +214,6 @@ workflows:
251214
stack:
252215
- ruby_27
253216
- ruby_26
254-
- ruby_25
255217
libraries:
256218
jobs:
257219
- test_apprisal:
@@ -260,7 +222,6 @@ workflows:
260222
stack:
261223
- ruby_27
262224
- ruby_26
263-
- ruby_25
264225
gemfile:
265226
- "./gemfiles/aws_30.gemfile"
266227
- "./gemfiles/cuba_30.gemfile"
@@ -292,13 +253,10 @@ workflows:
292253
stack:
293254
- ruby_27
294255
- ruby_26
295-
- ruby_25
296256
- ruby_27_postgres
297257
- ruby_26_postgres
298-
- ruby_25_postgres
299258
- ruby_27_mysql2
300259
- ruby_26_mysql2
301-
- ruby_25_mysql2
302260
gemfile:
303261
- "./gemfiles/rails_60.gemfile"
304262
- "./gemfiles/rails_52.gemfile"

lib/instana.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,7 @@
1616
unless ENV.fetch('INSTANA_DISABLE', false)
1717
::Instana::Activator.start
1818
::Instana.agent.spawn_background_thread
19+
20+
::Instana.logger.info "Stan is on the scene. Starting Instana instrumentation version #{::Instana::VERSION}"
1921
end
2022
# :nocov:

lib/instana/backend/host_agent_activation_observer.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ def update(_time, _old_version, new_version)
3434
raise DiscoveryError, "Discovery response was #{discovery_response.code} with `#{payload}`." unless discovery_response.ok?
3535

3636
discovery = discovery_response.json
37+
raise DiscoveryError, "Expected discovery to be a Hash, not a `#{discovery.class}`." unless discovery.is_a?(Hash)
38+
3739
@logger.debug("Discovery complete (`#{discovery}`). Waiting for agent.")
3840
wait_for_backend(discovery['pid'])
3941
@logger.debug("Agent ready.")

lib/instana/base.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,3 @@ def logger=(val)
3838
end
3939
end
4040
end
41-
42-
::Instana.logger.info "Stan is on the scene. Starting Instana instrumentation version #{::Instana::VERSION}"

test/backend/host_agent_activation_observer_test.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ def test_standard_discovery
1212
stub_request(:put, "http://10.10.10.10:9292/com.instana.plugin.ruby.discovery")
1313
.and_timeout
1414
.and_return(status: 500, body: '{"ok": false}')
15+
.and_return(status: 200, body: '[{"pid": 1234}]')
1516
.and_return(status: 200, body: '{"pid": 1234}')
1617

1718
stub_request(:head, "http://10.10.10.10:9292/com.instana.plugin.ruby.1234")

0 commit comments

Comments
 (0)