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

Pants: add some missing external dependencies #5927

Merged
merged 7 commits into from
Mar 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 #5898 #5901 #5906 #5899 #5907 #5909 #5922 #5926
#5890 #5898 #5901 #5906 #5899 #5907 #5909 #5922 #5926 #5927
Contributed by @cognifloyd

* Added a joint index to solve the problem of slow mongo queries for scheduled executions. #5805
Expand Down
430 changes: 247 additions & 183 deletions lockfiles/st2.lock

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions st2actions/conf/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ file(
files(
name="logging",
sources=["logging*.conf"],
overrides={
"logging.conf": {
"dependencies": [
"//:reqs#python-json-logger",
],
},
},
)

files(
Expand Down
9 changes: 9 additions & 0 deletions st2client/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,13 @@ st2_component_python_distribution(
"st2": "st2client.shell:main",
},
},
dependencies=[
# required for SOCKS proxy support (HTTP_PROXY, HTTPS_PROXY, NO_PROXY)
":pysocks",
],
)

python_requirement(
name="pysocks",
requirements=["pysocks"],
)
7 changes: 7 additions & 0 deletions st2common/st2common/util/BUILD
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
python_sources()

# st2common.utils.concurrency allows using gevent instead of eventlet.
# This gevent support is WIP.
# python_requirement(
# name="gevent",
# requirements=["gevent"],
# )
2 changes: 1 addition & 1 deletion st2common/st2common/util/concurrency.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
eventlet = None

try:
import gevent # pylint: disable=import-error
import gevent # pylint: disable=import-error # pants: no-infer-dep
import gevent.pool
except ImportError:
gevent = None
Expand Down
1 change: 1 addition & 0 deletions st2common/st2common/util/monkey_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def monkey_patch(patch_thread=None):
if patch_thread is None:
patch_thread = not is_use_debugger_flag_provided()

# TODO: support gevent.patch_all if .concurrency.CONCURRENCY_LIBRARY = "gevent"
eventlet.monkey_patch(
os=True, select=True, socket=True, thread=patch_thread, time=True
)
Expand Down
12 changes: 12 additions & 0 deletions tools/BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
python_requirement(
name="graphviz",
requirements=["graphviz"],
# used by st2-analyze-links.py and visualize_action_chain.py
)

python_requirement(
name="pika",
requirements=["pika"],
# used by direct_queue_publisher.py
)

python_sources(
overrides={
"config_gen.py": {
Expand Down
6 changes: 3 additions & 3 deletions tools/st2-analyze-links.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,11 @@ def generate_graph(self, rule_links, out_file):
print(rule_link._source_action_ref)
if rule_link._source_action_ref not in nodes:
nodes.add(rule_link._source_action_ref)
dot.add_node(rule_link._source_action_ref)
dot.node(rule_link._source_action_ref, rule_link._source_action_ref)
if rule_link._dest_action_ref not in nodes:
nodes.add(rule_link._dest_action_ref)
dot.add_node(rule_link._dest_action_ref)
dot.add_edge(
dot.node(rule_link._dest_action_ref, rule_link._dest_action_ref)
dot.edge(
rule_link._source_action_ref,
rule_link._dest_action_ref,
constraint="true",
Expand Down
6 changes: 3 additions & 3 deletions tools/visualize_action_chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def main(metadata_path, output_path, print_source=False):
# Add all nodes
node = chain_holder.get_next_node()
while node:
dot.add_node(node.name)
dot.node(node.name, node.name)
node = chain_holder.get_next_node(curr_node_name=node.name)

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

# Add success node (if any)
if success_node:
dot.add_edge(
dot.edge(
previous_node.name,
success_node.name,
constraint="true",
Expand All @@ -102,7 +102,7 @@ def main(metadata_path, output_path, print_source=False):

# Add failure node (if any)
if failure_node:
dot.add_edge(
dot.edge(
previous_node.name,
failure_node.name,
constraint="true",
Expand Down