percy/percy-ember

Duplicate copies of the same resource fail to upload

Closed this issue · 1 comments

This is a subtle issue which took a little bit of tracking down.

In our assets we have two images which are the same but at two different paths (the original was copied to a second location).

Because ember-percy uses a sha of the image content as the key to build up the resources map the resource at the last location ALWAYS wins and the others are not uploaded to Percy. This means we get 404-ed images in our snapshots.

Could the resourceUrl be used as a key instead of the content sha?

As an example. We have two assets which are identical in content but just stored at different locations, e.g.

/images/logos/hipchat.png
/assets/images/integrations/hipchat.png

In the final resource payload uploaded to Percy, there's only an entry to /assets/images/integrations/hipchat.png because the second sha key clobbers the first one.

@patocallaghan This is fixed and released in ember-percy v1.4.4. Thank you for the report and thorough debugging here!