Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions bin/sam-translate.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
from samtranslator.translator.transform import transform
from samtranslator.yaml_helper import yaml_parse
from samtranslator.model.exceptions import InvalidDocumentException
from samtranslator.feature_toggle.feature_toggle import FeatureToggleLocalConfigProvider, FeatureToggle

LOG = logging.getLogger(__name__)
cli_options = docopt(__doc__)
Expand Down Expand Up @@ -98,15 +97,7 @@ def transform_template(input_file_path, output_file_path):
sam_template = yaml_parse(f)

try:
feature_toggle = FeatureToggle(
FeatureToggleLocalConfigProvider(
os.path.join(my_path, "..", "tests", "feature_toggle", "input", "feature_toggle_config.json")
),
stage=None,
account_id=None,
region=None,
)
cloud_formation_template = transform(sam_template, {}, ManagedPolicyLoader(iam_client), feature_toggle)
cloud_formation_template = transform(sam_template, {}, ManagedPolicyLoader(iam_client))
cloud_formation_template_prettified = json.dumps(cloud_formation_template, indent=1)

with open(output_file_path, "w") as f:
Expand Down
3 changes: 0 additions & 3 deletions samtranslator/feature_toggle/feature_toggle.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
)
from samtranslator.metrics.method_decorator import cw_timer

my_path = os.path.dirname(os.path.abspath(__file__))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we needed this before?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mndeveci See discussion here: #2076 (comment)

TLDR: Was due to the test script. Since this is clobbering things on customers machines, I removed feature_toggle from the test script. If we really need it there (which I don't think we do), we can find a different way to add it back.

sys.path.insert(0, my_path + "/..")

LOG = logging.getLogger(__name__)


Expand Down