Skip to content

Commit a43c70b

Browse files
authored
Merge pull request #5927: Pants: add some missing external dependencies
2 parents a81d7d3 + 780ad4c commit a43c70b

10 files changed

Lines changed: 291 additions & 191 deletions

File tree

CHANGELOG.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Added
1616
to pants' use of PEX lockfiles. This is not a user-facing addition.
1717
#5778 #5789 #5817 #5795 #5830 #5833 #5834 #5841 #5840 #5838 #5842 #5837 #5849 #5850
1818
#5846 #5853 #5848 #5847 #5858 #5857 #5860 #5868 #5871 #5864 #5874 #5884 #5893 #5891
19-
#5890 #5898 #5901 #5906 #5899 #5907 #5909 #5922 #5926
19+
#5890 #5898 #5901 #5906 #5899 #5907 #5909 #5922 #5926 #5927
2020
Contributed by @cognifloyd
2121

2222
* Added a joint index to solve the problem of slow mongo queries for scheduled executions. #5805

lockfiles/st2.lock

Lines changed: 247 additions & 183 deletions
Large diffs are not rendered by default.

st2actions/conf/BUILD

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ file(
66
files(
77
name="logging",
88
sources=["logging*.conf"],
9+
overrides={
10+
"logging.conf": {
11+
"dependencies": [
12+
"//:reqs#python-json-logger",
13+
],
14+
},
15+
},
916
)
1017

1118
files(

st2client/BUILD

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,13 @@ st2_component_python_distribution(
55
"st2": "st2client.shell:main",
66
},
77
},
8+
dependencies=[
9+
# required for SOCKS proxy support (HTTP_PROXY, HTTPS_PROXY, NO_PROXY)
10+
":pysocks",
11+
],
12+
)
13+
14+
python_requirement(
15+
name="pysocks",
16+
requirements=["pysocks"],
817
)

st2common/st2common/util/BUILD

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
11
python_sources()
2+
3+
# st2common.utils.concurrency allows using gevent instead of eventlet.
4+
# This gevent support is WIP.
5+
# python_requirement(
6+
# name="gevent",
7+
# requirements=["gevent"],
8+
# )

st2common/st2common/util/concurrency.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
eventlet = None
2727

2828
try:
29-
import gevent # pylint: disable=import-error
29+
import gevent # pylint: disable=import-error # pants: no-infer-dep
3030
import gevent.pool
3131
except ImportError:
3232
gevent = None

st2common/st2common/util/monkey_patch.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ def monkey_patch(patch_thread=None):
5656
if patch_thread is None:
5757
patch_thread = not is_use_debugger_flag_provided()
5858

59+
# TODO: support gevent.patch_all if .concurrency.CONCURRENCY_LIBRARY = "gevent"
5960
eventlet.monkey_patch(
6061
os=True, select=True, socket=True, thread=patch_thread, time=True
6162
)

tools/BUILD

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
python_requirement(
2+
name="graphviz",
3+
requirements=["graphviz"],
4+
# used by st2-analyze-links.py and visualize_action_chain.py
5+
)
6+
7+
python_requirement(
8+
name="pika",
9+
requirements=["pika"],
10+
# used by direct_queue_publisher.py
11+
)
12+
113
python_sources(
214
overrides={
315
"config_gen.py": {

tools/st2-analyze-links.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,11 @@ def generate_graph(self, rule_links, out_file):
152152
print(rule_link._source_action_ref)
153153
if rule_link._source_action_ref not in nodes:
154154
nodes.add(rule_link._source_action_ref)
155-
dot.add_node(rule_link._source_action_ref)
155+
dot.node(rule_link._source_action_ref, rule_link._source_action_ref)
156156
if rule_link._dest_action_ref not in nodes:
157157
nodes.add(rule_link._dest_action_ref)
158-
dot.add_node(rule_link._dest_action_ref)
159-
dot.add_edge(
158+
dot.node(rule_link._dest_action_ref, rule_link._dest_action_ref)
159+
dot.edge(
160160
rule_link._source_action_ref,
161161
rule_link._dest_action_ref,
162162
constraint="true",

tools/visualize_action_chain.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def main(metadata_path, output_path, print_source=False):
7171
# Add all nodes
7272
node = chain_holder.get_next_node()
7373
while node:
74-
dot.add_node(node.name)
74+
dot.node(node.name, node.name)
7575
node = chain_holder.get_next_node(curr_node_name=node.name)
7676

7777
# Add connections
@@ -89,7 +89,7 @@ def main(metadata_path, output_path, print_source=False):
8989

9090
# Add success node (if any)
9191
if success_node:
92-
dot.add_edge(
92+
dot.edge(
9393
previous_node.name,
9494
success_node.name,
9595
constraint="true",
@@ -102,7 +102,7 @@ def main(metadata_path, output_path, print_source=False):
102102

103103
# Add failure node (if any)
104104
if failure_node:
105-
dot.add_edge(
105+
dot.edge(
106106
previous_node.name,
107107
failure_node.name,
108108
constraint="true",

0 commit comments

Comments
 (0)