Skip to content

Commit

Permalink
chore: standardize format of BUILD overrides (#5948)
Browse files Browse the repository at this point in the history
* chore: standardize format of BUILD overrides

* update changelog entry
  • Loading branch information
cognifloyd committed Mar 31, 2023
1 parent c3fc181 commit f35c1a6
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 37 deletions.
24 changes: 12 additions & 12 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,30 @@ python_requirements(
source="requirements-pants.txt",
overrides={
# flex and stevedore uses pkg_resources w/o declaring the dep
("flex", "stevedore"): {
"dependencies": [
("flex", "stevedore"): dict(
dependencies=[
"//:reqs#setuptools",
]
},
),
# do not use the prance[flex] extra as that pulls in an old version of flex
"prance": {
"dependencies": [
"prance": dict(
dependencies=[
"//:reqs#flex",
]
},
),
# tooz needs one or more backends (tooz is used by the st2 coordination backend)
"tooz": {
"dependencies": [
"tooz": dict(
dependencies=[
"//:reqs#redis",
"//:reqs#zake",
]
},
),
# make sure anything that uses st2-auth-ldap gets the st2auth constant
"st2-auth-ldap": {
"dependencies": [
"st2-auth-ldap": dict(
dependencies=[
"st2auth/st2auth/backends/constants.py",
]
},
),
},
)

Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Added
#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 #5927 #5925 #5928 #5929 #5930
#5931 #5932
#5931 #5932 #5948
Contributed by @cognifloyd

* Added a joint index to solve the problem of slow mongo queries for scheduled executions. #5805
Expand Down
6 changes: 3 additions & 3 deletions contrib/core/tests/BUILD
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
python_tests(
skip_pylint=True,
overrides={
"test_action_sendmail.py": {
"dependencies": [
"test_action_sendmail.py": dict(
dependencies=[
# contrib/core is symlinked to st2tests/st2tests/fixtures/packs/core
# so pants thinks "mail-parser" is defined twice, making it ambiguous.
# Use contrib/core as the canonical copy.
"contrib/core:reqs#mail-parser",
],
}
),
},
)
2 changes: 1 addition & 1 deletion contrib/examples/actions/bash_random/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
shell_sources(
overrides={
"random2.sh": {"skip_shellcheck": True},
"random2.sh": dict(skip_shellcheck=True),
},
)
6 changes: 3 additions & 3 deletions pants-plugins/uses_services/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ python_tests(
# is somehow broken, then any failures would prevent these tests
# from running to tell us what is wrong.
# overrides={
# "mongo_rules_test.py": {"uses": ["mongo"]},
# "rabbitmq_rules_test.py": {"uses": ["rabbitmq"]},
# "redis_rules_test.py": {"uses": ["redis"]},
# "mongo_rules_test.py": dict(uses=["mongo"]),
# "rabbitmq_rules_test.py": dict(uses=["rabbitmq"]),
# "redis_rules_test.py": dict(uses=["redis"]),
# },
)
6 changes: 3 additions & 3 deletions st2actions/conf/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ files(
name="logging",
sources=["logging*.conf"],
overrides={
"logging.conf": {
"dependencies": [
"logging.conf": dict(
dependencies=[
"//:reqs#python-json-logger",
],
},
),
},
)

Expand Down
16 changes: 8 additions & 8 deletions st2common/bin/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ st2_shell_sources_and_resources(
sources=["st2ctl", "st2-self-check", "st2-run-pack-tests"],
skip_shellcheck=True,
overrides={
"st2ctl": {
"dependencies": [
"st2ctl": dict(
dependencies=[
"./st2-register-content",
"./st2-cleanup-db",
],
},
"st2-self-check": {
"dependencies": [
),
"st2-self-check": dict(
dependencies=[
"./st2ctl:shell",
# TODO: dep on st2client cli?
],
},
),
# st2-run-pack-tests creates its own virtualenv on the fly and
# installs its dependencies, so they don't need to be listed here.
# installs its dependencies, so most don't need to be listed here.
# It can optionally use the deps installed with st2tests package.
# "st2-run-pack-tests": {},
# "st2-run-pack-tests": dict(),
},
)
6 changes: 3 additions & 3 deletions st2common/st2common/bootstrap/BUILD
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
python_sources(
overrides={
"policiesregistrar.py": {
"dependencies": [
"policiesregistrar.py": dict(
dependencies=[
"st2common/st2common/policies/meta:policies_meta",
],
},
),
},
)
6 changes: 3 additions & 3 deletions tools/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ python_requirement(

python_sources(
overrides={
"config_gen.py": {
"dependencies": [
"config_gen.py": dict(
dependencies=[
# the auth backends get listed in the conf file
"//:auth_backends",
# We are using string import detection to gather the imports
# from CONFIGS in config_gen.py. The following command is
# helpful in validating that dependencies include everything:
# grep -rl '^def register_opts(ignore_errors=False):' st2*
]
},
),
},
)

Expand Down

0 comments on commit f35c1a6

Please sign in to comment.