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


   And we can also think about handling this case automatically. Selective 
checks should allow that:
   If setup.py or setup.cfg change would need to be done: if the setup.py gets 
modified the "upgradeToLatestConstraints" should be set to "true".
   
   if you look in `build-images-workflow-run,yml` this is the condition now:
   
   ```
         - name: "Set upgrade to latest constraints"
           id: upgrade-constraints
           run: |
             if [[ ${{ steps.cancel.outputs.sourceEvent == 'push' ||
                 steps.cancel.outputs.sourceEvent == 'scheduled' }} == 'true' 
]]; then
                 echo "::set-output name=upgradeToLatestConstraints::${{ 
github.sha }}"
             else
                 echo "::set-output name=upgradeToLatestConstraints::false"
             fi
   ```
   
   Maybe that's a good time you implement it :)? We'd have to move it to 
"selective_checks" because there we set conditional variables based on which 
files changed. In this case, the logic should be:
   
   ```
   #  Needed by default to prevent regular PRs from failing when transitive 
dependencies cause problem
   upgradeToLatestConstraints = false 
   
   # handle the case that a change in setup.py/setup.cfg causes necessity of 
upgrade
   if setup.py or setup.py changed -> upgradeToLatestConstraints = "true" 
   
   # we want to keep track of failing transitive dependencies as soo as they 
appear, therefore we want to attempt to upgrade to 
   # latest constraints. Also if all test are OK in the "master" build, 
constraints are then automatically updated to the latest ones 
   # (but this is a separate step in CI). The last case with github.sha is 
needed because we want to upgrade as soon as possible
   # And not when setup.py changes only. This is because we need to invalidate 
the layer in docker when we first install the
   # pip dependencies for caching (so that we can run the subsequent `pip 
install http://github'. If we use "SHA" as the value of
   # upgradeToLatestConstraints, it will still upgrade them every time wen new 
commit is merged.
   
   if push or schedule -> upgradeToLatestConstraints = github.sha
   
   ```


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

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


Reply via email to