-
Notifications
You must be signed in to change notification settings - Fork 38
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
Fixes #7461: classes_* methods should refuse to copy classes to a prefix which is an empty string #272
Conversation
@@ -37,9 +37,10 @@ bundle agent test | |||
"ph2" usebundle => file_ensure_lines_absent("${init.file}", "sample one"); # should get success | |||
"ph3" usebundle => file_ensure_lines_absent("/dev/zero", "sample three"); # should get failed | |||
|
|||
"ph1" usebundle => _classes_copy("file_ensure_lines_absent_${init.file_canon}","global_classA"); | |||
"ph2" usebundle => _classes_copy("file_ensure_lines_present_${init.file_canon}","global_classB"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you change the ordering ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the original ordering made no sense. Now, the order matches the order of the calls above.
…fix which is an empty string
PR updated |
80690bf
to
db3c3d0
Compare
Good, merging |
…d_refuse_to_copy_classes_to_a_prefix_which_is_an_empty_string Fixes #7461: classes_* methods should refuse to copy classes to a prefix which is an empty string
@@ -38,6 +39,10 @@ bundle agent _classes_success(class_prefix) | |||
"local_${suffix}" | |||
string => "${class_prefix}_${suffix}", | |||
classes => always("${class_prefix}_${suffix}"); | |||
|
|||
classes: | |||
"destination_exists" not => strcmp("${class_prefix}", ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't it report a warning if an empty string is passed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In master we use this property in every generic method so that calls don't fail when this.caller_promisers doesn't exist. So it could be a warning, but not in the general case.
https://www.rudder-project.org/redmine/issues/7461