-
Notifications
You must be signed in to change notification settings - Fork 402
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
Refactor aws_ssm
display and verbosity-related methods
#2264
Refactor aws_ssm
display and verbosity-related methods
#2264
Conversation
Build succeeded. ❌ ansible-galaxy-importer FAILURE in 5m 28s (non-voting) |
Build failed. ❌ ansible-galaxy-importer FAILURE in 4m 04s (non-voting) |
Build succeeded. ❌ ansible-galaxy-importer FAILURE in 4m 29s (non-voting) |
f247096
to
12b3fde
Compare
12b3fde
to
eda3496
Compare
Build failed. ✔️ ansible-galaxy-importer SUCCESS in 3m 06s (non-voting) |
next(poll_gen) | ||
|
||
# Verify verbosity message contains remaining time | ||
mock_display.assert_called_with(4, "TEST remaining: 10 second(s)") |
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 figured it might be a good way to test verbosity_display()
by utilizing a method that calls verbosity_display()
, but maybe this is gonna cause more trouble than it's worth since the poll()
method might move in the future?
Build succeeded. ❌ ansible-galaxy-importer FAILURE in 5m 03s (non-voting) |
Build succeeded. ❌ ansible-galaxy-importer FAILURE in 8m 12s (non-voting) |
self._client = self._get_boto_client( | ||
"ssm", | ||
region_name=region_name, | ||
profile_name=profile_name, | ||
) | ||
|
||
def _display(self, f: Any, message: str) -> None: | ||
def verbosity_display(self, level: int, message: str) -> None: |
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.
The function docs say there's a default value of 1, but that's not represented in the function signature.
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.
Good catch! I meant to remove that default value from the docstring.
…d, update unit test
Build succeeded. ❌ ansible-galaxy-importer FAILURE in 5m 03s (non-voting) |
Build succeeded (gate pipeline). ❌ ansible-galaxy-importer FAILURE in 4m 56s (non-voting) |
a9a900a
into
ansible-collections:main
Backport to stable-9: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply a9a900a on top of patchback/backports/stable-9/a9a900a3d42d2c65b10d232d4387fec42174fb25/pr-2264 Backporting merged PR #2264 into main
🤖 @patchback |
…lections#2264) SUMMARY Resolves ACA-2239 Methods like self._vvvv, self._vvv, etc. have been refactored into a single method, including code from the _display() method. ISSUE TYPE Feature Pull Request COMPONENT NAME connection/aws_ssm Reviewed-by: Bianca Henderson <[email protected]> Reviewed-by: Bikouo Aubin Reviewed-by: Mike Graves <[email protected]> Reviewed-by: Rahmanim Benny <[email protected]> (cherry picked from commit a9a900a)
Backporting of this PR requires #2266 (a backport PR) to be merged first. |
Backport to stable-9: 💚 backport PR created✅ Backport PR branch: Backported as #2269 🤖 @patchback |
SUMMARY Resolves ACA-2239 Methods like self._vvvv, self._vvv, etc. have been refactored into a single method, including code from the _display() method. ISSUE TYPE Feature Pull Request COMPONENT NAME connection/aws_ssm Reviewed-by: Bianca Henderson <[email protected]> Reviewed-by: Bikouo Aubin Reviewed-by: Mike Graves <[email protected]> Reviewed-by: Rahmanim Benny <[email protected]> (cherry picked from commit a9a900a)
This is a backport of PR #2264 as merged into main (a9a900a). SUMMARY Resolves ACA-2239 Methods like self._vvvv, self._vvv, etc. have been refactored into a single method, including code from the _display() method. ISSUE TYPE Feature Pull Request COMPONENT NAME connection/aws_ssm Reviewed-by: Bikouo Aubin
SUMMARY
Resolves ACA-2239
Methods like
self._vvvv
,self._vvv
, etc. have been refactored into a single method, including code from the_display()
method.ISSUE TYPE
COMPONENT NAME
connection/aws_ssm