Update hairyhenderson/gomplate Docker tag to v4 #176
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v3.9.0-alpine
->v4.3.0-alpine
Release Notes
hairyhenderson/gomplate (hairyhenderson/gomplate)
v4.3.0
Compare Source
Features
Bug Fixes
Documentation
Dependencies
v4.2.0
Compare Source
Features
Bug Fixes
Documentation
--exclude-processing
(#2238) (52abefa)Dependencies
v4.1.0
Compare Source
Features
Bug Fixes
Documentation
Dependencies
v4.0.0
Compare Source
v4.0.0
🥳 It's finally here! Welcome to gomplate v4.0.0! This release is a major release, with breaking changes. Read on for more details...
Probably the most important feature that's evolved in gomplate over the years is its support for reading and parsing data from a variety of sources. Using URLs to specify where to find data has proven to be quite flexible, and has allowed for a lot of different data sources to be supported.
In early 2021, I took what I had learned from supporting all of these different data sources, and I created a new module called
go-fsimpl
, which provides a number of Go filesystem implementations that can be used with Go's filesystem interfaces.My goal with
go-fsimpl
was always to use it in gomplate, and now that it's data source support has reached parity with gomplate, it's time to make the switch! As a result, and becausego-fsimpl
presents a much more consistent and unified approach to data sources, I've had to drop support for one data source, and in fixing some inconsistencies in how URLs have been handled by some of the data sources, I've had to make some breaking changes there as well.Breaking changes
Dropped support for the BoltDB data source
Support for the
boltdb
URL scheme has been removed. The implementation was never very robust, and I'm not aware of anyone using it. It had some unique quirks that would have made it quite difficult to support ingo-fsiml
as-is, so I've decided to drop it.No more
slim
binariesThe
slim
binaries were deprecated in v3.11, and will no longer be produced.Stricter URL handling
Subpaths are now always relative URLs
When using the
datasource
function with a subpath (second argument), the subpath has previously been intepreted by some data sources as a simple addition to the URL, and by others as a relative URL to be interpreted relative to the data source's base URL (as specified by the--datasource
flag).Now, all data sources will interpret the subpath as a relative URL, and will resolve it relative to the data source's base URL. This means that, given a base URL of
git+https://github.com/hairyhenderson/gomplate//random
and a subpath ofrandom.go
, the resulting URL will begit+https://github.com/hairyhenderson/gomplate//random.go
. To correct this, make sure that base URLs end with a trailing slash when the last component is a directory.Also, if the subpath begins with a slash, it will be interpreted as an absolute path, and will replace the base URL's path. For example, given a base URL of
git+file:///tmp/repos//myrepo/
and a subpath of/myfile.txt
, the resulting URL will begit+file:///myfile.txt
. To correct this, make sure that subpaths don't begin with a slash. Note that for the special//
separator indicating the separation between a Git repository and the path within, a subpath should now begin with.//
rather than//
.This affects at least the
git
andfile
data sources.Directories in datasource URLs must end with a slash
Previously, some data sources would assume URLs that end without a trailing slash are directories, and relative lookups would be performed within that directory. This was inconsistent with how URLs are normally interpreted, and could lead to unexpected results.
Now, all data sources will always interpret URLs without a trailing slash as files, and relative lookups will be performed within the parent directory of the URL.
For example, given a base URL of
vault:///secret
and a subpath offoo
, the resulting URL will bevault:///foo
. To correct this, make sure that base URLs end with a trailing slash when the last component is a directory.Consistent data values
The
aws+smp
data source previously returned the AWS output object, with both metadata and data. Users needed to reference theValue
field to get the actual data. Now, theaws+smp
data source will return the data directly.The
consul
data source supports directory semantics, but previously returned all the data as a JSON array of key/value pair objects. Now, theconsul
data source will return directory listings like all other data sources, as a JSON array of strings (the names of the keys).Vault app-id authentication support removed
Support for the Vault "app-id" authentication method has been removed. This method was deprecated in Vault 0.6.1, and removed in Vault 1.13. If you're still using this method, you must switch to a different authentication method. Consider the "approle" method as a similar replacement.
The
suppressEmpty
behaviour is now always enabledIn previous versions of gomplate, output that consist only of whitespace would by default still be written to files, with the
suppressEmpty
flag orGOMPLATE_SUPPRESS_EMPTY
environment variable being required to suppress this behaviour.Now, this behaviour is always enabled, and the
suppressEmpty
flag andGOMPLATE_SUPPRESS_EMPTY
environment variable have been removed.Log message formatting changes
A new logging framework is now in use (the standard library's
log/slog
package), and so error and debug (--verbose
) messages will appear differently (different colours for the console format, and key/value pairs may are sorted differently).Functions returning errors instead of quietly returning 0 on invalid input
Instead of quietly returning
0
, a number of functions in theconv
namespace will now return an error if the input is invalid.This includes:
conv.ToInt64
,conv.ToInt
,conv.ToInt64s
,conv.ToInts
,conv.ToFloat64
,conv.ToFloat64s
,conv.ParseInt
,conv.ParseFloat
,conv.ParseUint
,conv.Atoi
Because these functions are used by some other functions, this introduces stricter input validation for these functions:
coll.Flatten
crypto.PBKDF2
,crypto.Bcrypt
,crypto.RSAGenerateKey
,crypto.EncryptAES
,crypto.DecryptAES
,crypto.DecryptAESBytes
math.Abs
,math.Add
,math.Mul
,math.Sub
,math.Div
,math.Rem
,math.Pow
,math.Seq
,math.Max
,math.Min
,math.Ceil
,math.Floor
,math.Round
net.CIDRHost
,net.CIDRSubnets
,net.CIDRSubnetSizes
random.ASCII
,random.Alpha
,random.AlphaNum
,random.String
,random.Number
,random.Float
regexp.FindAll
,regexp.Split
strings.Abbrev
,strings.WordWrap
time.Nanosecond
,time.Microsecond
,time.Millisecond
,time.Second
,time.Minute
,time.Hour
Functions in the
regexp
namespace now return errors instead of panickingPreviously, the
regexp.Match
andregexp.Replace
functions would panic if the regular expression was invalid. Now, they will return an error instead.Removed functions
The following functions have been removed:
conv.Dict
,conv.Slice
,conv.Has
- These have been deprecated since v3.2.0 and have been replaced withcoll.Dict
,coll.Slice
, andcoll.Has
.Deprecations
See the deprecation policy.
slice
alias forcoll.Slice
(usecoll.Slice
instead)net.Parse*
functions which produced values from theinet.af/netaddr
module have been deprecated and replaced with functions using the Go standard library'snet/netip
package:net.ParseIP
(usenet.ParseAddr
instead)net.ParseIPPrefix
(usenet.ParsePrefix
instead)net.ParseIPRange
(usenet.ParseRange
instead)AWS_META_ENDPOINT
environment variable for overriding the IMDS endpoint inaws
functions has been deprecated in favor of the AWS-nativeAWS_EC2_METADATA_SERVICE_ENDPOINT
. This will be removed in a later v4 minor release (i.e. not in v4.0.0, but before v5).staticcheck
will help you find these in your code if you're using gomplate as a module. Follow the instructions in the deprecation comments to find out what to use instead.Thanks
Plenty of people have contributed to gomplate by filing issues, suggesting new features, or submitting pull requests. I'd like to especially thank the following people for submitting pull requests in this release:
Be sure to also check out the multi-platform Docker images available at
hairyhenderson/gomplate
.If you've gained value out of gomplate and want to find a way to encourage development, please consider sponsoring gomplate!
v4.0.0 (2024-06-18)
Full Changelog (since v3.11)
Changes since v4.0.0-pre-3
Release Notes
New features and changes
funcs
package tointernal/funcs
--exclude-processing
optioncoll.Pick
now supports slice of strings as inputdata.Data
type with a datasource registrystrings.Indent
to error on bad inputRunTemplates
function and oldConfig
typeConfig
type and updatedRun
function and other API functionsregexp
functionsconv.*
functionstype
query parameter name withGOMPLATE_TYPE_PARAM
environment variableNew functions
Ed25519
- thanks to @horvski!semver
functions - thanks to @wuhuizuo!coll.Index
functioncoll.JQ
using gojq library - thanks to @ahochsteger!strings.SkipLines
functioncoll.GoSlice
and deprecateslice
aliascoll.Set
andcoll.Unset
functionsBug fixes
strings.Title
not lowercase acronyms - thanks to @zregvart!Documentation fixes/updates
index
supports nested keys - thanks to @isavcic!index
and.
coll.GoSlice
example (fixes #1517)//
are a good ideaMisc. internal contributions
t.Setenv
to set env vars in tests - thanks to @Juneezee!github.com/Masterminds/semver
togithub.com/Masterminds/semver/v3
- thanks to @wuhuizuo!v3.11.7
Compare Source
What's Changed
Full Changelog: hairyhenderson/gomplate@v3.11.6...v3.11.7
v3.11.6
Compare Source
What's Changed
Full Changelog: hairyhenderson/gomplate@v3.11.5...v3.11.6
v3.11.5
Compare Source
What's Changed
Full Changelog: hairyhenderson/gomplate@v3.11.4...v3.11.5
v3.11.4
Compare Source
What's Changed
Full Changelog: hairyhenderson/gomplate@v3.11.3...v3.11.4
v3.11.3
Compare Source
This is a very minor patch release to update a dependency that's causing gomplate to trigger vulnerability scanners for CVE-2022-27664.
To the best of my understanding gomplate is not vulnerable, as it doesn't expose any HTTP servers - this patch release is purely to help vulnerability scans pass!
What's Changed
Full Changelog: hairyhenderson/gomplate@v3.11.2...v3.11.3
v3.11.2
Compare Source
Another patch release to allow gomplate to be compiled with Go 1.19.
What's Changed
Full Changelog: hairyhenderson/gomplate@v3.11.1...v3.11.2
v3.11.1
Compare Source
Just a simple patch release to fix a bug that prevented the
go install
installation method.What's Changed
Full Changelog: hairyhenderson/gomplate@v3.11.0...v3.11.1
v3.11.0
Compare Source
👋 Welcome to another gomplate release! Once more, a number of bug fixes and new
features. Thanks to the community, gomplate is now available via
MacPorts as well!
Thanks
Plenty of people have contributed to gomplate by filing issues, suggesting new
features, or submitting pull requests. I'd like to especially thank the
following people for submitting pull requests in this release:
Deprecations
I'm starting to work on gomplate v4, the next major release (with breaking
changes). In preparation for this, I'm listing some features as deprecated (see
the deprecation policy). Note that some of these may have been
deprecated for a while, but I'd like to call them out explicitly here.
datasource is now deprecated (see this discussion),
and will be removed in v4.0.0.
slim
binaries are deprecated, and will no longer be produced startingwith v4.0.0.
strings.Sort
(usecoll.Sort
instead)conv.Dict
(usecoll.Dict
instead)conv.Slice
(usecoll.Slice
instead)conv.Has
(usecoll.Has
instead)conv.Bool
(useconv.ToBool
instead)based form is now available. This will be removed in v4.
Be sure to also check out the multi-platform Docker images available at
hairyhenderson/gomplate
.If you've gained value out of gomplate and want to find a way to encourage development, please consider sponsoring gomplate!
v3.11.0 (2022-06-12)
Full Changelog
Release Notes
New features and changes
gomplate.Renderer
API is available for rendering templates programmatically. This should be of interest for developers wishing to use gomplate as a library. See the Go docs for examples.file:
URL scheme is supported. The full set of datasource URL schemes will be supported in a future release.templates
config option, and deprecates the previous format. See the docs fortemplates
for more information.break
, andcontinue
.New functions
crypto.ECDSAGenerateKey
crypto.ECDSADerivePublicKey
tmpl.Path
tmpl.PathDir
net
namespace for working with networks in CIDR notation - thanks to @bartoszj for the contribution!net.CIDRHost
net.CIDRNetmask
net.CIDRSubnets
net.CIDRSubnetSizes
crypto.SHA*
, but returns raw bytes instead of strings)crypto.SHA*Bytes
crypto.EncryptAES
crypto.DecryptAES
listDatasources
function - thanks to @jeevansai502 for the contribution!Bug fixes
JSON
andYAML
functions where escaped forward slashes (\/
) were not being correctly interpretedstrings.Title
to handle unicode punctuation (moves to alternate implementation after Go 1.18 deprecated the standard library function)strings.Indent
would not work correctly when a new-line character is used (now disallowed)aws+sm
datasource will now correctly read a secret written as binary (SecretBinary
) rather than a string (SecretString
)Documentation fixes/updates
inputDir
is read recursivelyslim
binary, and update the Go install instructions for recent Go versionsconv.URL
: Add example of how to redact the passwordtime.Now
: Add example of how to useTime.IsDST
strings.Split
: More examples to clarify how to usestrings.Split
- thanks to @karlschriek for the contribution!v3.10.0
Compare Source
🥳 It's high time for another gomplate release! This release contains quite a few
bug fixes and improvements.
Some packaging updates:
darwin-arm64
) platform!Be sure to also check out the multi-platform Docker images available at
hairyhenderson/gomplate
.If you've gained value out of gomplate and want to find a way to encourage development, please consider sponsoring gomplate!
v3.10.0 (2021-09-24)
Full Changelog
Release Notes
New features and changes
conv.ToInt
now returns-1
instead of overflowing on 32-bit systems to protect against CWE-190 and CWE-681crypto.RSAGenerateKey
function now enforces a minimum key size of 2048 bits to protect against CWE-326.darwin-arm64
binaryNew functions
net.ParseIP
,net.ParseIPPrefix
,net.ParseIPRange
Bug fixes
master
(fixes #1049)CONSUL_HTTP_ADDR
parsing (fixes #1209)random
functions--input-dir=.
(found in #1081)k8s.io/client-go
to valid semver (fixes #1061)Documentation fixes/updates
files.IsDir
typo in doc example (fixes #1133)Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.