silence pylint warning about pika dep in tool#5380
Merged
cognifloyd merged 2 commits intoStackStorm:masterfrom Oct 6, 2021
Merged
silence pylint warning about pika dep in tool#5380cognifloyd merged 2 commits intoStackStorm:masterfrom
cognifloyd merged 2 commits intoStackStorm:masterfrom
Conversation
amanda11
approved these changes
Oct 6, 2021
Contributor
amanda11
left a comment
There was a problem hiding this comment.
LGTM, but could you also add a changelog entry,
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Every now and then, pylint gets upset about a
pikaimport intools/direct_queue_publisher.py. Here's a snippet from a GHA run in #5096 (NB: that PR does not touch any of these files, so fixing this in that PR doesn't make sense):https://github.com/StackStorm/st2/pull/5096/checks?check_run_id=3808812826#step:11:467
st2/tools/direct_queue_publisher.py
Line 21 in 8496bb2
I think it's weird that we're not consistently getting this error because pylint should be running on all the tools files:
st2/Makefile
Line 361 in f65f62f
This tool dates back to April 2016 (f6897d2) with this in the commit message:
Plus, from what I can tell, kombu doesn't offer a way to publish directly to a queue; it requires an exchange. So this tool has to use something other than kombu.
So, we can either delete this script or leave it around for possible future debugging. To leave it around, we should protect it such that pylint doesn't complain and anyone who tries to use it gets a helpful message about why it doesn't work. That's what I did in this PR.