fluentd 0.10.54 → 0.10.55

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of fluentd might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a362e48a2716bb0892c742fd3e1a3ba78c943c80
4
- data.tar.gz: 4bebdc013320b9e06be09fa93b52e83e95ee814f
3
+ metadata.gz: 8f6c7392b51882506144d22dbef860923ca396a8
4
+ data.tar.gz: 57b91cf45454978c20ae3a497502c2b41580d29d
5
5
  SHA512:
6
- metadata.gz: a67253d1567eb3f934d2740271c3e1355a1df08b0638809e5add6b9e739f1f99aee1fa27896f9aac798c659f5dc7ce38f943654c5299a8af63ca679c3158f260
7
- data.tar.gz: f32dd1c438f4a6f0598182d0a26d712f05cd1782a3eeebad4d32026529668e8212b4cf0269361646c440b1b3cae8e0e5b46b89cff8e2ba4e7334e42a819953af
6
+ metadata.gz: 09247456a29976eec30ca20b77f69bc5179a82fdbe1052133234e7b926bb8fd403bf951ea478d0fc0a9f4ba54cbfded565bf653717b350178ada538c08baac6c
7
+ data.tar.gz: 8f9dd61a23a67c4e90b937cdfa5d7ed881f54853ae1fe9b942f0b19e648472f8714d394af6ed21e5848b9a0a245af86974d55a28760da3c759a5e3eadf7ad671
data/ChangeLog CHANGED
@@ -1,3 +1,7 @@
1
+ Release 0.10.55 - 2014/10/17
2
+
3
+ * config: Relax '@' handling in the plugin configuration for backward compatibility
4
+
1
5
  Release 0.10.54 - 2014/10/17
2
6
 
3
7
  * config: Change v1's non-quoted string literal behaviour to v0's behaviour
@@ -49,6 +49,8 @@ module Fluent
49
49
  return root
50
50
  end
51
51
 
52
+ ELEM_SYMBOLS = ['match', 'source', 'filter', 'system']
53
+
52
54
  def parse_element(root_element, elem_name, attrs = {}, elems = [])
53
55
  while true
54
56
  spacing
@@ -107,7 +109,12 @@ module Fluent
107
109
  parse_include(attrs, elems)
108
110
  else
109
111
  if k.start_with?('@')
110
- parse_error! "'@' is reserved prefix. Don't use '@' in parameter name"
112
+ if root_element || ELEM_SYMBOLS.include?(elem_name)
113
+ parse_error! "'@' is the system reserved prefix. Don't use '@' prefix parameter in the configuration: #{k}"
114
+ else
115
+ # TODO: This is for backward compatibility. It will throw an error in the future.
116
+ $log.warn "'@' is the system reserved prefix. It works in the nested configuration for now but it will be rejected: #{k}"
117
+ end
111
118
  end
112
119
 
113
120
  v = parse_literal
@@ -1,5 +1,5 @@
1
1
  module Fluent
2
2
 
3
- VERSION = '0.10.54'
3
+ VERSION = '0.10.55'
4
4
 
5
5
  end
@@ -154,8 +154,39 @@ module Fluent::Config
154
154
  end
155
155
  end
156
156
 
157
- test "rejects @ prefix in parameter name" do
158
- assert_parse_error(' @k v')
157
+ data(
158
+ "in match" => %[
159
+ <match>
160
+ @k v
161
+ </match>
162
+ ],
163
+ "in source" => %[
164
+ <source>
165
+ @k v
166
+ </source>
167
+ ],
168
+ "in filter" => %[
169
+ <filter>
170
+ @k v
171
+ </filter>
172
+ ],
173
+ "in top-level" => ' @k v '
174
+ )
175
+ def test_rejects_at_prefix_in_the_parameter_name(data)
176
+ assert_parse_error(data)
177
+ end
178
+
179
+ data(
180
+ "in nested" => %[
181
+ <match>
182
+ <record>
183
+ @k v
184
+ </record>
185
+ </match>
186
+ ]
187
+ )
188
+ def test_not_reject_at_prefix_in_the_parameter_name(data)
189
+ assert_nothing_raised { parse_text(data) }
159
190
  end
160
191
  end
161
192
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluentd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.54
4
+ version: 0.10.55
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sadayuki Furuhashi