-
Notifications
You must be signed in to change notification settings - Fork 850
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
Use key manager merger into DEV #2985
Conversation
Signed-off-by: Ulincsys <[email protected]>
Signed-off-by: Ulincsys <[email protected]>
- Add multiprocessing tests for publisher and client interfaces - Add platform and key list commands to publisher API - Add wait (IE: ACK) command to publisher API - Add more verbose logging - Remove redundant requests from expiration process - Update and expand documentation Signed-off-by: Ulincsys <[email protected]>
Signed-off-by: Ulincsys <[email protected]>
Signed-off-by: Ulincsys <[email protected]>
Signed-off-by: Ulincsys <[email protected]>
@@ -27,6 +29,7 @@ | |||
from augur.application.cli import test_connection, test_db_connection, with_database, DatabaseContext | |||
import sqlalchemy as s | |||
|
|||
from keyman.KeyClient import KeyClient, KeyPublisher |
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.
[pylint] reported by reviewdog 🐶
W0611: Unused KeyClient imported from keyman.KeyClient (unused-import)
@@ -25,6 +27,8 @@ | |||
from augur.application.cli import test_connection, test_db_connection, with_database, DatabaseContext | |||
from augur.application.cli._cli_util import _broadcast_signal_to_processes, raise_open_file_limit, clear_redis_caches, clear_rabbitmq_messages | |||
|
|||
from keyman.KeyClient import KeyClient, KeyPublisher |
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.
[pylint] reported by reviewdog 🐶
W0611: Unused KeyClient imported from keyman.KeyClient (unused-import)
|
||
self.stdout = conn | ||
self.stdin: PubSub = conn.pubsub(ignore_subscribe_messages = True) | ||
self.stdin.subscribe(f"{self.REQUEST}-{self.id}") |
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.
[pylint] reported by reviewdog 🐶
E1101: Instance of 'KeyClient' has no 'REQUEST' member (no-member)
kwargs["type"] = req_type | ||
kwargs["requester_id"] = self.id | ||
|
||
self.stdout.publish(self.REQUEST, json.dumps(kwargs)) |
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.
[pylint] reported by reviewdog 🐶
E1101: Instance of 'KeyClient' has no 'REQUEST' member (no-member)
|
||
msg = json.loads(reply["data"]) | ||
|
||
if "wait" in msg: |
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.
[pylint] reported by reviewdog 🐶
R1720: Unnecessary "else" after "raise", remove the "else" and de-indent the code inside it (no-else-raise)
] | ||
} | ||
|
||
def mp_consumer(platform): |
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.
[pylint] reported by reviewdog 🐶
W0621: Redefining name 'platform' from outer scope (line 62) (redefined-outer-name)
if platform not in keys: | ||
raise ValueError(f"Platform not valid for testing keys dict: {platform}") | ||
|
||
logger = AugurLogger(f"Keyman_test_consumer").get_logger() |
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.
[pylint] reported by reviewdog 🐶
W0621: Redefining name 'logger' from outer scope (line 69) (redefined-outer-name)
logger.setLevel(1) | ||
client = KeyClient(platform, logger) | ||
|
||
key = client.request() |
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.
[pylint] reported by reviewdog 🐶
W0621: Redefining name 'key' from outer scope (line 63) (redefined-outer-name)
from keyman.KeyClient import KeyClient, KeyPublisher | ||
from augur.application.logs import AugurLogger | ||
|
||
from multiprocessing import Process, current_process |
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.
[pylint] reported by reviewdog 🐶
W0611: Unused current_process imported from multiprocessing (unused-import)
from augur.application.logs import AugurLogger | ||
|
||
from multiprocessing import Process, current_process | ||
from subprocess import Popen, PIPE |
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.
[pylint] reported by reviewdog 🐶
W0611: Unused PIPE imported from subprocess (unused-import)
Description