Ukraine, which was partially reliant on Russian gas, has not bought gas directly from Moscow since 2015 after it invaded and annexed Crimea and backed separatist militants in east Ukraine.