Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

starting triggerer for system-tests #36236

Closed
wants to merge 1 commit into from

Conversation

Bowrna
Copy link
Contributor

@Bowrna Bowrna commented Dec 15, 2023

closes: #31826
related: #31826


^ 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.rst or {issue_number}.significant.rst, in newsfragments.

@Bowrna
Copy link
Contributor Author

Bowrna commented Dec 15, 2023

Can you explain to me how you run the system tests? I do this by setting the env var RUN_SYSTEM_TESTS and then run the command breeze testing tests --test-type with providers or other options. I want to confirm if I doing it correctly.

@o-nikolas @potiuk
Also when I run the triggerer command and start the pytest, I get the following issue.

ERROR: You need to initialize the database. Please run `airflow db init`. Make sure the command is run using Airflow version 2.9.0.dev0.

So I added the airflow db init and then started the triggerer.

Can you tell me an example system test that I can find that depends on triggerer so that I can run that example and check if it works?

@o-nikolas
Copy link
Contributor

Can you explain to me how you run the system tests? I do this by setting the env var RUN_SYSTEM_TESTS and then run the command breeze testing tests --test-type with providers or other options. I want to confirm if I doing it correctly.

We use something like:
breeze testing tests <test name> --system amazon

Can you tell me an example system test that I can find that depends on triggerer so that I can run that example and check if it works?

There is no such test currently, since triggerer wasn't supported (kind of a chicken and egg problem). You'll have to take an existing test and update it to be deferrable. It shouldn't be too hard, you'll just have to pass a deferrable flag through to an operator. @syedahsn any suggestions or corrections?

Lastly, I'm not sure how well the DebugExecutor will handle the deferring though, that will be interesting to see.

@syedahsn
Copy link
Contributor

Most of the system tests can be run in deferrable mode by taking one of the supported operators/sensors and passing deferrable=True. Some good examples are the RDS system test, the redshift system test, or the EKS system tests. Keep in mind that some of these tests take a while to finish because they are actually provisioning resources on your AWS account.

@Bowrna Bowrna force-pushed the trigger-with-system-tests-breeze branch from b08bb6d to c6b6b6a Compare December 24, 2023 07:46
@Bowrna
Copy link
Contributor Author

Bowrna commented Dec 24, 2023

ah this will involve setting up the third party system config to run the test right.. I completely forgot about that part and I don't have an account personally to up and run these tests. Is there any other way for me to do it? Can I push this code and will that be run as part of the Github actions CI pipeline test? @potiuk @o-nikolas @syedahsn

@o-nikolas
Copy link
Contributor

ah this will involve setting up the third party system config to run the test right.. I completely forgot about that part and I don't have an account personally to up and run these tests. Is there any other way for me to do it? Can I push this code and will that be run as part of the Github actions CI pipeline test? @potiuk @o-nikolas @syedahsn

The code will run as Airflow CI, but the system tests wont be executed. Since Airflow as a community can't be on the hook for those infrastructure costs.

As a single user doing some testing, I think it shouldn't be too hard to find a system test that would be well within the AWS free tier and not cost you any money at all to run. But if the task is getting too overwhelming from the perspective, feel free to put what you have in a PR now and we can take it over when we find the time.

@potiuk
Copy link
Member

potiuk commented Dec 26, 2023

Yeah. you can even test some simple tests using free tier of AWS.

Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Stale PRs per the .github/workflows/stale.yml policy file label Feb 10, 2024
@github-actions github-actions bot closed this Feb 15, 2024
@Bowrna
Copy link
Contributor Author

Bowrna commented Feb 16, 2024

i will reopen the issue after adding simple test with free tier of AWS.

@Bowrna
Copy link
Contributor Author

Bowrna commented Mar 22, 2024

@o-nikolas @syedahsn @potiuk any idea how i can reopen this PR.

@potiuk potiuk reopened this Mar 22, 2024
@potiuk
Copy link
Member

potiuk commented Mar 22, 2024

reopened.

@github-actions github-actions bot removed the stale Stale PRs per the .github/workflows/stale.yml policy file label Mar 23, 2024
@vincbeck
Copy link
Contributor

Closing this once since #39176 has resolved it

@vincbeck vincbeck closed this Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a command line option to start a triggerer process with breeze
5 participants