MinaProtocol / mina

Mina is a cryptocurrency protocol with a constant size blockchain, improving scaling while maintaining decentralization and security.
https://minaprotocol.com
Apache License 2.0
1.99k stars 527 forks source link

Remove flakiness from Version linter tests #14812

Open dkijania opened 8 months ago

dkijania commented 8 months ago

Another evidence of version linter job flakiness:

Last commit on develop branch didn't generate reference version linter: https://github.com/MinaProtocol/mina/commit/da2e21fc2a85cc20b1acf9a516b045a4bfeb6ba2 job get skipped because the changes were outside dirtyWhen condition which triggers this build

Ideas how to solve it:

We could create a separate CI job that creates the shape file for all CI runs but that could add a lot of redundant files but might be easy to implemenet? Or maybe just generate the file on-demand if it doesn’t exist? Could you create a ticket for this bug?

It might be easier to keep walking back through the branch's parent commits until we find one (up to some depth limit), but it's not very nice/elegant.

Reference files are static and only regenerated on demand when we find out discrepancy. Then we should update it in separate PR (something alike solving merges) or Run Jobs/script which will replace reference files with actual.

We regenerate reference files in nightly pipeline only. PR will only downloads what appears to be newest rerference file We are always regenerating data in the fly and won't store them. Downloads docker/deb and run first reference dump and then actual

Crawler - we are trying to find best commit on particular branch and then download it as reference files

dkijania commented 7 months ago

Agreed flow with Matthew how was a reviewer of my pr:

Design include two jobs with relations

version linter depends on version linter setup


version linter job:

depends on version linter setup job by the time it runs, we know the shapes file has been uploaded, so we can confidently use it without experiencing flakes

submarinec94 commented 2 months ago

more so for dev work improvement --- unclear where this is until he's back