Ok then perhaps the game will automatically select the highest available unlocked unit on your upgrade tree which has resource's in excess, I.e if your upgrade path is like so..
Tank (Oil) -> Modern Armour (Aluminium) -> GDR (Uranium),
note: Modern Armour probably won't actually upgrade to the GDR

, but let's assume it does for a second to use as an example.
And you have Nuclear Fusion so GDR is unlocked but you have 0 Uranium left, but plenty of Aluminium,
When you go to upgrade a normal tank, first of all the game checks your maximum allowed upgrade which would be the GDR (its the end of the upgrade tree anyway), however the game detects 0 Uranium, this means upgrading the the GDR is impossible, so the next tech down is checked, which is modern armour, 1 or more Aluminium is available so the option to upgrade to Modern Armour is given.
This makes sense, won't removal strategical importance from resources and allows upgrading to work in the best possible way.