Last year I flew overseas GPT-IAH-FRA-JED starting on a CO flight, so the entire itin was technically through CO and the rest was codeshare. The big hops from IAH-FRA-JED were on Lufthansa. I wanted to use my CO miles to upgrade on Luft. End result: I had to contact the Star Alliance help desk to get it set up and then call Luft to make sure it was confirmed. Might be different for UA/CO, but the key was to call *A and they'll tell you what to do. Worked out well, but was a bit nailbiting as there was no guarantees until the day of departure. I would assume it would be easier with a CO/UA *A upgrade.