Introduce e2e testing with testcontainers#54072
Conversation
|
Should we have e2e testing separate repo and keep all the tests there and uses them part of workflow? 🤔 |
I think separate repo is generally a bad idea. Monorepo has it's drawbacks - but it has also benefits - for example much easier syncing of dependencie with workspace, keeping single contribuition workflow, being able to stop PR from merging when the tests fail etc. I can't see any real benefit of having separate repo for tests that should essentially be run as part of the same workflow as all other tests (especially when we have |
agree make sense :) do you think we should run these e2e tests part PR's, i am thinking of we can do it in schedule, i remember @kaxil was mentioning there were around 200+ test scenario combinations for xcoms itself so i think it would fit in schedule run? WDYT? |
a) we can improve selective tests to trigger a relevant subset of those |
yes that also works good idea ;) |
11c816b to
c2f9cf9
Compare
c2f9cf9 to
645ab4d
Compare
|
getting this one ready today, we should be able to catch more errors running actual dag scenarios, like the recent secrets issue. |
|
@vatsrahul1001 am adding e2e test suite to CI and this can be triggered part of regular CI or after rc release it helps detecting any issues by running e2e tests. Could you please help me what test suite you regularly run and the all the example dags you have setup for testing? i will add it to test suite. @kaxil please add your thoughts on this if you have anything in mind to cover specifically combination of scenarios. i see you mentioned here around 254 combinations it would be good to know those :) #53130 (comment) |
Hey @gopidesupavan 👋 It is airflow/task-sdk/tests/task_sdk/execution_time/test_task_runner.py Lines 1391 to 1426 in 00b3b14 |
cool thanks will make these combinations to execute on real dag scenario. |
This is great work and will be very helpful during the RC testing phase! A good starting point could be running all the example DAGs that already exist, as they cover a wide range of features. From there, our team can also look into contributing additional DAGs that reflect some others common use cases. |
Agreed :) |
Yeah have already plan to include them part of this. working on them currently. |
28abb8b to
b4c2b31
Compare
|
Oh github actions is not allowing some patterns in file paths. |
950d049 to
bc8c21f
Compare
|
Finally ready for review. |
|
Would like to get this first pass simple and added basic test and test to trigger example dags. will extend this for further xcoms/connections etc; @vatsrahul1001 can also extend on top of this, feel free to add your suite in this :) |
potiuk
left a comment
There was a problem hiding this comment.
Fantastic job @gopidesupavan . Just some nit comments.
|
Not sure if we intend to backport it, but It might be possible actually, so I left the label,. |
🤔 yeah not sure, these test runs in canary anyway it hints if anything breaks. |
f7d358e to
8c2b2ac
Compare
e761553 to
ad4eb1c
Compare
|
Finally green :) merging it now. |
Backport failed to create: v3-0-test. View the failure log Run details
You can attempt to backport this manually by running: cherry_picker 0954496 v3-0-testThis should apply the commit to the v3-0-test branch and leave the commit in conflict state marking After you have resolved the conflicts, you can continue the backport process by running: cherry_picker --continue |
* Introduce e2e testing with testcontainers * Fix test command * Fix test command * Upload test report * Add option to trigger with workflow_dispatch * Add test to trigger example dags * Upload logs * Upload logs * zip logs * Fix example_bash_decorator file stat function * Add breeze commands and docs * Update breeze commands * Make docker-image-tag to empty and determine in conftest for canary build * Fix mnt writable
* Introduce e2e testing with testcontainers * Fix test command * Fix test command * Upload test report * Add option to trigger with workflow_dispatch * Add test to trigger example dags * Upload logs * Upload logs * zip logs * Fix example_bash_decorator file stat function * Add breeze commands and docs * Update breeze commands * Make docker-image-tag to empty and determine in conftest for canary build * Fix mnt writable
Introducing End to End testing to test against real environment with dags.
We can write all the possible scenario dags and test on real environment.
For now i have added a simple dag that triggers dag and validates xcom value.
Extend this to more complex scenario to validate.
My plan is it have a schedule run frequently similar to canary to validate all the tests thats under e2e.
edit: Default it runs in canary after prod image built.
We can utilise this one to test on RC releases likely provide input to image version and run all the tests. So once release manager cuts RC and released then he can trigger this test suite. IMHO very useful to test.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.