-
Notifications
You must be signed in to change notification settings - Fork 282
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
Unable to locate package on debian stretch #253
Comments
This is due to incompatible changes in how Salt renders Jinja in 2019.02 release. I guess many formulas including this one need to be patched. |
As discussed in our Slack/IRC/Matrix room, we've got a bit of a problem:
|
@vutny Tossed around a few more ideas in the discussion beyond the snippet quoted above. Tried quite a few different things. It appears that the only realistic solution, to cover until the time |
@myii I don't really understand why SaltStack and the community are marketing If we take a look at Jinja upstream docs, it's clearly stated the the filter is intended to use within HTML, not YAML (or SLS) at all. On the other hand, Salt provides their own serialization routines to use specially for SLS rendering: I found it obvious that the I think we could push it as a standard for outputting data structures inside Salt states. |
@vutny Thanks for your reply. Some of what I've got is from looking into things but most of it is from (discussions with) others.
You've already linked to the 2019.2 release notes above. Essentially, in terms of considering Jinja filters alone, then the upstream The example in that section prescribes using
I think this is an exceptionally important point you are raising. Having concrete examples of any serialisation issues would help form these justifications. However, I would be very surprised to find out that upstream SaltStack didn't run a battery of tests beforehand, to ensure that the
There are a number of points that need to be considered here, which I don't have the answers to:
One additional point about performance issues. We've been having extensive discussions about the problem with these formulas being heavily reliant on pillars -- which becomes the greatest load on Salt masters. So there's a lot of focus on how we can minimise performance costs in all aspects of our formulas.
I agree with you but not for the same reasons. For me, it's simply because there is no viable alternative right now. The only available solution at the current time is to use the As a side note, your viewpoints are excellent as always @vutny. A lot of decision-making discussions are taking place on our Slack/IRC/Matrix room. Please try to join us whenever you can -- it will help us steer in the right direction. |
@twistedjoe Sorry for hijacking your issue! You're not being ignored but due to this breaking change in In the meantime, do you mind testing with this to see if it works for you? postgres-formula/postgres/server/init.sls Line 20 in e7a309d
Please change this line to: - pkgs: {{ pkgs | json }} And then try again. Please let us know if that works for you. |
@myii plus the
|
TL;DRGuys, don't get me wrong, I'm totally happy with My motivation for the discussionI just got a habit to use Let it be a shell script for example. Having it encoded in JSON looks ugly when doing Things you need to aware of are quotes and backslashes, and especially when they're going together. I know it's bad idea to operate raw data in SLS files, sometimes there's no other choice. And since we usually merge Pillars with defaults, it could be anything by mistake or by purpose. @myii Regarding the code to support Salt's serialization, you could see dumb wrappers around Considering performance, since the default layer of Salt renderers are in use ( |
@vutny TL;DR: Didn't get you wrong at all, this feedback was welcome. You've raised important points that need to be considered.
I think we approach this from a similar viewpoint. I've used
Now this is an action point. I believe we could really benefit from collecting examples that cause breakages, both ways (i.e.
I only glanced over the serialisation code while also casting an eye over the new
This is where things get a little tricky. While that's the default, these formulas could end up being used in environments where that specifically is being avoided. YAML's idiosyncrasies are documented. Using Update: This discussion wouldn't be complete without linking to the available renderers. @aboe76 was mentioning (not seriously) |
@myii don't support |
@aboe76 This is it! The conversion to |
Here is link to comprehensive Eriksson-Halberg study of performance & syntax of JSON and YAML: One statement captures the essence of the problem... speed sacrifices robustness and visa versa.
See also http://summit.yaml.io/the-yaml-summit-wiki.html |
@myii Nah it's fine :p |
Switching to |
@twistedjoe Thanks for testing, I've sent through PR #254 to push through that fix. |
@vutny Just reporting back that I just got burnt by this as well -- but I did say that I've used So, this issue isn't going to go away any time soon. |
On debian stretch 9.6 if I run the postgres state with defaults, it crash on postgresql-server with
It works if i set the package name directly with:
pkg: 'postgresql-10'
pkg_client: 'postgresql-client-10'
The text was updated successfully, but these errors were encountered: