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

Add support for Airflow 2 #9064

Merged
merged 4 commits into from
Apr 1, 2021
Merged

Add support for Airflow 2 #9064

merged 4 commits into from
Apr 1, 2021

Conversation

coignetp
Copy link
Contributor

What does this PR do?

Airflow 2.0+ has a stable API, and is deprecating /api/experimental. https://airflow.apache.org/docs/apache-airflow/stable/stable-rest-api-ref.html
This PR check the stable endpoints first.

Motivation

Additional Notes

The stable endpoint is more detailed https://airflow.apache.org/docs/apache-airflow/stable/stable-rest-api-ref.html#tag/Monitoring
These details are added in the service check message.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have changelog/ and integration/ labels attached

@coignetp coignetp requested a review from a team as a code owner March 31, 2021 12:10
@ghost ghost added the integration/airflow label Mar 31, 2021
@coignetp coignetp changed the title Use stable API first Add support for Airflow 2 Mar 31, 2021
Copy link
Contributor

@luisgonzalex luisgonzalex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementation looks good, just had a comment on tests.

@@ -26,10 +26,44 @@ def test_service_checks_cannot_connect(aggregator):
'json_resp, expected_healthy_status, expected_healthy_value',
[({'status': 'OK'}, AgentCheck.OK, 1), ({'status': 'KO'}, AgentCheck.CRITICAL, 0), ({}, AgentCheck.CRITICAL, 0)],
)
def test_service_checks_healthy(aggregator, json_resp, expected_healthy_status, expected_healthy_value):
def test_service_checks_healthy_exp(aggregator, json_resp, expected_healthy_status, expected_healthy_value):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How come this gets tested for our v2 environment?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a unit test, so it's just testing the behaviour, not against the environment

@coignetp coignetp merged commit 98e441b into master Apr 1, 2021
@coignetp coignetp deleted the paul/airflow-2 branch April 1, 2021 08:26
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.

2 participants