fastly/fastly-magento2

Custom VCL snippets fail to upload if they have the same name, even if the type is different

braders opened this issue · 0 comments

Steps to reproduce

  1. From the Magento configuration screen create a new VCL custom snippet and save.
  2. From the Magento configuration screen create a second VCL custom snippet. Use the same name as the first custom snippet, but a different type (for example, if the first was recv use fetch) and save.
  3. Upload the new VCL to Fastly.

Current result

The VCL uploads without any errors. However only one VCL will have actually uploaded. You can verify this by viewing the full generated VCL from the "List all versions" button under the "tools" accordion. This can lead to very unexpected results as only half the VCL expected which actually be running.

Expected result

Either:

  1. Both VCL snippets correctly appear in the final generated VCL.
  2. A validation message should be shown when saving the second snippet informing the user that a unique name is required.