Is there anyone know which Linux distribution and version is the official build environment of Openwrt using?
'Any' semi-recent general purpose linux distribution will do, OpenWrt's buildbots are mostly running on Debian/ stable though.
Well phrased! I'm on Arch Linux and every now and then the build environment doesn't work because some packages on my system are too new.
I have been using Fedora for ages now and its rather fast to update packages but I have seen build breakages rather rarely, and even then it was mostly just OpenWrt version check scripts
Personally I'm using Debian/ unstable and rarely run into issue.
I'm on Arch too. Issues are rare. In case you have issues you could e.g. boot an older snapshot or install the older version of a package (if its not glibc or another dependendy hell package). But that is ugly. I would recommend to use a VM with an Ubuntu to avoid issues. In my experience issues are solved within a few days because others within the OpenWrt development universe facing similar issues.
Ubuntu 22.10 works ok with OpenWrt master and 22.03
(I have been using the "newest Ubuntu" in VirtualBox since year 2011. )
To my knowledge the "official" build env at buildbot is Debian10 in a Docker container.