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

Use built-in check-migrations command for Airflow>=2 in helm chart #19676

Merged
merged 2 commits into from
Nov 18, 2021

Conversation

ashb
Copy link
Member

@ashb ashb commented Nov 18, 2021


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code change, 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 UPDATING.md.

@ashb
Copy link
Member Author

ashb commented Nov 18, 2021

Well some of the Helm chart tests passed, that's promising.

@ashb
Copy link
Member Author

ashb commented Nov 18, 2021

E AssertionError: Could not enable DAG: {'detail': None, 'status': 404, 'title': "Dag with id: 'example_kubernetes_executor_config' not found", 'type': 'http://apache-airflow-docs.s3-website.eu-central-1.amazonaws.com/docs/apache-airflow/latest/stable-rest-api-ref.html#section/Errors/NotFound'}

Curious. I wonder why only some of the helm chart matrix failed with that.

@kaxil
Copy link
Member

kaxil commented Nov 18, 2021

E AssertionError: Could not enable DAG: {'detail': None, 'status': 404, 'title': "Dag with id: 'example_kubernetes_executor_config' not found", 'type': 'http://apache-airflow-docs.s3-website.eu-central-1.amazonaws.com/docs/apache-airflow/latest/stable-rest-api-ref.html#section/Errors/NotFound'}

Curious. I wonder why only some of the helm chart matrix failed with that.

Oh !!! 🤦 We deleted that DAG and added everything example_kubernetes_executor

@kaxil
Copy link
Member

kaxil commented Nov 18, 2021

Need:

diff --git a/kubernetes_tests/test_kubernetes_executor.py b/kubernetes_tests/test_kubernetes_executor.py
index 1ca3848fe..61030d1b9 100644
--- a/kubernetes_tests/test_kubernetes_executor.py
+++ b/kubernetes_tests/test_kubernetes_executor.py
@@ -25,7 +25,7 @@ from kubernetes_tests.test_base import EXECUTOR, TestBase
 @pytest.mark.skipif(EXECUTOR != 'KubernetesExecutor', reason="Only runs on KubernetesExecutor")
 class TestKubernetesExecutor(TestBase):
     def test_integration_run_dag(self):
-        dag_id = 'example_kubernetes_executor_config'
+        dag_id = 'example_kubernetes_executor'
         dag_run_id, execution_date = self.start_job_in_kubernetes(dag_id, self.host)
         print(f"Found the job with execution_date {execution_date}")

@@ -48,7 +48,7 @@ class TestKubernetesExecutor(TestBase):
         )

     def test_integration_run_dag_with_scheduler_failure(self):
-        dag_id = 'example_kubernetes_executor_config'
+        dag_id = 'example_kubernetes_executor'

         dag_run_id, execution_date = self.start_job_in_kubernetes(dag_id, self.host)

But we can create a separate PR for that

@ashb
Copy link
Member Author

ashb commented Nov 18, 2021

Turns out living with broken tests is bad -- who'da thunk it!?

@ashb
Copy link
Member Author

ashb commented Nov 18, 2021

#19680

@github-actions github-actions bot added the okay to merge It's ok to merge this PR as it does not require more tests label Nov 18, 2021
@github-actions
Copy link

The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest main or amend the last commit of the PR, and push it with --force-with-lease.

@ashb ashb merged commit bced2d7 into apache:main Nov 18, 2021
@ashb ashb deleted the use-check-migrations-command-helm-chart branch November 18, 2021 15:13
@potiuk
Copy link
Member

potiuk commented Nov 18, 2021

Nice!. Just got back to my PC :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:helm-chart Airflow Helm Chart okay to merge It's ok to merge this PR as it does not require more tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants