-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed IAMbic logger interference with Starfleet's
- The IAMbic logger was replacing the Starfleet logger. Mocked out the IAMbic logger so that Starfleet's logger remains the primary logger.
- Loading branch information
Mike Grima
committed
Nov 22, 2023
1 parent
0f7a779
commit 04ca447
Showing
3 changed files
with
24 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
"""File to handle the IAMbic imports. This is done to avoid logger issues. | ||
:Module: starfleet.worker_ships.plugins.iam.iambic_imports | ||
:Copyright: (c) 2023 by Gemini Trust Company, LLC., see AUTHORS for more info | ||
:License: See the LICENSE file for details | ||
:Author: Mike Grima <michael.grima@gemini.com> | ||
""" | ||
# pylint: disable=unused-import,wrong-import-position,wrong-import-order | ||
from unittest import mock | ||
|
||
from starfleet.utils.logging import LOGGER | ||
|
||
# Mock out the iambic logger, as it's bossy and overrides Starfleet's: | ||
mock.patch("iambic.core.logger.log", LOGGER).start() | ||
|
||
# Now continue to import the rest: | ||
from iambic.core.context import ctx as iambic_ctx # noqa: E402,F401 | ||
from iambic.core.models import Variable # noqa: E402,F401 | ||
from iambic.plugins.v0_1_0.aws.iam.role.models import AwsIamRoleTemplate # noqa: E402,F401 | ||
from iambic.plugins.v0_1_0.aws.models import AWSAccount # noqa: E402,F401 |
This file contains 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
This file contains 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