potiuk opened a new pull request #20040:
URL: https://github.com/apache/airflow/pull/20040


   The setgid command was executed after importing several airflow
   imports, which - when executed for the first time could take quite
   some time (possibly even few seconds). The setgid command should be
   done as soon as possible, in case of any errors in the import, it
   would fail and the setgid could be never set.
   
   Also this caused the test_start_and_terminate test to fail in CI
   because the imports could take arbitrary long time (depending on
   parallel tests and whether the imported modules were already
   loaded in the process so setting the gid could be set after more
   than 0.5 seconds.
   
   This change fixes it twofold:
   
   * setgid is moved to be first instruction to be executed
   * the test was fixed to wait actively and only fail after the
     timeout of 1s (which should not happen before of the fix above)
   
   Also the test was using `task test` command rather than task run,
   and in some circumstances when you tried to run it locally,
   when FORK was disabled (MacOS) the same test could fail with
   a different error because --error-file flag is not defined for
   `task test` command but it is automatically added by the runner.
   
   The task command has been changed to `run'
   
   Thanks to that the test will be usually very fast.
   
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request 
Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)**
 for more information.
   In case of fundamental code change, Airflow Improvement Proposal 
([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals))
 is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party 
License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in 
[UPDATING.md](https://github.com/apache/airflow/blob/main/UPDATING.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