But something earlier?
How about a millennia of Germans wandering East and Poles wandering West?
en.wikipedia.org/wiki/History_of_Poland#Prehistory_and_protohistory
....
n the aftermath of Mieszko's 967 victory over a force of the Wolinians led by Wichmann the first missionary bishop was appointed, which counteracted the intended eastern expansion of the Magdeburg Archdiocese, established at about the same time.[12]
Mieszko's state had a complex political relationship with the German Holy Roman Empire, as Mieszko was a "friend", ally and vassal of Otto I
An alliance? Kind of?
....
When fighting the Czechs in 990, Mieszko was helped by the Holy Roman Empire.
Sure!
....
After a power struggle, Bolesław III the Wrymouth (ruled 1102-1138) became the Duke of Poland by defeating his half-brother in 1106-1107. Zbigniew had to leave the country, but received support from Emperor Henry V, who attacked Bolesław's Poland in 1109.
Another alliance...kind of....
...
The civil strife and foreign invasions, such as the Mongol invasions in 1241, 1259 and 1287, weakened and depopulated the many small Polish principalities, as the country became progressively more split.
The German, Polish and other new rural settlements were a form of feudal tenancy with immunity and German town laws were often utilized as its legal bases.
The German immigrants were also important in the rise of the cities and the establishment of the Polish burgher (city dwelling merchants) class; they brought with them West European laws (Magdeburg rights) and customs which the Poles adopted. From that time on the Germans, who created early strong establishments (led by the patriciate) especially in the urban centers of Silesia and other regions of western Poland....
....
In 1226 Konrad I of Masovia invited the Teutonic Knights to help him fight the Prussian people, who lived in a territory adjacent to his lands; substantial border warfare was taking place and Konrad's province had suffered from Prussian invasions.
Definitely an alliance...;)