packer/packer_test
Lucas Bajolet 4cd7ad4721
hcl2template: err on malformed local/data dep (#13340)
* hcl2template: err on malformed local/data dep

When introducing the DAG for locals and datasources, we forgot to handle
one limit case: if a dependency for a local or data is malformed, we
didn't check that a vertex was associated to it, leading to the final
DAG being malformed, and the DAG library would crash in this case.

This commit fixes this problem by checking that the dependency does
exist before attempting to add it to the graph as an edge for a vertex,
so that it is reported accurately, and do that Packer doesn't crash.

* error message change

---------

Co-authored-by: anshul sharma <anshul.sharma@hashicorp.com>
2025-06-17 09:22:09 +05:30
..
common Bump /x/net and /x/crypto in plugin tester and main go.mod 2025-05-01 15:01:00 -07:00
core_tests packer_test: make PluginTestDir a structure 2024-09-12 13:36:14 -04:00
dag_tests hcl2template: err on malformed local/data dep (#13340) 2025-06-17 09:22:09 +05:30
plugin_tests changes for fixing the SHA mismatch test case (#13385) 2025-05-27 14:08:41 +05:30
provisioner_tests packer_test: build acc test for shell provisioner in linux only 2025-03-20 16:22:32 -04:00