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

tests: Speed up transport config tests by avoiding interpreter discovery #969

Merged

Conversation

moreati
Copy link
Member

@moreati moreati commented Oct 18, 2022

Reduced execution time of tests/ansible/integration/transport_config/all.yml from 11 minutes to 49 seconds.

Reduced execution time of tests/ansible/integration/transport_config/all.yml
from 11 minutes to 49 seconds.
@moreati
Copy link
Member Author

moreati commented Oct 18, 2022

alex@bertha:~/src/mitogen$ ANSIBLE_RUN_TAGS=transport_config tox -e py310-mode_ansible-ansible6-distros_ubuntu2004
...

TASK [assert_equal left=out.result[0].method, right=local] *************************************************************
Tuesday 18 October 2022  00:36:54 +0100 (0:00:00.048)       0:00:49.172 ******* 
ok: [tc-transport-smart]

TASK [assert_equal left=out.result[1].method, right=ssh] ***************************************************************
Tuesday 18 October 2022  00:36:54 +0100 (0:00:00.036)       0:00:49.209 ******* 
ok: [tc-transport-smart]

PLAY RECAP *************************************************************************************************************
localhost                  : ok=8    changed=3    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
tc-become-method-su        : ok=4    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
tc-become-method-unset     : ok=6    changed=3    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
tc-become-pass-both        : ok=2    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
tc-become-pass-pass        : ok=4    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
tc-become-pass-password    : ok=4    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
tc-become-pass-unset       : ok=8    changed=4    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
tc-become-set              : ok=4    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
tc-become-unset            : ok=4    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
tc-become-user-set         : ok=6    changed=3    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
tc-become-user-unset       : ok=6    changed=3    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
tc-password-explicit-both  : ok=5    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
tc-password-explicit-pass  : ok=5    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
tc-password-explicit-ssh   : ok=5    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
tc-password-unset          : ok=5    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
tc-port-both               : ok=2    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
tc-port-explicit-port      : ok=2    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
tc-port-explicit-ssh       : ok=4    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
tc-port-unset              : ok=8    changed=4    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
tc-python-path-hostvar     : ok=5    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
tc-python-path-local-explicit : ok=2    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
tc-python-path-local-unset : ok=2    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
tc-python-path-unset       : ok=8    changed=3    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
tc-remote-addr-explicit-both : ok=5    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
tc-remote-addr-explicit-host : ok=5    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
tc-remote-addr-explicit-ssh : ok=5    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
tc-remote-addr-unset       : ok=5    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
tc-remote-user-explicit-both : ok=5    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
tc-remote-user-explicit-ssh : ok=5    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
tc-remote-user-explicit-user : ok=5    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
tc-remote-user-unset       : ok=5    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
tc-transport-local         : ok=10   changed=4    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
tc-transport-smart         : ok=5    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
tc-transport-unset         : ok=5    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   

Tuesday 18 October 2022  00:36:54 +0100 (0:00:00.044)       0:00:49.253 ******* 
=============================================================================== 
mitogen_get_stack ---------------------------------------------------------------------------------------------- 10.26s
mitogen_get_stack ----------------------------------------------------------------------------------------------- 9.95s
mitogen_get_stack ----------------------------------------------------------------------------------------------- 9.81s
mitogen_get_stack ----------------------------------------------------------------------------------------------- 7.84s
mitogen_get_stack ----------------------------------------------------------------------------------------------- 0.66s
mitogen_get_stack ----------------------------------------------------------------------------------------------- 0.48s
assert ---------------------------------------------------------------------------------------------------------- 0.08s
assert ---------------------------------------------------------------------------------------------------------- 0.08s
assert ---------------------------------------------------------------------------------------------------------- 0.07s
assert ---------------------------------------------------------------------------------------------------------- 0.07s
Playbook run took 0 days, 0 hours, 0 minutes, 49 seconds
Finished running: ['./run_ansible_playbook.py', 'all.yml', '-i', '/tmp/mitogen_ci_lib66g99t1a/hosts']

Refs mitogen-hq#925 mitogen-hq#969

I'm not 100% confident that merely removing this is the full fix,
without substituting something else. I am sure keeping it would be
the greater of two evils. __del__() should be avoided on general
principal, and it's associated with multiple intermittant CI
failures, plus multiple user reported issues.
@moreati moreati force-pushed the transport_config_python_undiscover branch from 7c27551 to 392c41d Compare November 4, 2022 00:29
@moreati
Copy link
Member Author

moreati commented Nov 4, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@moreati moreati merged commit a47b9f3 into mitogen-hq:master Nov 6, 2022
@moreati moreati deleted the transport_config_python_undiscover branch November 6, 2022 00:12
MemberIT pushed a commit to tribunadigital/mitogen that referenced this pull request Jan 23, 2023
Refs mitogen-hq#925 mitogen-hq#969

I'm not 100% confident that merely removing this is the full fix,
without substituting something else. I am sure keeping it would be
the greater of two evils. __del__() should be avoided on general
principal, and it's associated with multiple intermittant CI
failures, plus multiple user reported issues.
@moreati moreati restored the transport_config_python_undiscover branch February 5, 2023 13:34
@moreati moreati deleted the transport_config_python_undiscover branch February 5, 2023 13:36
thmour pushed a commit to thmour/mitogen that referenced this pull request Jan 26, 2024
Refs mitogen-hq#925 mitogen-hq#969

I'm not 100% confident that merely removing this is the full fix,
without substituting something else. I am sure keeping it would be
the greater of two evils. __del__() should be avoided on general
principal, and it's associated with multiple intermittant CI
failures, plus multiple user reported issues.
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.

1 participant