[NOT PUBLISHED BUT IN OPS PROD] - handle not_in_channel issue #10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello @bcorne
Itiviti/simple-slack-api#152 is occurring on Itiviti/Ullink Ops bot as well
Basically when the bot is not present on a channel which is however flagged in the DB as a channel listening to the project https://github.com/Itiviti/slack4gerrit/blob/master/src/main/java/jobs/PublishMessageJob.java#L98 (might happen if the bot was removed from the channel...), then it does not post anything to Slack and logs this error "java.lang.ClassCastException: com.ullink.slack.simpleslackapi.replies.SlackReplyImpl cannot be cast to com.ullink.slack.simpleslackapi.replies.SlackMessageReply", which is meaningless indeed, when calling line https://github.com/Itiviti/slack4gerrit/blob/master/src/main/java/jobs/PublishMessageJob.java#L109
I did this local workaround inspired from the comments here (many thanks @centic9 ) but we would probably need a more robust way of handling this pb (with some explicit logging / slack msg)
Many thx