Earlier Friday , Mr. Chavez was in Russia where he signed an energy cooperation pact with Russian President Dmitry Medvedev .