Skip to content
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
#5890 #5898 #5901 #5906 #5899 #5907 #5909
Contributed by @cognifloyd

* Added a joint index to solve the problem of slow mongo queries for scheduled executions. #5805
Expand Down
2 changes: 2 additions & 0 deletions pants-plugins/macros.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ def st2_component_python_distribution(**kwargs):
description = (
f"{st2_component} StackStorm event-driven automation platform component"
)
# setup(scripts=[...]) is for pre-made scripts, which we have.
# TODO: use entry_points.console_scripts instead of hand-generating these.
scripts = kwargs.pop("scripts", [])

st2_license(dest=st2_component)
Expand Down
10 changes: 10 additions & 0 deletions st2actions/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
st2_component_python_distribution(
component_name="st2actions",
scripts=[
"bin/st2actionrunner",
"bin/st2notifier",
"bin/st2workflowengine",
"bin/st2scheduler",
"bin/runners.sh:shell", # used by service files installed by st2-packaging
],
Comment on lines +3 to +9
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

st2/st2actions/setup.py

Lines 49 to 54 in f115934

scripts=[
"bin/st2actionrunner",
"bin/st2notifier",
"bin/st2workflowengine",
"bin/st2scheduler",
],

Plus I noticed that st2-packaging needs runners.sh, so I included that as well.

)
4 changes: 4 additions & 0 deletions st2api/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
st2_component_python_distribution(
component_name="st2api",
scripts=["bin/st2api"],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scripts=["bin/st2api"],

)
9 changes: 9 additions & 0 deletions st2auth/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
st2_component_python_distribution(
component_name="st2auth",
scripts=["bin/st2auth"],
entry_points={
stevedore_namespace("st2auth.sso.backends"): {
"noop": "st2auth.sso.noop:NoOpSingleSignOnBackend",
},
},
Comment on lines +3 to +8
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

st2/st2auth/setup.py

Lines 49 to 52 in f115934

scripts=["bin/st2auth"],
entry_points={
"st2auth.sso.backends": ["noop = st2auth.sso.noop:NoOpSingleSignOnBackend"]
},

)
8 changes: 8 additions & 0 deletions st2client/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
st2_component_python_distribution(
component_name="st2client",
entry_points={
"console_scripts": {
"st2": "st2client.shell:main",
},
},
Comment on lines +3 to +7
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

entry_points={"console_scripts": ["st2 = st2client.shell:main"]},

)
39 changes: 39 additions & 0 deletions st2common/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
st2_component_python_distribution(
component_name="st2common",
scripts=[
# some scripts in bin are only for development and should not be included.
"bin/st2-bootstrap-rmq",
"bin/st2-cleanup-db",
"bin/st2-register-content",
"bin/st2-purge-executions",
"bin/st2-purge-workflows",
"bin/st2-purge-task-executions",
"bin/st2-purge-tokens",
"bin/st2-purge-trigger-instances",
"bin/st2-purge-traces",
"bin/st2-purge-rule-enforcements",
"bin/st2-generate-symmetric-crypto-key",
"bin/st2-track-result",
"bin/st2-validate-pack",
"bin/st2-validate-pack-config",
"bin/st2-pack-install",
"bin/st2-pack-download",
"bin/st2-pack-setup-virtualenv",
"bin/migrations/v3.5/st2-migrate-db-dict-field-values",
"bin/st2-run-pack-tests:shell",
"bin/st2ctl:shell",
"bin/st2-self-check:shell",
# dev scripts we might want to include
# "bin/st2-generate-schemas",
],
entry_points={
stevedore_namespace("st2common.metrics.driver"): {
"statsd": "st2common.metrics.drivers.statsd_driver:StatsdDriver",
"noop": "st2common.metrics.drivers.noop_driver:NoopDriver",
"echo": "st2common.metrics.drivers.echo_driver:EchoDriver",
},
stevedore_namespace("st2common.rbac.backend"): {
"noop": "st2common.rbac.backends.noop:NoOpRBACBackend",
},
},
Comment on lines +3 to +38
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

st2/st2common/setup.py

Lines 50 to 82 in f115934

scripts=[
"bin/st2-bootstrap-rmq",
"bin/st2-cleanup-db",
"bin/st2-register-content",
"bin/st2-purge-executions",
"bin/st2-purge-workflows",
"bin/st2-purge-task-executions",
"bin/st2-purge-trigger-instances",
"bin/st2-purge-traces",
"bin/st2-purge-rule-enforcements",
"bin/st2-purge-tokens",
"bin/st2-run-pack-tests",
"bin/st2ctl",
"bin/st2-generate-symmetric-crypto-key",
"bin/st2-self-check",
"bin/st2-track-result",
"bin/st2-validate-pack",
"bin/st2-validate-pack-config",
"bin/st2-pack-install",
"bin/st2-pack-download",
"bin/st2-pack-setup-virtualenv",
"bin/migrations/v3.5/st2-migrate-db-dict-field-values",
],
entry_points={
"st2common.metrics.driver": [
"statsd = st2common.metrics.drivers.statsd_driver:StatsdDriver",
"noop = st2common.metrics.drivers.noop_driver:NoopDriver",
"echo = st2common.metrics.drivers.echo_driver:EchoDriver",
],
"st2common.rbac.backend": [
"noop = st2common.rbac.backends.noop:NoOpRBACBackend"
],
},

A few of the scripts were missing in setup.py, so I included them here. Also, a couple of them were missing the execute bit, so I added that as well.,

)
Empty file modified st2common/bin/st2-purge-task-executions
100644 → 100755
Empty file.
Empty file modified st2common/bin/st2-purge-workflows
100644 → 100755
Empty file.
11 changes: 11 additions & 0 deletions st2reactor/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
st2_component_python_distribution(
component_name="st2reactor",
scripts=[
"bin/st2-rule-tester",
"bin/st2-trigger-refire",
"bin/st2rulesengine",
"bin/st2sensorcontainer",
"bin/st2garbagecollector",
"bin/st2timersengine",
],
Comment on lines +3 to +10
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

st2/st2reactor/setup.py

Lines 49 to 56 in f115934

scripts=[
"bin/st2-rule-tester",
"bin/st2-trigger-refire",
"bin/st2rulesengine",
"bin/st2sensorcontainer",
"bin/st2garbagecollector",
"bin/st2timersengine",
],

)
4 changes: 4 additions & 0 deletions st2stream/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
st2_component_python_distribution(
component_name="st2stream",
scripts=["bin/st2stream"],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scripts=["bin/st2stream"],

)
3 changes: 3 additions & 0 deletions st2tests/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
st2_component_python_distribution(
component_name="st2tests",
)