Out of these two what do you think Ukraine is calculating for?
I don't think it's an either-or thing, both according to circumstances. And now the circumstances have obviously changed.
And did they make a good choice?
Time will tell. Circassians fought fiercely against the Russian Empire, so fiercely that the military loss was followed in genocide and mass exodus of the whole nation - the Circassian nation in the Caucasus does not exist anymore.
Baltic states and Poland used the opportunity of the Russian revolution and WWI to secure independence. For Latvia and Estonia, for the first time. That also meant two decades of no collectivization, no red terror, acculturation or ethnic marginalization. By the time Soviet Union collapsed, people in these countries, in contrast to Caucasus, Ukraine, Central Asia all had living grandparents who remembered the time before the Soviet Union -- the spirit of freedom had not been completely put out by the sovietization and russification. I guess this explains partially the different political culture, levels of corruption and faster integration to the West compared with those whose civil wars (or wars of independence, had the whites/nationalists won) in the aftermath of WW1 ended with Bolshevik victory.
Chechens rebelled against Soviets in 1940 - the whole nation was deported to Kazakh steppes en masse - genocide according the UN Genocide Convention.
Finns fought a successful defensive war against Soviet Union at the Winter War and saved their state and were able to keep themselves aligned with the Western system (with military, political and territorial concessions after the Continuation War).
So, in short... it depends on the circumstances. Obviously, it's important not to lose.
The problem for Ukraine as I understand it is that they made the choice to try to defy Russia [...]
The Orange Revolution and EuroMaidan were certainly a slap in the face for Russia. And dangerous to Putin. "If Ukrainians, our brothers, can do this, why can't we?" If history is of any guidance, then having Russia as a friendly neighbor without succumbing to it's expansionism is not something you'd want to count on.
Where does that leave them?
Between a rock and a hard place, unfortunately.