I was attacked by raiders so not watching the town buildings very closely. When the attack was over, I noticed every pending upgrade on a building was gone. All the resources invested in those gone as well. I tend to batch upgrade, with dozens of wells, gardens, etc, all upgrading. This was all removed. As well as the upgrades to some barns and storage.
To be precise: the buildings themselves are still standing, and I can press the upgrade button again. But all the invested resources are gone. Visually too the buildings went from surrounded by those work-in-progress planks to regular look.