Skip to content
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

Merged
merged 10 commits into from
Feb 12, 2025
Merged

Use key manager merger into DEV #2985

merged 10 commits into from
Feb 12, 2025

Conversation

sgoggins
Copy link
Member

Description

  • ready for testing
  • Question: Is this ready for release testing (The Dev Branch?)

Ulincsys and others added 8 commits December 3, 2024 17:41
- 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]>
@@ -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

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

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}")

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))

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:

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):

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()

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()

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

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

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)

@Ulincsys Ulincsys merged commit 0e26d37 into dev Feb 12, 2025
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants