You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "potiuk (via GitHub)" <gi...@apache.org> on 2024/03/14 18:16:11 UTC
[PR] Extract unit tests to separate workflows [airflow]
potiuk opened a new pull request, #38157:
URL: https://github.com/apache/airflow/pull/38157
This is continuation of decomposing of the huge ci.yaml of ours with lot of copy-pasted yaml into smaller, separated workflows that are called when needed. This one is by far the biggest one in terms of how many repeated lines of workflow have been removed by that one.
It introduce two workflows:
1) Run unit tests workflow that run regular test in a matrix -
we call them directly from CI yaml for postgres/mysql/sqlite
and Non-DB tests - and they can run a matrix of tests - depending
on type of the build we have - in simple PRs, it will be just
matrix of default values, in more complex and canary build it
will be a complete matrix of tests.
2) "Special test" - those are special tests that are always run with
postgres, default version and Python default version but they
have some "special" thing enabled - downgrade/upgrade of a specific
important dependecy (boto/sqlalchemy), running quarantined tests
or performing just collection of tests simulating ARM test
collection. This workflow calls the regular unit test 1) workflow
for each such special case - adding one more level of indirection
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!--
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 an 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/
-->
<!-- Please keep an empty line above the dashes. -->
---
**^ Add meaningful description above**
Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)** for more information.
In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+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 a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [newsfragments](https://github.com/apache/airflow/tree/main/newsfragments).
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Extract unit tests to separate workflows [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #38157:
URL: https://github.com/apache/airflow/pull/38157#issuecomment-1998527011
OK. I think this one should be ready - and very nicely extracts all unit tests "steps" to single workflow - all the unit test workflows are just passing the right set of parameters to run the right test scope/type/db/no-db etc.etc. I was able to reorganise a bit and implement all our unit test types this way.
That's the result (only for default python versions - each of those folded test groups will be bigger on main /canary build and when `full-tests-needed` are set.
<img width="340" alt="Screenshot 2024-03-14 at 22 36 39" src="https://github.com/apache/airflow/assets/595491/edffe79a-0ece-40c8-b96d-b212ab74975c">
Once we merge this one and #38130 we will be down to ~1500 lines in ci.yml (~2600 when I started) and counting- there are still a few things I can decompose and extract
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Extract unit tests to separate workflows [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk merged PR #38157:
URL: https://github.com/apache/airflow/pull/38157
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org