Comments (4)
@jamesroutley thinking to rename to boto_parameter or boto_argument or call_argument something like that and moving the function to template class
from sceptre.
I think the reason we're having difficulty with this function name is because the function itself isn't very good.
The function does the following:
- Decide whether the cfn template should be uploaded to S3
- If it should, upload it to S3 and return a dictionary containing a key-value pair which happens to correspond to a keyword argument to a Boto3 function call (!)
- If not, return the a dictionary containing a key-pair ...
The function does different things (either returns the template location or the template itself), and returns a value which is highly coupled to the context of the function's invoker.
The reason that this function exists is that this logic happens multiple times in Stack()
(when creating, launching, validating and creating a change set). We are caught between two 'bad' practices: including a badly defined, tightly coupled function, or having repeated code.
There are a couple of things we could do:
- Leave the code as is, but give it a better name
- Remove the function and re-add the repeated code
- Rearchitect it in some way to solve the underlying problem
I think we should go for 1. or 2. for now, and maybe have a look at 3. when we're looking at the 2.0 stuff. @seanrankine thoughts on this so far?
from sceptre.
I don't think the function is necessarily bad - don't see any issue with it functionality. Its main goal to create the keyword argument for boto calls depending on how to handle the template body. Its just badly named.
Overall I was looking at moving validate_template to the template class as well, which also needs this function. So was going to move this function to template class as well.
I'll put in a PR and you can see what you think.
from sceptre.
Closed by #209.
from sceptre.
Related Issues (20)
- Autocompletion docs need updating for bash
- Stack outputs in stack groups hide the stack names HOT 5
- Unable to install Sceptre >= 4.0 since release of cython 3.0.0 HOT 15
- inheretance behavior of `profile` overrides child with parent config HOT 5
- Add a Makefile HOT 1
- Why does black use Python 3.10? HOT 2
- announcements to twitter (X) is broken HOT 4
- Document `j2_environment` `autoescape` setting to control Jinja2 escaping HOT 4
- Drop support for Python 3.7 HOT 4
- test_hook_writes_to_stderr failure "/bin/sh command not found" HOT 4
- Not enough values to unpack given a badly formatted stack ref
- Bug in hooks test on MacOS HOT 2
- Setup build workflow without secrets HOT 2
- Provide a formatted_yaml template handler HOT 1
- CI: make integration tests run faster HOT 5
- Stack differ raises AttributeError if a values is a bool
- Input parameters should be validated
- Cyclic dependencies should result in a clearer error message
- j2_environment extensions not available while generating config HOT 2
- List outputs is eating ExpiredToken messages and possibly others
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sceptre.