Dmitry Medvedev is a tool. If I remember correctly, Putin was president of Russia for two 4-year terms, and the Constitution of Russia did not allow for a third term. So, Putin made Medvedev the new President and "he" (Medvedev) changed the Constitution so that Putin can become President again (and again). Putin is the mafia boss, Medvedev is one of his cronies, he'd be a nobody without Putin.
Unfortunately, all that was well known to Merkel and the other European leaders. It was idiotic to bind Europe to Russia. I still cannot believe that the German leaders did that because they were stupid, my theory is that the were paid under the table with generous kickbacks. Of course, I have no proof, but Merkel has a PhD, she is not stupid, and I can't find any better explanation. She is also ex-East Germany citizen, so she knew first hand about the KGB and their lies. It is very hard to believe that Merkel was naive and was played by Putin, it seems to me that corruption is a more rational explanation, especially because of the German inaction since 2014, after the occupation of Crimea and flight MH17.
https://www.bbc.com/news/world-europe-53367425