potiuk edited a comment on pull request #21145:
URL: https://github.com/apache/airflow/pull/21145#issuecomment-1024889471


   Good questions are ALWAYS good. There are never too many of them :).
   
   > @potiuk Does `MSSQL_DATA_VOLUME` is created on a specific case? I tried 
running breeze in my machine and I couldn't see this folder getting created.
   
   They are created when `--backend mssql` is used - each backend keeps their 
database on a separate volume this way when you exit/enter breeze and restart 
the db, the data is kept across the container runs.  The `breeze stop` command 
will remove all volumes on top of stopping the database, so it will cleanup 
everything. But if you do not `./breeze stop`, then the data is preserved in 
the DB,
   
   > Also, could you explain to me the CACHE_TMP_FILE_DIR=$(mktemp -d) part? 
Why does it have to be done this way and what happens in add_traps? I could see 
we log info to OUTPUT_LOG. What's the best way to handle when migrating to 
python?
   
   CACHE_TMP_FILE_DIR is used to store various temporary cached files:
   
   * when we create diagrams automatically with `mermaid` (in one of the 
pre-commits)
   * when we prepare md5 sum files (to compare them with the ones we store 
directly in .build directory) 
   
   Those files are usually not needed after we finish a breeze command - they 
are just used temporarily. "trap" makes sure that no matter if we nicely exist 
or Ctrl-C, or fail, those files are automatically deleted. The 
SKIP_CACHE_DELETION variable was just an escape hatch to not delete the files 
while debugging. I think we do not need it any more (and we can always coment 
out the code that deletes it when debugging). 
   
   In Python this "trap" functionality (not the same but good enough) can be 
achieved by https://docs.python.org/3/library/atexit.html. And I think this is 
the right way.
   
   
   


-- 
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