wavefront-cli 2.15.1 → 2.15.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/HISTORY.md +9 -0
- data/LICENSE.txt +1 -1
- data/lib/wavefront-cli/controller.rb +2 -0
- data/lib/wavefront-cli/exception.rb +1 -0
- data/lib/wavefront-cli/output/csv/base.rb +9 -0
- data/lib/wavefront-cli/output/csv/query.rb +2 -0
- data/lib/wavefront-cli/output/wavefront/query.rb +4 -2
- data/lib/wavefront-cli/version.rb +1 -1
- data/spec/wavefront-cli/integration_spec.rb +1 -1
- data/spec/wavefront-cli/write_spec.rb +1 -0
- metadata +2 -3
- data/lib/wavefront-cli/output/wavefront/base.rb +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d23d72573c71a3c0fdfc1277b6a8f1544fe38536dfa6c72199d47a15833613db
|
4
|
+
data.tar.gz: d212aa09f8bbe2bb3377f00be4a5fa6e4f6f64870e92d4e8130905cf190848b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2df4d1cc0fd0ff924fd4d1f4271e00600b5448d332db1b65213e31944499c4aaece08944c719c0fcc5bd2603f1bdc5ddedeeb02aeb96ff054d33b227f46097ba
|
7
|
+
data.tar.gz: 41f5a4aae62c21c9729b73f8581fcb0a1da3538d83278b55baee5321b2ba5732fbaa9f63ebe68f3bf90821958dabdb75c65a1595e131534cc0ba970b809db295
|
data/HISTORY.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 2.15.2 (21/12/2018)
|
4
|
+
* Fix bug which caused an unhandled exception if CSV or Wavefront
|
5
|
+
query outputs tried to process an empty data set.
|
6
|
+
|
7
|
+
## 2.15.1 (20/12/2018)
|
8
|
+
|
9
|
+
* Fix bug where `alert snoozed` and `alert firing` did the same
|
10
|
+
thing.
|
11
|
+
|
3
12
|
## 2.15.0 (18/12/2018)
|
4
13
|
* Gracefully handle ctrl-c.
|
5
14
|
* Add `install` and `uninstall` subcommands to `wf alert`.
|
data/LICENSE.txt
CHANGED
@@ -114,6 +114,8 @@ class WavefrontCliController
|
|
114
114
|
abort 'Unsupported file format.'
|
115
115
|
rescue WavefrontCli::Exception::UnparseableInput => e
|
116
116
|
abort "Cannot parse input. #{e.message}"
|
117
|
+
rescue WavefrontCli::Exception::UnparseableResponse => e
|
118
|
+
abort "Bad response from Wavefront. #{e.message}"
|
117
119
|
rescue WavefrontCli::Exception::FileNotFound
|
118
120
|
abort 'File not found.'
|
119
121
|
rescue WavefrontCli::Exception::UnparseableInput
|
@@ -7,6 +7,7 @@ module WavefrontCli
|
|
7
7
|
class SystemError < RuntimeError; end
|
8
8
|
class UnhandledCommand < RuntimeError; end
|
9
9
|
class UnparseableInput < RuntimeError; end
|
10
|
+
class UnparseableResponse < RuntimeError; end
|
10
11
|
class UnsupportedFileFormat < RuntimeError; end
|
11
12
|
class UnsupportedOperation < RuntimeError; end
|
12
13
|
class UnsupportedOutput < RuntimeError; end
|
@@ -14,5 +14,14 @@ module WavefrontCsvOutput
|
|
14
14
|
def run
|
15
15
|
puts _run
|
16
16
|
end
|
17
|
+
|
18
|
+
def check_query_response
|
19
|
+
return true unless resp[:timeseries].nil?
|
20
|
+
|
21
|
+
puts 'No points match query.'
|
22
|
+
exit 0
|
23
|
+
rescue StandardError
|
24
|
+
raise WavefrontCli::Exception::UnparseableResponse
|
25
|
+
end
|
17
26
|
end
|
18
27
|
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
require 'wavefront-sdk/stdlib/hash'
|
2
|
-
require_relative 'base'
|
2
|
+
require_relative '../csv/base'
|
3
3
|
|
4
4
|
module WavefrontWavefrontOutput
|
5
5
|
#
|
6
6
|
# Display query results in Wavefront wire format. We have to
|
7
7
|
# handle raw and normal output in different ways.
|
8
8
|
#
|
9
|
-
class Query < Base
|
9
|
+
class Query < WavefrontCsvOutput::Base
|
10
10
|
def _run
|
11
11
|
if options[:raw]
|
12
12
|
raw_output
|
@@ -28,6 +28,8 @@ module WavefrontWavefrontOutput
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def query_output
|
31
|
+
check_query_response
|
32
|
+
|
31
33
|
resp[:timeseries].each_with_object('') do |ts, a|
|
32
34
|
ts[:data].each do |point|
|
33
35
|
a.<< wavefront_format(ts[:label],
|
@@ -1 +1 @@
|
|
1
|
-
WF_CLI_VERSION = '2.15.
|
1
|
+
WF_CLI_VERSION = '2.15.2'.freeze
|
@@ -35,7 +35,7 @@ describe "#{word} command" do
|
|
35
35
|
|
36
36
|
cmd_to_call(word, 'installed', path: "/api/v2/#{word}/installed")
|
37
37
|
|
38
|
-
cmd_to_call(word, 'manifests', path: "/api/v2/#{word}/manifests")
|
38
|
+
cmd_to_call(word, 'manifests -f json', path: "/api/v2/#{word}/manifests")
|
39
39
|
|
40
40
|
invalid_ids(word, ["describe #{bad_id}", "install #{bad_id}",
|
41
41
|
"alert install #{bad_id}",
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wavefront-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.15.
|
4
|
+
version: 2.15.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Fisher
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-12-
|
11
|
+
date: 2018-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: docopt
|
@@ -243,7 +243,6 @@ files:
|
|
243
243
|
- lib/wavefront-cli/output/json.rb
|
244
244
|
- lib/wavefront-cli/output/ruby.rb
|
245
245
|
- lib/wavefront-cli/output/wavefront.rb
|
246
|
-
- lib/wavefront-cli/output/wavefront/base.rb
|
247
246
|
- lib/wavefront-cli/output/wavefront/query.rb
|
248
247
|
- lib/wavefront-cli/output/yaml.rb
|
249
248
|
- lib/wavefront-cli/proxy.rb
|