Skip to content

[AIRFLOW-5631] Change way of running GCP system tests#6299

Merged
potiuk merged 5 commits intoapache:masterfrom
PolideaInternal:new-system-tests
Oct 28, 2019
Merged

[AIRFLOW-5631] Change way of running GCP system tests#6299
potiuk merged 5 commits intoapache:masterfrom
PolideaInternal:new-system-tests

Conversation

@turbaszek
Copy link
Member

@turbaszek turbaszek commented Oct 10, 2019

Make sure you have checked all steps below.

Jira

Description

  • Here are some details about my PR, including screenshots of any UI changes:
    This PR proposes a new way of running GCP related system tests.
    It uses SystemTests base class and authentication is provided by a
    context manager thus it's easier to understand what's going on.

Tests

  • My PR adds the following unit tests OR does not need testing for this extremely good reason:

Commits

  • My commits all reference Jira issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters (not including Jira issue reference)
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

Documentation

  • In case of new functionality, my PR adds documentation that describes how to use it.
    • All the public functions and the classes in the PR contain docstrings that explain what it does
    • If you implement backwards incompatible changes, please leave a note in the Updating.md so we can assign it to a appropriate release

@codecov-io
Copy link

codecov-io commented Oct 10, 2019

Codecov Report

Merging #6299 into master will decrease coverage by 0.29%.
The diff coverage is 94.91%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #6299     +/-   ##
=========================================
- Coverage   83.96%   83.67%   -0.3%     
=========================================
  Files         627      628      +1     
  Lines       36549    36608     +59     
=========================================
- Hits        30689    30632     -57     
- Misses       5860     5976    +116
Impacted Files Coverage Δ
airflow/contrib/hooks/gcp_api_base_hook.py 100% <ø> (ø) ⬆️
airflow/gcp/utils/credentials_provider.py 94.91% <94.91%> (ø)
airflow/kubernetes/volume_mount.py 44.44% <0%> (-55.56%) ⬇️
airflow/kubernetes/volume.py 52.94% <0%> (-47.06%) ⬇️
airflow/kubernetes/pod_launcher.py 45.25% <0%> (-46.72%) ⬇️
airflow/kubernetes/kube_client.py 33.33% <0%> (-41.67%) ⬇️
...rflow/contrib/operators/kubernetes_pod_operator.py 70.14% <0%> (-28.36%) ⬇️
airflow/contrib/operators/ssh_operator.py 82.5% <0%> (-1.25%) ⬇️
airflow/models/taskinstance.py 93.28% <0%> (-0.51%) ⬇️
airflow/utils/dag_processing.py 58.15% <0%> (-0.33%) ⬇️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 37a342d...4d7f100. Read the comment docs.

@turbaszek turbaszek force-pushed the new-system-tests branch 2 times, most recently from eda9ccb to c416361 Compare October 11, 2019 12:53
@mik-laj mik-laj added the provider:google Google (including GCP) related issues label Oct 12, 2019
@mik-laj
Copy link
Member

mik-laj commented Oct 14, 2019

Travis is sad. Can you fix it?

@turbaszek turbaszek force-pushed the new-system-tests branch 6 times, most recently from 98bded7 to 0a71e2d Compare October 18, 2019 16:10
Copy link
Member

Choose a reason for hiding this comment

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

In other places, the helper is set as a class property. Do you have recommendations about it?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think the helpers need some more discussion. Many of them performs same thing like create a bucket or delete a bucket, so maybe it's worth to rethink our overall approach. If we are going to migrate to pytest then helpers should be replaced by fixtures.

Copy link
Member

Choose a reason for hiding this comment

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

Ok. We can do it in separate PR.

Copy link
Member

@mik-laj mik-laj left a comment

Choose a reason for hiding this comment

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

Small nits.

Copy link
Member

Choose a reason for hiding this comment

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

Ok. We can do it in separate PR.

Copy link
Member

Choose a reason for hiding this comment

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

Is this class still used?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, I should remove it ✅

@turbaszek turbaszek force-pushed the new-system-tests branch 4 times, most recently from 550f118 to fdca7ab Compare October 23, 2019 16:10
@potiuk potiuk merged commit ffe7ba9 into apache:master Oct 28, 2019

@unittest.skipIf(TestDagGcpSystem.skip_check(GCP_BIGQUERY_KEY), SKIP_TEST_WARNING)
class BigQueryExampleDagsSystemTest(TestDagGcpSystem):
@skip_gcp_system(GCP_BIGQUERY_KEY, require_local_executor=True)
Copy link
Contributor

@TobKed TobKed Nov 4, 2019

Choose a reason for hiding this comment

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

This parameters should not have require_local_executor set to True I think. I have problem with running this test.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I agree. Can you make a PR with fix because I am on holidays?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry for late response. I will try to fix it but I have limited time due to my holidays :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

provider:google Google (including GCP) related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants