Make awx/main/tests/live dramatically faster #15780
Open
+11
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
I noticed a lot of slowdown running the "live" tests, particularly related to projects which do a lot of syncing and running of jobs. When I cross-referenced against the UI I saw a lot of things hanging out in "pending" status. That's strange... even stranger that they wind up passing.
Turns out, when "pytest" is in
sys.argv
we just don't send any messages to pg_notify. Well there's you're slowdown! To do anything, the tests were waiting for the once-ever-20-seconds periodic task.That 17 seconds is 😚
This is still not implemented in the separate dispatcher library. I still haven't dived into the details, but having this as a dispatcher config-like property is probably the best path forward, so this patch should help make changes in that area as well.
We may still have friction in some other checks, because this is going to move us in the direction of sending messages by default (which will error if not configured right). While this is more risky for development, I consider it less risky for production purposes.
ISSUE TYPE
COMPONENT NAME