JosXa / tgintegration

Integration test and automation library for Telegram Messenger bots based on Pyrogram.
https://josxa.github.io/tgintegration/
MIT License
119 stars 18 forks source link

Locks for concurrent builds in CI/CD (GitHub Actions) #18

Open JosXa opened 4 years ago

JosXa commented 4 years ago

Generally, mtproto sessions hate being run on the same credentials within multiple connections at the same time. This is especially bad when using string sessions. For CI/CD, there needs to be a solution however to run them in parallel, for example when building in a matrix of multiple Python versions (3.7 + 3.8 in the case of tgintegration) or when multiple pull requests get built at the same time. The only reasonable option for passing Telegram sessions to continuous integration are string sessions, at least to my knowledge.

JosXa commented 4 years ago

Idea from @Hackintosh5WasTaken:

Each worker goes:

JosXa commented 3 years ago

This could be nice: https://github.com/glasslion/redlock

JosXa commented 3 years ago

Should be easily solvable via #27