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

[AIRFLOW-2557] Remove paged test for s3 #3455

Closed
wants to merge 1 commit into from

Conversation

bolkedebruin
Copy link
Contributor

Make sure you have checked all steps below.

JIRA

  • My PR addresses the following Airflow JIRA issues and references them in the PR title. For example, "[AIRFLOW-XXX] My Airflow PR"

Description

  • Here are some details about my PR, including screenshots of any UI changes:

Paged tests for s3 are taking over 120 seconds. The
functionality testes is part of the standard boto suite
and part of its own tests.

Tests

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

tests removed.

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
    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.
    • When adding new operators/hooks/sensors, the autoclass documentation generation needs to be added.

Code Quality

  • Passes git diff upstream/master -u -- "*.py" | flake8 --diff

cc @Fokko @NielsZeilemaker

@NielsZeilemaker
Copy link
Contributor

You could reduce the number from 5000 to 1001, as a single call will return at most 1000 results.

@codecov-io
Copy link

codecov-io commented Jun 3, 2018

Codecov Report

Merging #3455 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3455      +/-   ##
==========================================
- Coverage   76.89%   76.89%   -0.01%     
==========================================
  Files         203      203              
  Lines       15118    15120       +2     
==========================================
+ Hits        11625    11626       +1     
- Misses       3493     3494       +1
Impacted Files Coverage Δ
airflow/hooks/S3_hook.py 94.69% <100%> (+0.09%) ⬆️
airflow/models.py 87.2% <0%> (-0.05%) ⬇️

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 91dd368...a117d1a. Read the comment docs.

@bolkedebruin
Copy link
Contributor Author

@NielsZeilemaker I know, but I looked at the code and I don’t think that makes sense. We are not testing anything inside airflow by it and the tests together would still take around 20seconds.

@Fokko
Copy link
Contributor

Fokko commented Jun 3, 2018

@bolkedebruin
Copy link
Contributor Author

No it doesn’t, that part will always be tested as you can see in the test coverage as well. There will be always one page if you have results.

@Fokko
Copy link
Contributor

Fokko commented Jun 3, 2018

It looks like the branch is still being hit: https://codecov.io/gh/apache/incubator-airflow/pull/3455/src/airflow/hooks/S3_hook.py#L98...102

🤔

@NielsZeilemaker
Copy link
Contributor

It will, as you always have a single page, but testing to see if multiple pages work would have my preference, as I actually encountered this bug while using the hook. Maybe there is a quicker method to add the files?

@bolkedebruin
Copy link
Contributor Author

Can you lower the page size somehow?

Paged tests for s3 are taking over 120 seconds. There
is functionality to set the page size. This reduces
the time spent on tests.
@bolkedebruin
Copy link
Contributor Author

@NielsZeilemaker @Fokko updated. Page size is a supported setting

Note: @Fokko lets not accept PRs anymore that go over 2s in tests.

Copy link
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

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

Thanks @bolkedebruin, looking good. Codecov tells me that the branch is still being hit.

I agree that normal tests should run within 2seconds, maybe drop a line on the dev mailinglist?

@asfgit asfgit closed this in a47b277 Jun 3, 2018
aliceabe pushed a commit to aliceabe/incubator-airflow that referenced this pull request Jan 3, 2019
Paged tests for s3 are taking over 120 seconds.
There
is functionality to set the page size. This
reduces
the time spent on tests.

Closes apache#3455 from bolkedebruin/AIRFLOW-2557
stlava pushed a commit to Nextdoor/airflow that referenced this pull request Sep 4, 2019
Paged tests for s3 are taking over 120 seconds.
There
is functionality to set the page size. This
reduces
the time spent on tests.

Closes apache#3455 from bolkedebruin/AIRFLOW-2557
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants