Skip to content

Commit f35c1a6

Browse files
authored
chore: standardize format of BUILD overrides (#5948)
* chore: standardize format of BUILD overrides * update changelog entry
1 parent c3fc181 commit f35c1a6

File tree

9 files changed

+37
-37
lines changed

9 files changed

+37
-37
lines changed

BUILD

+12-12
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,30 @@ python_requirements(
33
source="requirements-pants.txt",
44
overrides={
55
# flex and stevedore uses pkg_resources w/o declaring the dep
6-
("flex", "stevedore"): {
7-
"dependencies": [
6+
("flex", "stevedore"): dict(
7+
dependencies=[
88
"//:reqs#setuptools",
99
]
10-
},
10+
),
1111
# do not use the prance[flex] extra as that pulls in an old version of flex
12-
"prance": {
13-
"dependencies": [
12+
"prance": dict(
13+
dependencies=[
1414
"//:reqs#flex",
1515
]
16-
},
16+
),
1717
# tooz needs one or more backends (tooz is used by the st2 coordination backend)
18-
"tooz": {
19-
"dependencies": [
18+
"tooz": dict(
19+
dependencies=[
2020
"//:reqs#redis",
2121
"//:reqs#zake",
2222
]
23-
},
23+
),
2424
# make sure anything that uses st2-auth-ldap gets the st2auth constant
25-
"st2-auth-ldap": {
26-
"dependencies": [
25+
"st2-auth-ldap": dict(
26+
dependencies=[
2727
"st2auth/st2auth/backends/constants.py",
2828
]
29-
},
29+
),
3030
},
3131
)
3232

CHANGELOG.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Added
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
1919
#5890 #5898 #5901 #5906 #5899 #5907 #5909 #5922 #5926 #5927 #5925 #5928 #5929 #5930
20-
#5931 #5932
20+
#5931 #5932 #5948
2121
Contributed by @cognifloyd
2222

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

contrib/core/tests/BUILD

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
python_tests(
22
skip_pylint=True,
33
overrides={
4-
"test_action_sendmail.py": {
5-
"dependencies": [
4+
"test_action_sendmail.py": dict(
5+
dependencies=[
66
# contrib/core is symlinked to st2tests/st2tests/fixtures/packs/core
77
# so pants thinks "mail-parser" is defined twice, making it ambiguous.
88
# Use contrib/core as the canonical copy.
99
"contrib/core:reqs#mail-parser",
1010
],
11-
}
11+
),
1212
},
1313
)
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
shell_sources(
22
overrides={
3-
"random2.sh": {"skip_shellcheck": True},
3+
"random2.sh": dict(skip_shellcheck=True),
44
},
55
)

pants-plugins/uses_services/BUILD

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ python_tests(
1414
# is somehow broken, then any failures would prevent these tests
1515
# from running to tell us what is wrong.
1616
# overrides={
17-
# "mongo_rules_test.py": {"uses": ["mongo"]},
18-
# "rabbitmq_rules_test.py": {"uses": ["rabbitmq"]},
19-
# "redis_rules_test.py": {"uses": ["redis"]},
17+
# "mongo_rules_test.py": dict(uses=["mongo"]),
18+
# "rabbitmq_rules_test.py": dict(uses=["rabbitmq"]),
19+
# "redis_rules_test.py": dict(uses=["redis"]),
2020
# },
2121
)

st2actions/conf/BUILD

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ files(
77
name="logging",
88
sources=["logging*.conf"],
99
overrides={
10-
"logging.conf": {
11-
"dependencies": [
10+
"logging.conf": dict(
11+
dependencies=[
1212
"//:reqs#python-json-logger",
1313
],
14-
},
14+
),
1515
},
1616
)
1717

st2common/bin/BUILD

+8-8
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@ st2_shell_sources_and_resources(
1010
sources=["st2ctl", "st2-self-check", "st2-run-pack-tests"],
1111
skip_shellcheck=True,
1212
overrides={
13-
"st2ctl": {
14-
"dependencies": [
13+
"st2ctl": dict(
14+
dependencies=[
1515
"./st2-register-content",
1616
"./st2-cleanup-db",
1717
],
18-
},
19-
"st2-self-check": {
20-
"dependencies": [
18+
),
19+
"st2-self-check": dict(
20+
dependencies=[
2121
"./st2ctl:shell",
2222
# TODO: dep on st2client cli?
2323
],
24-
},
24+
),
2525
# st2-run-pack-tests creates its own virtualenv on the fly and
26-
# installs its dependencies, so they don't need to be listed here.
26+
# installs its dependencies, so most don't need to be listed here.
2727
# It can optionally use the deps installed with st2tests package.
28-
# "st2-run-pack-tests": {},
28+
# "st2-run-pack-tests": dict(),
2929
},
3030
)

st2common/st2common/bootstrap/BUILD

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
python_sources(
22
overrides={
3-
"policiesregistrar.py": {
4-
"dependencies": [
3+
"policiesregistrar.py": dict(
4+
dependencies=[
55
"st2common/st2common/policies/meta:policies_meta",
66
],
7-
},
7+
),
88
},
99
)

tools/BUILD

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ python_requirement(
1212

1313
python_sources(
1414
overrides={
15-
"config_gen.py": {
16-
"dependencies": [
15+
"config_gen.py": dict(
16+
dependencies=[
1717
# the auth backends get listed in the conf file
1818
"//:auth_backends",
1919
# We are using string import detection to gather the imports
2020
# from CONFIGS in config_gen.py. The following command is
2121
# helpful in validating that dependencies include everything:
2222
# grep -rl '^def register_opts(ignore_errors=False):' st2*
2323
]
24-
},
24+
),
2525
},
2626
)
2727

0 commit comments

Comments
 (0)