-
-
Notifications
You must be signed in to change notification settings - Fork 881
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
Convert some templates to EPP #1568
Conversation
Those contexts were checking for different data types while ago (integer, string)
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 played around with this a bit and I wrote https://gist.github.com/ekohl/28443e6ba178c931bb69285e976568eb. It's not perfect, but it gets you a long way. The biggest thing to be aware of is that you need to change if x
into if x {
, but it converts end
into }
already as well as @x
into $x
. I'd suggest to give it a try and see.
Conversion is mostly completed. Need to recheck whitespace differences though. Will work on this later. |
b5e7e66
to
1e5fa36
Compare
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.
Looks like you forgot to add templates/prepend_append.epp
😉
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.
Impressive! I just spot a tiny worrying bit.
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.
Feel free to ignore my suggestions. They're aimed at making the template even easier.
I notice 1.15.0 is used quite often in these templates which made me check, but sadly Debian 10 still uses nginx 1.14.2.
All suggestions looks reasonable.. I guess I'll implement it this Friday |
bad5572
to
bc8e31b
Compare
Optional[Variant[Array, String]] $raw_prepend = undef, | ||
Optional[Variant[Array, String]] $raw_append = undef, | ||
Optional[Hash] $mailhost_cfg_prepend = undef, | ||
Optional[Hash] $mailhost_cfg_append = undef, |
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'm fine with merging this, but should we mark it as backwards-incompatible because of the type changes?
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.
Good question, as far as I am concerned, it looks like the previous data types where too relaxed and allowed to provide configuration that would cause nginx to fail to start. Existing valid config should still be valid so I would not mark it as backwards incompatible, and if we find some corner cases that used to be valid and are now broken, we can quickly issue a new patch release to fix these.
No description provided.