vincbeck commented on PR #45060:
URL: https://github.com/apache/airflow/pull/45060#issuecomment-2654368724

   > > The static check seems to delete the generated files I checked in. I 
dont understand why, I am still trying to find out why
   > 
   > Without looking into details, it might be that generating the files (and 
pre-commit in general) that generates them has a slightly different environmen 
in CI than in your env - maybe the local env has different npm/yarn version 
(not pinned) or maybe there is another configuration setting in CI that makes 
the result different.
   > 
   > There are a number of "tricks" to make things reproducible regardless of 
the environment (for example when we generate image snapshot of breeze we fix 
the terminal width, and hard-code some variable things (like default number of 
processors) that can vary between the different systems.
   > 
   > Sometimes this is unavoidable - for example when things are run on Mac and 
Linux there might be some real differences - then we might revert to running 
stuff in docker (to ensure maximum environment similarity) or have another 
trick - often we can calculate hash of the "source" files (and we do it in a 
few places) and implement the pre-commit to only actually do something when the 
hash changes - we do that with breeze help snapshots. We store the hash as part 
of the commit and pre-commit will only actually regenerate stuff if the hash of 
sources changes. That might be an easy way out as well.
   
   Yep, that's what we do here. We generate a hash and re-generate the assets 
only if the hash changes. A per the output of the tests, the root cause might 
be because the CI fails to install dependencies with `yarn`. Looking at it :)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to