-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
add support for Fn::Tranform in CFnV2 #12966
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
base: main
Are you sure you want to change the base?
Conversation
Test Results (amd64) - Integration, Bootstrap 5 files 5 suites 35m 21s ⏱️ For more details on these failures, see this check. Results for commit 28fef89. ♻️ This comment has been updated with latest results. |
LocalStack Community integration with Pro 2 files ± 0 2 suites ±0 25m 10s ⏱️ - 1h 19m 18s For more details on these failures, see this check. Results for commit 28fef89. ± Comparison against base commit c1d19e2. This pull request removes 4072 tests.
♻️ This comment has been updated with latest results. |
a85bc97
to
aae7310
Compare
|
||
if intrinsic_function == FnTransform: | ||
if scope.count(FnTransform) > 1: | ||
raise RuntimeError("Nested Fn::Transforms are bad") |
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.
"are bad"! I like that error message!
But seriously... let's change that before we merge
if scope.count(FnTransform) > 1: | ||
raise RuntimeError("Nested Fn::Transforms are bad") | ||
|
||
path = "$" + ".".join(scope.split("/")[:-1]) |
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 do quite like the idea of making this implementation a helper on the Scope
class, e.g.
class Scope(str):
# ...
def to_jsonpath(self) -> str:
return "$" + ".".join(self.split("/"))
perhaps even adding a .parent
property if we know we need to traverse up the tree
class Scope(str):
# ...
@property
def parent(self) -> Self:
return Scope(self._SEPARATOR.join(self.split(self._SEPARATOR)[:-1]))
or something
ebe637a
to
0eee9ce
Compare
Motivation
Changes