Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dsl: Need '@' prefix for reserved system parameters. fix #2028 #2034

Merged
merged 5 commits into from
Jun 26, 2018

Conversation

repeatedly
Copy link
Member

Signed-off-by: Masahiro Nakagawa repeatedly@gmail.com

Signed-off-by: Masahiro Nakagawa <repeatedly@gmail.com>
@@ -22,6 +22,8 @@
module Fluent
module Config
module DSL
SYSTEM_PARAM = [:type, :id, :log_level] # Add '@' prefix to avoid deprecation message
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@cosmo0920 cosmo0920 Jun 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any chance to handle label, too?

diff --git a/lib/fluent/config/dsl.rb b/lib/fluent/config/dsl.rb
index c315a3f1..c8a0bb78 100644
--- a/lib/fluent/config/dsl.rb
+++ b/lib/fluent/config/dsl.rb
@@ -22,7 +22,7 @@ require 'fluent/config/element'
 module Fluent
   module Config
     module DSL
-      SYSTEM_PARAM = [:type, :id, :log_level] # Add '@' prefix to avoid depreca
tion message
+      SYSTEM_PARAM = [:type, :id, :log_level, :label] # Add '@' prefix to avoid
 deprecation message
 
       module Parser
         def self.read(path)

can handle label parameter with the following configuration:

source {
  type :forward
  label :"@forward"
}

label('@forward') {
  filter('**') {
    type :stdout
  }

  match('**') {
    type :null
  }
}

Signed-off-by: Masahiro Nakagawa <repeatedly@gmail.com>
Signed-off-by: Masahiro Nakagawa <repeatedly@gmail.com>
@repeatedly
Copy link
Member Author

Applied reviews.

@cosmo0920
Copy link
Contributor

Some tests are failed: https://travis-ci.org/fluent/fluentd/jobs/396700315#L554

We should resolve testcase failures before merging this PR.

Signed-off-by: Masahiro Nakagawa <repeatedly@gmail.com>
Copy link
Contributor

@cosmo0920 cosmo0920 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except for still failing test.
https://travis-ci.org/fluent/fluentd/jobs/396706505#L554

Signed-off-by: Masahiro Nakagawa <repeatedly@gmail.com>
@repeatedly repeatedly merged commit ee9c9e5 into master Jun 26, 2018
@repeatedly repeatedly deleted the dsl-fix-warning-for-reserved-parameter branch June 26, 2018 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants