From 1ddff0231a806dd900bf64421b064c1c14e99077 Mon Sep 17 00:00:00 2001 From: Jacob Floyd Date: Thu, 9 Feb 2023 18:21:00 -0600 Subject: [PATCH 1/3] shorten timeout for uses_services/mongo tests --- pants-plugins/uses_services/mongo_rules_test.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pants-plugins/uses_services/mongo_rules_test.py b/pants-plugins/uses_services/mongo_rules_test.py index d0b54f888d..ff8a3c1284 100644 --- a/pants-plugins/uses_services/mongo_rules_test.py +++ b/pants-plugins/uses_services/mongo_rules_test.py @@ -75,6 +75,7 @@ def test_mongo_not_running(rule_runner: RuleRunner, mock_platform: Platform) -> request = UsesMongoRequest( db_host="127.100.20.7", db_port=10, # unassigned port, unlikely to be used + db_connection_timeout=10, # ms # very short as it should fail anyway ) with pytest.raises(ExecutionError) as exception_info: From 78c383fd384e53709919e4486830b7caa7f49529 Mon Sep 17 00:00:00 2001 From: Jacob Floyd Date: Thu, 9 Feb 2023 22:06:35 -0600 Subject: [PATCH 2/3] register rules for pants-plugins/uses_services rabbitmq and redis --- pants-plugins/uses_services/register.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pants-plugins/uses_services/register.py b/pants-plugins/uses_services/register.py index 5ca4363ab3..83ab32b3a7 100644 --- a/pants-plugins/uses_services/register.py +++ b/pants-plugins/uses_services/register.py @@ -16,7 +16,7 @@ PythonTestsGeneratorTarget, ) -from uses_services import mongo_rules, platform_rules +from uses_services import mongo_rules, platform_rules, rabbitmq_rules, redis_rules from uses_services.target_types import UsesServicesField @@ -26,4 +26,6 @@ def rules(): PythonTestTarget.register_plugin_field(UsesServicesField), *platform_rules.rules(), *mongo_rules.rules(), + *rabbitmq_rules.rules(), + *redis_rules.rules(), ] From 677e7b6752be6fb5e72fbf0f5747c25383122baa Mon Sep 17 00:00:00 2001 From: Jacob Floyd Date: Thu, 9 Feb 2023 22:44:01 -0600 Subject: [PATCH 3/3] update changelog entry --- CHANGELOG.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 754bd680d7..ea2f506aaa 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -16,7 +16,7 @@ Added to pants' use of PEX lockfiles. This is not a user-facing addition. #5778 #5789 #5817 #5795 #5830 #5833 #5834 #5841 #5840 #5838 #5842 #5837 #5849 #5850 #5846 #5853 #5848 #5847 #5858 #5857 #5860 #5868 #5871 #5864 #5874 #5884 #5893 #5891 - #5890 + #5890 #5898 Contributed by @cognifloyd * Added a joint index to solve the problem of slow mongo queries for scheduled executions. #5805