potiuk commented on pull request #20701:
URL: https://github.com/apache/airflow/pull/20701#issuecomment-1011359233


   > We have two jobs ci and build-image:
   > 
   > * ci job is running `run: airflow-freespace`: 
https://github.com/apache/airflow/runs/4791100593?check_suite_focus=true, but
   > * build-image 
https://github.com/apache/airflow/runs/4791073580?check_suite_focus=true , 
still running: `./scripts/ci/tools/free_space.sh` even though I have already 
changed the script in build-image.yaml: `run: airflow-freespace`
   > 
   > Am I forgetting something?
   
   Very good observation @edithturn ! Great that you are so thorough! 
   
   That's actually expected :) (unfortunately). The "build-image" is special 
case - due to security requirements this is "special" workflow 
("pull_request_target") which runs by default using "main" version of the 
workflow (this is important, because this workflow has "write" permissions and 
if we allow anyone to modify it in the PR they could do very nasty stuff in our 
repo. So your changes in "build-image" will only run AFTER i review and merge 
it to "main".
   
   This makes it a bit difficult to test if it actually works, but if you want 
you can do it. It is a bit involved :). A bit of "more git magic".  You need to 
push your branch as "main" in your own fork::
   
   ```
   git push edithturn check-free-space-python:main
   ```
   
   Then you should be able to get to "Actions" tab in your repo and see both 
workflows running! After that you will have to:
   
   ```
   git push -f edithturn main
   ```
   to reset it back to the "real" main.
   
   You can read more about reasoning and why it is done like that in 
https://github.com/apache/airflow/blob/main/dev/breeze/doc/adr/0005-preventing-using-contributed-code-when-building-images.md


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