Place onions and oil in cast iron pan over medium-low heat. Stir occasionally for approximately 40 min or until onions are light caramel in color.
Add butter, roughly chopped mushrooms, vinegar, and sugar to pan. Heat to a simmer and cook an additional 10-15 minutes until most of the moisture has evaporated. Season with salt and pepper to taste.
Preheat the oven to 400°
Cut one sheet of puff pastry dough into 9 equal squares. Using a fork, poke holes in the center of each sheet, avoiding 1/4 in border of the dough.
Place about 1 tbsp of the onion mushroom filling in the center of each dough square, spreading close to the edges.
Transfer the squares to a baking sheet lined with parchment and crumble a little bit of goat cheese on top of each.
Use a fork to scramble together the egg and water. Using a pastry or basting brush, brush the 4 edges of each square with the egg wash. This will help them brown.
Place the baking sheet in the oven to cook for 15 minutes or until the edges are golden brown.
Sprinkle with fresh parsley and serve hot or room temperature.