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

[v2-10-test] Improve speed of tests by not creating connections at parse time (#45690) #45826

Merged
merged 1 commit into from
Jan 21, 2025

Conversation

github-actions[bot]
Copy link

The DAG serialization tests load all of the example and system test DAGs, and
there were two places that these tests opened connections at parse time
resulting in loads of extra of test time.

  • The SystemTestContextBuilder was trying to fetch things from SSM. This was
    addressed by adding a functools.cache on the function
  • The Bedrock example dag was setting/caching the underlying conn object
    globally. This was addressed by making the Airflow connection a global,
    rather than the Bedrock conn. This fix is not great, but it does massively
    help

Before:

111 passed, 1 warning in 439.37s (0:07:19)

After:

111 passed, 1 warning in 71.76s (0:01:11)
(cherry picked from commit 102e853)

Co-authored-by: Ash Berlin-Taylor [email protected]

…rse time (#45690)

The DAG serialization tests load all of the example and system test DAGs, and
there were two places that these tests opened connections at parse time
resulting in loads of extra of test time.

- The SystemTestContextBuilder was trying to fetch things from SSM. This was
  addressed by adding a functools.cache on the function
- The Bedrock example dag was setting/caching the underlying conn object
  globally. This was addressed by making the Airflow connection a global,
  rather than the Bedrock conn. This fix is not _great_, but it does massively
  help

Before:

> 111 passed, 1 warning in 439.37s (0:07:19)

After:

> 111 passed, 1 warning in 71.76s (0:01:11)
(cherry picked from commit 102e853)

Co-authored-by: Ash Berlin-Taylor <[email protected]>
@ashb ashb marked this pull request as ready for review January 21, 2025 11:33
@ashb ashb closed this Jan 21, 2025
@ashb ashb reopened this Jan 21, 2025
@kaxil kaxil merged commit 322ce0c into v2-10-test Jan 21, 2025
43 checks passed
@ashb ashb deleted the backport-102e853-v2-10-test branch January 21, 2025 12:24
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