Skip to content

Commit f1442be

Browse files
CHANGELOG: add changes for v1.12.0
1 parent 2e60923 commit f1442be

File tree

1 file changed

+128
-0
lines changed

1 file changed

+128
-0
lines changed

CHANGELOG.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,131 @@
1+
## 1.12.0 (January 22, 2025)
2+
3+
### FEATURES:
4+
5+
* core: add support for a DAG-based evaluation on locals and datasources.
6+
A long-standing odditiy of Packer has been the order of evaluation for
7+
locals and data sources. In previous versions of Packer, the
8+
data sources were evaluated first, then the local variables were, making
9+
it impossible to have a datasource that referenced a local variable as
10+
part of its configuration.
11+
This change introduces a Directed Acyclic Graph (DAG) to evaluate those
12+
resources, instead of the phased approach of old, which makes the order
13+
of evaluation not dependent on the type of resource, but instead of the
14+
detected dependencies between them.
15+
**Note**: While we are confident this should be robust enough for general
16+
use, we do recognise that it is possible some users might encounter issues.
17+
To give those users a way to continue using the old evaluation method, we
18+
introduced a `-use-sequential-evaluation` command-line flag to the build,
19+
validate, console and inspect subcommands, to force using the sequential
20+
evaluation approach for those entities.
21+
[GH-13155](https://github.com/hashicorp/packer/pull/13155)
22+
23+
* core/hcp: support for uploading SBOMs to HCP Packer.
24+
Software Bill of Materials (SBOM) are a standardised way to export the various
25+
software packages linked to an artifact. As some users have expressed a
26+
need to produce and access those for images they build, we now add the
27+
feature to Packer itself.
28+
While the generation of the SBOM itself is not done directly by
29+
Packer, instead we recommend using known scanners to produce them, we add
30+
the capacity to upload this SBOM file to HCP Packer, and link it to a
31+
build artifact.
32+
[GH-13171](https://github.com/hashicorp/packer/pull/13171)
33+
34+
* core: support for alternate serialisation formats for plugin communication.
35+
Packer relies on plugins to do most of the actual workload related to
36+
building and provisioing artifacts, while Packer is mostly an orchestrator
37+
for those plugins to perform their work.
38+
This separation of concerns implies that both entities have to
39+
communicate on multiple occasions during the course of a build.
40+
Before v1.12.0 of Packer, and v0.6.0 of the plugin SDK, we used Gob to
41+
do most of the serialisation for those steps.
42+
This is however a bit of a problem recently, as go-cty, the library we
43+
use for dynamic objects lifted from HCL templates, dropped support for
44+
this a while back.
45+
Therefore now, we introduce an alternative: protobuf/msgpack, which are
46+
both usable and maintained by the projects around Packer, so we can begin
47+
our transition away from gob with this change.
48+
**Note**: as with the introduction of the DAG for locals/datasources, this
49+
is a feature that we are reasonably confident you will not encounter bugs
50+
with, however we cannot rule-out this possibility, therefore we introduce
51+
a new environment variable: `PACKER_FORCE_GOB`, which if set to '1', forces
52+
the use of Gob instead of protobuf/msgpack.
53+
[GH-13120](https://github.com/hashicorp/packer/pull/13120)
54+
55+
### IMPROVEMENTS:
56+
57+
* hcl2/json: add `aws_secretsmanager_raw` funcion.
58+
When using the AWS secretsmanager function with a non-text secret, one could
59+
only get a secret once at a time.
60+
This could get cumbersome if wanting to get multiple through one request,
61+
which led people to encode their JSON/Object secrets as a big base64
62+
encoded string that they could get once, and then manipulate through JSON
63+
functions.
64+
While the workaround works, it is one extra layer of manipulations to do so,
65+
therefore a new function to always get the raw textual version of a secret
66+
is now added to Packer.
67+
[GH-13242](https://github.com/hashicorp/packer/pull/13242)
68+
* hcl2: add `alltrue` and `anytrue` functions.
69+
As with Terraform, Packer now supports the HCL functions `alltrue` and
70+
`anytrue`, which returns whether or not a collection only consists of
71+
`true` values, or if any is.
72+
[GH-13237](https://github.com/hashicorp/packer/pull/13237)
73+
* hcl2: add `strcontains` function.
74+
As with Terraform, Packer now supports the HCL function `strcontains`,
75+
which returns whether or not a string contains a substring within it.
76+
[GH-13217](https://github.com/hashicorp/packer/pull/13217)
77+
[GH-13222](https://github.com/hashicorp/packer/pull/13222)
78+
* datasource/http: Support other methods than GET.
79+
The HTTP datasource used to always use GET requests for getting data
80+
from a remote HTTP server, which was not always enough since some endpoints
81+
may only support other methods. This change allows for most of the HTTP
82+
methods to perform those requests.
83+
[GH-13190](https://github.com/hashicorp/packer/pull/13190)
84+
* hcl2: add `base64gzip` function.
85+
In some cases, small blobs may need to be kept in memory, and injected in
86+
a template somewhere else, but if the blob needs to be minimised, the
87+
base64gzip function can be invoked to compress the blob and expose it
88+
as a valid HCL2 string for use later.
89+
[GH-13142](https://github.com/hashicorp/packer/pull/13142)
90+
91+
### BUG FIXES:
92+
93+
* hcl2: Fix duplicate error messages on top-level HCL violations.
94+
A parsing quirk for HCL templates caused Packer to produce the same parsing
95+
error multiple times if the error was caused by a top-level violation.
96+
[GH-13245](https://github.com/hashicorp/packer/pull/13245)
97+
* build: Include LC_UUID in Darwin binaries.
98+
A change in how Apple authorises a plugin to access the network caused
99+
Packer to break on recent (14.7 and above) macOS versions, as Packer uses
100+
the local network to communicate with plugins.
101+
The fix is to include an additional UUID into the metadata of the produced
102+
binary, so it is authorised by macOS to use the local network, which prompts
103+
an update to the version of Go used for building Packer (1.22.9), as it is
104+
when this addition is supported by an LDFLAG.
105+
[GH-13214](https://github.com/hashicorp/packer/pull/13214)
106+
* hcl2: Don't error on empty bucker slug.
107+
As reported by members of our community, using a hcp_packer_registry
108+
block without a bucket slug, even if provided by external means, would cause
109+
Packer to fail with an invalid bucket slug error. This is most definitely
110+
a bug, which is addressed in this release.
111+
[GH-13210](https://github.com/hashicorp/packer/pull/13210)
112+
* hcp: fix bug when trying to extract HEAD SHA from empty Git repo.
113+
[GH-13165](https://github.com/hashicorp/packer/pull/13165)
114+
115+
### SECURITY:
116+
117+
* Bump to go-crypto v0.31.0
118+
[GH-13233](https://github.com/hashicorp/packer/pull/13233)
119+
120+
### NOTES:
121+
122+
* docs: fix UUIDv4 example. A community user has found discrepancies in the
123+
UUIDv4 examples which were used in our docs, as they do not match the
124+
standard.
125+
[GH-13229](https://github.com/hashicorp/packer/pull/13229)
126+
* hcl2: fix slice initialisation method during variable evaluation phase.
127+
[GH-13175](https://github.com/hashicorp/packer/pull/13175)
128+
1129
## 1.11.2 (July 30, 2024)
2130

3131
### FEATURES

0 commit comments

Comments
 (0)