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 BaseWaiterFactory, so we can start splitting the waiters #2317

Merged

Conversation

tremble
Copy link
Contributor

@tremble tremble commented Oct 2, 2024

SUMMARY

Having everything in waiters.py today means that every time we add a new waiter we trigger a lot of integration tests. Adding this Factory gives us a basis to work upon for splitting the code up. It's based upon the Factory in community.aws, but doesn't come with the assumption that we'll have the module/client available to us when we instantiate the factory.

While similar to the current code in waiters.py, this factory supports:

  • waiter definitions stored on a per-API basis
  • waiter definitions outside of amazon.aws

Because touching the existing waiters.py would trigger a mass of integration tests, this puts the factory into waiter.py instead of waiters.py. Additionally, putting it in waiter.py also gives us a long term route to split the current waiters off and out of waiters.py without generating import loops. (Putting it in waiters.py would mean that a per-API file would need to import waiters.py, and thus waiters.py couldn't import the new file to provide backwards compatibility with today's implementation)

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

plugin/module_utils/waiter.py

ADDITIONAL INFORMATION

See #2296 for an example of using this (module_utils._autoscaling.waiters)

@tremble tremble marked this pull request as draft October 2, 2024 08:58
Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/8b5b8c078f1c487fbfdb5ed00b673227

✔️ ansible-galaxy-importer SUCCESS in 5m 21s
✔️ build-ansible-collection SUCCESS in 10m 42s
✔️ ansible-test-splitter SUCCESS in 4m 18s
✔️ integration-amazon.aws-1 SUCCESS in 5m 19s
Skipped 43 jobs

Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/72919eac606f4e219279551cf77fb796

✔️ ansible-galaxy-importer SUCCESS in 11m 46s
✔️ build-ansible-collection SUCCESS in 10m 41s
✔️ ansible-test-splitter SUCCESS in 4m 19s
✔️ integration-amazon.aws-1 SUCCESS in 5m 32s
Skipped 43 jobs

@tremble tremble marked this pull request as ready for review October 8, 2024 05:42
Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/8ce1f36201104a598f8e9c7fa5d1ed82

✔️ ansible-galaxy-importer SUCCESS in 4m 26s
✔️ build-ansible-collection SUCCESS in 10m 41s
✔️ ansible-test-splitter SUCCESS in 4m 30s
✔️ integration-amazon.aws-1 SUCCESS in 6m 19s
Skipped 43 jobs

Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/a6240f50448b4b48b91671bd575e8057

✔️ ansible-galaxy-importer SUCCESS in 4m 08s
✔️ build-ansible-collection SUCCESS in 10m 51s
✔️ ansible-test-splitter SUCCESS in 4m 29s
✔️ integration-amazon.aws-1 SUCCESS in 5m 12s
Skipped 43 jobs

…an lumping it all in one file

Having everything in waiters.py today means that every time we add a new waiter we trigger a lot of integration tests
Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/0c6ad5dca23b4ff6a6d305ecb3019bad

✔️ ansible-galaxy-importer SUCCESS in 3m 28s
✔️ build-ansible-collection SUCCESS in 10m 41s
✔️ ansible-test-splitter SUCCESS in 4m 50s
✔️ integration-amazon.aws-1 SUCCESS in 4m 24s
Skipped 43 jobs

@tremble tremble added the mergeit Merge the PR (SoftwareFactory) label Oct 10, 2024
Copy link
Contributor

Build succeeded (gate pipeline).
https://ansible.softwarefactory-project.io/zuul/buildset/9891ce7941a44bffadabbd0cda9fc5d6

✔️ ansible-galaxy-importer SUCCESS in 3m 23s
✔️ build-ansible-collection SUCCESS in 10m 39s
✔️ ansible-test-splitter SUCCESS in 4m 21s
✔️ integration-amazon.aws-1 SUCCESS in 5m 20s
Skipped 43 jobs

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 963cf2c into ansible-collections:main Oct 10, 2024
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mergeit Merge the PR (SoftwareFactory)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants