Both are correct and used by native speakers. One use of perfect tenses is to show something has happened recently- so the first sentence implies the relationship ended not long ago; the second makes it sound as if it all happened far in the past.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.