-
Notifications
You must be signed in to change notification settings - Fork 84
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
Delete messages matching the given regex. Fixes #32 #33
Conversation
Would love to see this merged. Any ETA? @ibrahimcanyilmaz |
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.
.
@@ -54,4 +55,12 @@ if check_duplicate_msg == "true" | |||
end | |||
end | |||
|
|||
if delete_prev_regex_msg != nil | |||
coms.each do |n| |
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.
I believe it's possible for coms
to be nil
here (if check_duplicate_msg
is false
), making the script error out. Can someone have a look?
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.
Yeah. I'll fix it.
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.
Not sure if this the root but we are seeing an issue when we pass msg="something", check_for_duplicate_msg="false" and delete_prev_regex_msg="nil":
/entrypoint.sh:60:in
<main>': undefined method
each' for nil:NilClass (NoMethodError)
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.
@genevieve Oh; because those get passed in as strings - "false"
, and "nil"
, not actually false
and nil
. Which means that they're truthy. Removing the params entirely will give you actual nil/falsey values.
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.
Ah it's because we use the image in a github action so even though we pass false
or nothing, it will quote them before passing them as arguments to the docker command. Thanks, we'll drop them entirely.
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.
Actually, this is happening for us regardless of whether we rely on the defaults or not because of the way that the github action passes the values to the docker command. We weren't explicitly setting delete_prev_regex_msg
and it would pass in "nil"
.
No description provided.