Preheat the oven to 200°C.
In a frying-pan, heat the olive oil on a moderate heat and saute the onions, garlic and thyme until soft. Add the water and sugar and continue to sauté until caramelised. Set aside
In a separate pan, on a low heat add the vinegar and butter to combine. Add the tomatoes to cover the pan cut-side down, season and add the onion mix and allow to infuse for a few minutes over a low heat.
On a floured surface, roll out the puff pastry to form four circles about 1.5cm thick. Prick each puff pastry circle with a fork and then arrange the tomato mixture (leaving rising space at the edges) and top with the sardines, brushed with olive oil on a greased baking tray.
Bake for 30 minutes, rest and serve with a sprig of thyme.