From 6e773e6ffac05bfe59445e47d95db7da1cc4e4eb Mon Sep 17 00:00:00 2001 From: Jacob Floyd Date: Fri, 27 Jan 2023 09:27:12 -0600 Subject: [PATCH] Pants: Add `pack_metadata` targets to BUILD files (#5871) * pants: add pack_metadata targets * add packs_metadata and related targets * Add pack_metadata dependencies * Add pack_metadata for more fixtures * Allow pants to detect packs fixture usage * Cleanup fixtures BUILD files Several fixtures have been adjusted so pants can infer them. So, I dropped the hard-coded dep in the BUILD files. * add BUILD metadata for st2tests/testpacks * depend on pack_metadata in st2tests.fixtures.packs.core.fixture * Add pack_metadata targets in st2reactor pack fixtures * Enable pants-plugins/pack_metadata This reverts commit 4a1b241cb983ae468e265355d20849ae8a870b9c. * update changelog entry * disable spurious pack_metadata target where there is no metadata * add pack_metadata to contrib/debug with `./pants tailor ::` --- CHANGELOG.rst | 2 +- contrib/chatops/BUILD | 3 +++ contrib/core/BUILD | 8 +++++++- contrib/debug/BUILD | 3 +++ contrib/default/BUILD | 3 +++ contrib/examples/BUILD | 4 ++++ contrib/hello_st2/BUILD | 3 +++ contrib/linux/BUILD | 4 ++++ contrib/packs/BUILD | 3 +++ contrib/packs/tests/fixtures/BUILD | 9 ++++++++- contrib/packs/tests/fixtures/stackstorm-test/BUILD | 3 +++ contrib/packs/tests/fixtures/stackstorm-test2/BUILD | 3 +++ contrib/packs/tests/fixtures/stackstorm-test3/BUILD | 3 +++ contrib/packs/tests/fixtures/stackstorm-test4/BUILD | 3 +++ pants.toml | 2 +- st2reactor/tests/fixtures/packs/pack_with_rules/BUILD | 8 +++++++- st2reactor/tests/fixtures/packs/pack_with_sensor/BUILD | 8 +++++++- st2tests/st2tests/fixtures/aliases/BUILD | 8 +++++++- st2tests/st2tests/fixtures/backstop/BUILD | 8 +++++++- st2tests/st2tests/fixtures/descendants/BUILD | 8 +++++++- st2tests/st2tests/fixtures/generic/BUILD | 8 +++++++- st2tests/st2tests/fixtures/localrunner_pack/BUILD | 8 +++++++- st2tests/st2tests/fixtures/packs/BUILD | 3 +-- .../st2tests/fixtures/packs/action_chain_tests/BUILD | 8 +++++++- st2tests/st2tests/fixtures/packs/dummy_pack_1/BUILD | 5 +++++ st2tests/st2tests/fixtures/packs/dummy_pack_10/BUILD | 8 +++++++- st2tests/st2tests/fixtures/packs/dummy_pack_11/BUILD | 5 +++++ st2tests/st2tests/fixtures/packs/dummy_pack_12/BUILD | 8 +++++++- st2tests/st2tests/fixtures/packs/dummy_pack_13/BUILD | 8 +++++++- st2tests/st2tests/fixtures/packs/dummy_pack_14/BUILD | 8 +++++++- st2tests/st2tests/fixtures/packs/dummy_pack_15/BUILD | 8 +++++++- st2tests/st2tests/fixtures/packs/dummy_pack_16/BUILD | 8 +++++++- st2tests/st2tests/fixtures/packs/dummy_pack_17/BUILD | 8 +++++++- st2tests/st2tests/fixtures/packs/dummy_pack_18/BUILD | 8 +++++++- st2tests/st2tests/fixtures/packs/dummy_pack_19/BUILD | 5 +++++ st2tests/st2tests/fixtures/packs/dummy_pack_2/BUILD | 8 +++++++- st2tests/st2tests/fixtures/packs/dummy_pack_20/BUILD | 8 +++++++- st2tests/st2tests/fixtures/packs/dummy_pack_21/BUILD | 8 +++++++- st2tests/st2tests/fixtures/packs/dummy_pack_22/BUILD | 5 +++++ st2tests/st2tests/fixtures/packs/dummy_pack_23/BUILD | 10 +++++++++- st2tests/st2tests/fixtures/packs/dummy_pack_3/BUILD | 8 +++++++- st2tests/st2tests/fixtures/packs/dummy_pack_4/BUILD | 8 +++++++- st2tests/st2tests/fixtures/packs/dummy_pack_5/BUILD | 5 +++++ st2tests/st2tests/fixtures/packs/dummy_pack_6/BUILD | 5 +++++ st2tests/st2tests/fixtures/packs/dummy_pack_7/BUILD | 5 +++++ st2tests/st2tests/fixtures/packs/dummy_pack_8/BUILD | 8 +++++++- st2tests/st2tests/fixtures/packs/dummy_pack_9/BUILD | 8 +++++++- .../dummy_pack_schema_with_additional_items_1/BUILD | 8 +++++++- .../BUILD | 8 +++++++- .../packs/dummy_pack_schema_with_nested_object_1/BUILD | 5 +++++ .../packs/dummy_pack_schema_with_nested_object_2/BUILD | 5 +++++ .../packs/dummy_pack_schema_with_nested_object_3/BUILD | 5 +++++ .../packs/dummy_pack_schema_with_nested_object_4/BUILD | 5 +++++ .../packs/dummy_pack_schema_with_nested_object_5/BUILD | 8 +++++++- .../BUILD | 8 +++++++- .../dummy_pack_schema_with_pattern_properties_1/BUILD | 8 +++++++- st2tests/st2tests/fixtures/packs/orquesta_tests/BUILD | 8 +++++++- .../packs/pack_dir_name_doesnt_match_ref/BUILD | 8 +++++++- .../fixtures/packs/pack_invalid_requirements/BUILD | 8 +++++++- .../fixtures/packs/test_library_dependencies/BUILD | 8 +++++++- st2tests/st2tests/fixtures/packs_1/dummy_pack_4/BUILD | 8 +++++++- .../fixtures/packs_invalid/dummy_pack_17/BUILD | 8 +++++++- .../fixtures/packs_invalid/dummy_pack_18/BUILD | 8 +++++++- st2tests/st2tests/fixtures/rule_enforcements/BUILD | 8 +++++++- st2tests/st2tests/fixtures/timers/BUILD | 8 +++++++- st2tests/st2tests/fixtures/traces/BUILD | 8 +++++++- st2tests/testpacks/checks/BUILD | 3 +++ st2tests/testpacks/errorcheck/BUILD | 3 +++ 68 files changed, 389 insertions(+), 45 deletions(-) create mode 100644 contrib/chatops/BUILD create mode 100644 contrib/debug/BUILD create mode 100644 contrib/default/BUILD create mode 100644 contrib/hello_st2/BUILD create mode 100644 contrib/packs/BUILD create mode 100644 contrib/packs/tests/fixtures/stackstorm-test/BUILD create mode 100644 contrib/packs/tests/fixtures/stackstorm-test2/BUILD create mode 100644 contrib/packs/tests/fixtures/stackstorm-test3/BUILD create mode 100644 contrib/packs/tests/fixtures/stackstorm-test4/BUILD create mode 100644 st2tests/testpacks/checks/BUILD create mode 100644 st2tests/testpacks/errorcheck/BUILD diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 728a95fb90..3d37b236c2 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -14,7 +14,7 @@ Added working on StackStorm, improve our security posture, and improve CI reliability thanks in part 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 + #5846 #5853 #5848 #5847 #5858 #5857 #5860 #5868 #5871 Contributed by @cognifloyd * Added a joint index to solve the problem of slow mongo queries for scheduled executions. #5805 diff --git a/contrib/chatops/BUILD b/contrib/chatops/BUILD new file mode 100644 index 0000000000..1a74d30186 --- /dev/null +++ b/contrib/chatops/BUILD @@ -0,0 +1,3 @@ +pack_metadata( + name="metadata", +) diff --git a/contrib/core/BUILD b/contrib/core/BUILD index a71b6ad328..b59086b916 100644 --- a/contrib/core/BUILD +++ b/contrib/core/BUILD @@ -1,4 +1,6 @@ -python_sources() +pack_metadata( + name="metadata", +) python_requirements( name="reqs", @@ -7,3 +9,7 @@ python_requirements( # https://github.com/pantsbuild/pants/pull/17390 module_mapping={"mail-parser": ["mailparser"]}, ) + +python_sources( + dependencies=[":metadata"], +) diff --git a/contrib/debug/BUILD b/contrib/debug/BUILD new file mode 100644 index 0000000000..1a74d30186 --- /dev/null +++ b/contrib/debug/BUILD @@ -0,0 +1,3 @@ +pack_metadata( + name="metadata", +) diff --git a/contrib/default/BUILD b/contrib/default/BUILD new file mode 100644 index 0000000000..1a74d30186 --- /dev/null +++ b/contrib/default/BUILD @@ -0,0 +1,3 @@ +pack_metadata( + name="metadata", +) diff --git a/contrib/examples/BUILD b/contrib/examples/BUILD index cdb13c30df..de3b866405 100644 --- a/contrib/examples/BUILD +++ b/contrib/examples/BUILD @@ -1,3 +1,7 @@ +pack_metadata( + name="metadata", +) + # Using `python_requirements()` here results in: # ">1 target exports this module, so it is ambiguous which to use" # This error refers to the "requests" module. diff --git a/contrib/hello_st2/BUILD b/contrib/hello_st2/BUILD new file mode 100644 index 0000000000..1a74d30186 --- /dev/null +++ b/contrib/hello_st2/BUILD @@ -0,0 +1,3 @@ +pack_metadata( + name="metadata", +) diff --git a/contrib/linux/BUILD b/contrib/linux/BUILD index b8519ce575..8a73ff391a 100644 --- a/contrib/linux/BUILD +++ b/contrib/linux/BUILD @@ -1,3 +1,7 @@ +pack_metadata( + name="metadata", +) + python_requirements( name="reqs", ) diff --git a/contrib/packs/BUILD b/contrib/packs/BUILD new file mode 100644 index 0000000000..1a74d30186 --- /dev/null +++ b/contrib/packs/BUILD @@ -0,0 +1,3 @@ +pack_metadata( + name="metadata", +) diff --git a/contrib/packs/tests/fixtures/BUILD b/contrib/packs/tests/fixtures/BUILD index db46e8d6c9..57c54c7b41 100644 --- a/contrib/packs/tests/fixtures/BUILD +++ b/contrib/packs/tests/fixtures/BUILD @@ -1 +1,8 @@ -python_sources() +python_sources( + dependencies=[ + "./stackstorm-test:metadata", + "./stackstorm-test2:metadata", + "./stackstorm-test3:metadata", + "./stackstorm-test4:metadata", + ], +) diff --git a/contrib/packs/tests/fixtures/stackstorm-test/BUILD b/contrib/packs/tests/fixtures/stackstorm-test/BUILD new file mode 100644 index 0000000000..1a74d30186 --- /dev/null +++ b/contrib/packs/tests/fixtures/stackstorm-test/BUILD @@ -0,0 +1,3 @@ +pack_metadata( + name="metadata", +) diff --git a/contrib/packs/tests/fixtures/stackstorm-test2/BUILD b/contrib/packs/tests/fixtures/stackstorm-test2/BUILD new file mode 100644 index 0000000000..1a74d30186 --- /dev/null +++ b/contrib/packs/tests/fixtures/stackstorm-test2/BUILD @@ -0,0 +1,3 @@ +pack_metadata( + name="metadata", +) diff --git a/contrib/packs/tests/fixtures/stackstorm-test3/BUILD b/contrib/packs/tests/fixtures/stackstorm-test3/BUILD new file mode 100644 index 0000000000..1a74d30186 --- /dev/null +++ b/contrib/packs/tests/fixtures/stackstorm-test3/BUILD @@ -0,0 +1,3 @@ +pack_metadata( + name="metadata", +) diff --git a/contrib/packs/tests/fixtures/stackstorm-test4/BUILD b/contrib/packs/tests/fixtures/stackstorm-test4/BUILD new file mode 100644 index 0000000000..1a74d30186 --- /dev/null +++ b/contrib/packs/tests/fixtures/stackstorm-test4/BUILD @@ -0,0 +1,3 @@ +pack_metadata( + name="metadata", +) diff --git a/pants.toml b/pants.toml index e9bf57cb95..375f9a1843 100644 --- a/pants.toml +++ b/pants.toml @@ -25,7 +25,7 @@ backend_packages = [ # internal plugins in pants-plugins/ "pants.backend.plugin_development", "api_spec", - #"pack_metadata", + "pack_metadata", "sample_conf", "schemas", ] diff --git a/st2reactor/tests/fixtures/packs/pack_with_rules/BUILD b/st2reactor/tests/fixtures/packs/pack_with_rules/BUILD index db46e8d6c9..99d651ce3c 100644 --- a/st2reactor/tests/fixtures/packs/pack_with_rules/BUILD +++ b/st2reactor/tests/fixtures/packs/pack_with_rules/BUILD @@ -1 +1,7 @@ -python_sources() +pack_metadata( + name="metadata", +) + +python_sources( + dependencies=[":metadata"], +) diff --git a/st2reactor/tests/fixtures/packs/pack_with_sensor/BUILD b/st2reactor/tests/fixtures/packs/pack_with_sensor/BUILD index db46e8d6c9..99d651ce3c 100644 --- a/st2reactor/tests/fixtures/packs/pack_with_sensor/BUILD +++ b/st2reactor/tests/fixtures/packs/pack_with_sensor/BUILD @@ -1 +1,7 @@ -python_sources() +pack_metadata( + name="metadata", +) + +python_sources( + dependencies=[":metadata"], +) diff --git a/st2tests/st2tests/fixtures/aliases/BUILD b/st2tests/st2tests/fixtures/aliases/BUILD index db46e8d6c9..99d651ce3c 100644 --- a/st2tests/st2tests/fixtures/aliases/BUILD +++ b/st2tests/st2tests/fixtures/aliases/BUILD @@ -1 +1,7 @@ -python_sources() +pack_metadata( + name="metadata", +) + +python_sources( + dependencies=[":metadata"], +) diff --git a/st2tests/st2tests/fixtures/backstop/BUILD b/st2tests/st2tests/fixtures/backstop/BUILD index db46e8d6c9..99d651ce3c 100644 --- a/st2tests/st2tests/fixtures/backstop/BUILD +++ b/st2tests/st2tests/fixtures/backstop/BUILD @@ -1 +1,7 @@ -python_sources() +pack_metadata( + name="metadata", +) + +python_sources( + dependencies=[":metadata"], +) diff --git a/st2tests/st2tests/fixtures/descendants/BUILD b/st2tests/st2tests/fixtures/descendants/BUILD index db46e8d6c9..99d651ce3c 100644 --- a/st2tests/st2tests/fixtures/descendants/BUILD +++ b/st2tests/st2tests/fixtures/descendants/BUILD @@ -1 +1,7 @@ -python_sources() +pack_metadata( + name="metadata", +) + +python_sources( + dependencies=[":metadata"], +) diff --git a/st2tests/st2tests/fixtures/generic/BUILD b/st2tests/st2tests/fixtures/generic/BUILD index db46e8d6c9..99d651ce3c 100644 --- a/st2tests/st2tests/fixtures/generic/BUILD +++ b/st2tests/st2tests/fixtures/generic/BUILD @@ -1 +1,7 @@ -python_sources() +pack_metadata( + name="metadata", +) + +python_sources( + dependencies=[":metadata"], +) diff --git a/st2tests/st2tests/fixtures/localrunner_pack/BUILD b/st2tests/st2tests/fixtures/localrunner_pack/BUILD index db46e8d6c9..99d651ce3c 100644 --- a/st2tests/st2tests/fixtures/localrunner_pack/BUILD +++ b/st2tests/st2tests/fixtures/localrunner_pack/BUILD @@ -1 +1,7 @@ -python_sources() +pack_metadata( + name="metadata", +) + +python_sources( + dependencies=[":metadata"], +) diff --git a/st2tests/st2tests/fixtures/packs/BUILD b/st2tests/st2tests/fixtures/packs/BUILD index 4813fd914d..c53022a3ca 100644 --- a/st2tests/st2tests/fixtures/packs/BUILD +++ b/st2tests/st2tests/fixtures/packs/BUILD @@ -3,8 +3,7 @@ # instructions on how to checkout the submodules if they are not checked out. # The test_content_version* targets are dependencies of ./test_content_version_fixture -# pack_metadata_in_git_submodule( -resources( +pack_metadata_in_git_submodule( name="test_content_version_metadata", sources=[ "test_content_version/pack.yaml", diff --git a/st2tests/st2tests/fixtures/packs/action_chain_tests/BUILD b/st2tests/st2tests/fixtures/packs/action_chain_tests/BUILD index db46e8d6c9..99d651ce3c 100644 --- a/st2tests/st2tests/fixtures/packs/action_chain_tests/BUILD +++ b/st2tests/st2tests/fixtures/packs/action_chain_tests/BUILD @@ -1 +1,7 @@ -python_sources() +pack_metadata( + name="metadata", +) + +python_sources( + dependencies=[":metadata"], +) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_1/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_1/BUILD index 4a173b377b..c10f509354 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_1/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_1/BUILD @@ -1,5 +1,10 @@ +pack_metadata( + name="metadata", +) + python_sources( dependencies=[ + ":metadata", "st2tests/st2tests/fixtures/packs/configs/dummy_pack_1.yaml", ], ) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_10/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_10/BUILD index db46e8d6c9..99d651ce3c 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_10/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_10/BUILD @@ -1 +1,7 @@ -python_sources() +pack_metadata( + name="metadata", +) + +python_sources( + dependencies=[":metadata"], +) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_11/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_11/BUILD index af53903c91..f90764bca7 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_11/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_11/BUILD @@ -1,5 +1,10 @@ +pack_metadata( + name="metadata", +) + python_sources( dependencies=[ + ":metadata", "st2tests/st2tests/fixtures/packs/configs/dummy_pack_11.yaml", ], ) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_12/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_12/BUILD index db46e8d6c9..99d651ce3c 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_12/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_12/BUILD @@ -1 +1,7 @@ -python_sources() +pack_metadata( + name="metadata", +) + +python_sources( + dependencies=[":metadata"], +) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_13/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_13/BUILD index db46e8d6c9..99d651ce3c 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_13/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_13/BUILD @@ -1 +1,7 @@ -python_sources() +pack_metadata( + name="metadata", +) + +python_sources( + dependencies=[":metadata"], +) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_14/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_14/BUILD index db46e8d6c9..99d651ce3c 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_14/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_14/BUILD @@ -1 +1,7 @@ -python_sources() +pack_metadata( + name="metadata", +) + +python_sources( + dependencies=[":metadata"], +) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_15/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_15/BUILD index db46e8d6c9..99d651ce3c 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_15/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_15/BUILD @@ -1 +1,7 @@ -python_sources() +pack_metadata( + name="metadata", +) + +python_sources( + dependencies=[":metadata"], +) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_16/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_16/BUILD index db46e8d6c9..99d651ce3c 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_16/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_16/BUILD @@ -1 +1,7 @@ -python_sources() +pack_metadata( + name="metadata", +) + +python_sources( + dependencies=[":metadata"], +) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_17/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_17/BUILD index db46e8d6c9..99d651ce3c 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_17/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_17/BUILD @@ -1 +1,7 @@ -python_sources() +pack_metadata( + name="metadata", +) + +python_sources( + dependencies=[":metadata"], +) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_18/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_18/BUILD index db46e8d6c9..99d651ce3c 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_18/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_18/BUILD @@ -1 +1,7 @@ -python_sources() +pack_metadata( + name="metadata", +) + +python_sources( + dependencies=[":metadata"], +) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_19/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_19/BUILD index a7cbcb14b2..3c95d4e816 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_19/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_19/BUILD @@ -1,5 +1,10 @@ +pack_metadata( + name="metadata", +) + python_sources( dependencies=[ + ":metadata", "st2tests/st2tests/fixtures/packs/configs/dummy_pack_19.yaml", ], ) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_2/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_2/BUILD index 075e7aff44..410ec9f74b 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_2/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_2/BUILD @@ -1,6 +1,12 @@ +pack_metadata( + name="metadata", +) + resource( name="pack_requirements", source="requirements.txt", ) -python_sources() +python_sources( + dependencies=[":metadata"], +) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_20/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_20/BUILD index db46e8d6c9..99d651ce3c 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_20/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_20/BUILD @@ -1 +1,7 @@ -python_sources() +pack_metadata( + name="metadata", +) + +python_sources( + dependencies=[":metadata"], +) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_21/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_21/BUILD index db46e8d6c9..99d651ce3c 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_21/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_21/BUILD @@ -1 +1,7 @@ -python_sources() +pack_metadata( + name="metadata", +) + +python_sources( + dependencies=[":metadata"], +) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_22/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_22/BUILD index 76fb2a9339..97f24397dc 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_22/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_22/BUILD @@ -1,5 +1,10 @@ +pack_metadata( + name="metadata", +) + python_sources( dependencies=[ + ":metadata", "st2tests/st2tests/fixtures/packs/configs/dummy_pack_22.yaml", ], ) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_23/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_23/BUILD index db46e8d6c9..a1f15b1ca7 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_23/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_23/BUILD @@ -1 +1,9 @@ -python_sources() +# There are no metadata files in dummy_pack_23 yet. +# It is used in the pack copy tests. +# pack_metadata( +# name="metadata", +# ) + +python_sources( + # dependencies=[":metadata"], +) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_3/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_3/BUILD index db46e8d6c9..99d651ce3c 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_3/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_3/BUILD @@ -1 +1,7 @@ -python_sources() +pack_metadata( + name="metadata", +) + +python_sources( + dependencies=[":metadata"], +) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_4/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_4/BUILD index db46e8d6c9..99d651ce3c 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_4/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_4/BUILD @@ -1 +1,7 @@ -python_sources() +pack_metadata( + name="metadata", +) + +python_sources( + dependencies=[":metadata"], +) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_5/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_5/BUILD index e12c5b4ab9..53ee2df8ad 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_5/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_5/BUILD @@ -1,5 +1,10 @@ +pack_metadata( + name="metadata", +) + python_sources( dependencies=[ + ":metadata", "st2tests/st2tests/fixtures/packs/configs/dummy_pack_5.yaml", ], ) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_6/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_6/BUILD index d5287b4ba2..e8b74443c7 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_6/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_6/BUILD @@ -1,5 +1,10 @@ +pack_metadata( + name="metadata", +) + python_sources( dependencies=[ + ":metadata", "st2tests/st2tests/fixtures/packs/configs/dummy_pack_6.yaml", ], ) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_7/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_7/BUILD index 852ffa1b22..9549df1e2a 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_7/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_7/BUILD @@ -1,5 +1,10 @@ +pack_metadata( + name="metadata", +) + python_sources( dependencies=[ + ":metadata", "st2tests/st2tests/fixtures/packs/configs/dummy_pack_7.yaml", ], ) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_8/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_8/BUILD index db46e8d6c9..99d651ce3c 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_8/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_8/BUILD @@ -1 +1,7 @@ -python_sources() +pack_metadata( + name="metadata", +) + +python_sources( + dependencies=[":metadata"], +) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_9/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_9/BUILD index db46e8d6c9..99d651ce3c 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_9/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_9/BUILD @@ -1 +1,7 @@ -python_sources() +pack_metadata( + name="metadata", +) + +python_sources( + dependencies=[":metadata"], +) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_additional_items_1/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_additional_items_1/BUILD index db46e8d6c9..99d651ce3c 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_additional_items_1/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_additional_items_1/BUILD @@ -1 +1,7 @@ -python_sources() +pack_metadata( + name="metadata", +) + +python_sources( + dependencies=[":metadata"], +) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_additional_properties_1/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_additional_properties_1/BUILD index db46e8d6c9..99d651ce3c 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_additional_properties_1/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_additional_properties_1/BUILD @@ -1 +1,7 @@ -python_sources() +pack_metadata( + name="metadata", +) + +python_sources( + dependencies=[":metadata"], +) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_1/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_1/BUILD index f577a9434a..6cbc9cb043 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_1/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_1/BUILD @@ -1,5 +1,10 @@ +pack_metadata( + name="metadata", +) + python_sources( dependencies=[ + ":metadata", "st2tests/st2tests/fixtures/packs/configs/dummy_pack_schema_with_nested_object_1.yaml", ], ) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_2/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_2/BUILD index 6c3d0aff16..96edf54ccb 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_2/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_2/BUILD @@ -1,5 +1,10 @@ +pack_metadata( + name="metadata", +) + python_sources( dependencies=[ + ":metadata", "st2tests/st2tests/fixtures/packs/configs/dummy_pack_schema_with_nested_object_2.yaml", ], ) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_3/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_3/BUILD index 7dacccd590..ba5ec6b5df 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_3/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_3/BUILD @@ -1,5 +1,10 @@ +pack_metadata( + name="metadata", +) + python_sources( dependencies=[ + ":metadata", "st2tests/st2tests/fixtures/packs/configs/dummy_pack_schema_with_nested_object_3.yaml", ], ) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_4/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_4/BUILD index 80faba7d5c..a10cb48e40 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_4/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_4/BUILD @@ -1,5 +1,10 @@ +pack_metadata( + name="metadata", +) + python_sources( dependencies=[ + ":metadata", "st2tests/st2tests/fixtures/packs/configs/dummy_pack_schema_with_nested_object_4.yaml", ], ) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_5/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_5/BUILD index db46e8d6c9..99d651ce3c 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_5/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_5/BUILD @@ -1 +1,7 @@ -python_sources() +pack_metadata( + name="metadata", +) + +python_sources( + dependencies=[":metadata"], +) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_pattern_and_additional_properties_1/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_pattern_and_additional_properties_1/BUILD index db46e8d6c9..99d651ce3c 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_pattern_and_additional_properties_1/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_pattern_and_additional_properties_1/BUILD @@ -1 +1,7 @@ -python_sources() +pack_metadata( + name="metadata", +) + +python_sources( + dependencies=[":metadata"], +) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_pattern_properties_1/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_pattern_properties_1/BUILD index db46e8d6c9..99d651ce3c 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_pattern_properties_1/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_pattern_properties_1/BUILD @@ -1 +1,7 @@ -python_sources() +pack_metadata( + name="metadata", +) + +python_sources( + dependencies=[":metadata"], +) diff --git a/st2tests/st2tests/fixtures/packs/orquesta_tests/BUILD b/st2tests/st2tests/fixtures/packs/orquesta_tests/BUILD index db46e8d6c9..99d651ce3c 100644 --- a/st2tests/st2tests/fixtures/packs/orquesta_tests/BUILD +++ b/st2tests/st2tests/fixtures/packs/orquesta_tests/BUILD @@ -1 +1,7 @@ -python_sources() +pack_metadata( + name="metadata", +) + +python_sources( + dependencies=[":metadata"], +) diff --git a/st2tests/st2tests/fixtures/packs/pack_dir_name_doesnt_match_ref/BUILD b/st2tests/st2tests/fixtures/packs/pack_dir_name_doesnt_match_ref/BUILD index db46e8d6c9..99d651ce3c 100644 --- a/st2tests/st2tests/fixtures/packs/pack_dir_name_doesnt_match_ref/BUILD +++ b/st2tests/st2tests/fixtures/packs/pack_dir_name_doesnt_match_ref/BUILD @@ -1 +1,7 @@ -python_sources() +pack_metadata( + name="metadata", +) + +python_sources( + dependencies=[":metadata"], +) diff --git a/st2tests/st2tests/fixtures/packs/pack_invalid_requirements/BUILD b/st2tests/st2tests/fixtures/packs/pack_invalid_requirements/BUILD index 075e7aff44..410ec9f74b 100644 --- a/st2tests/st2tests/fixtures/packs/pack_invalid_requirements/BUILD +++ b/st2tests/st2tests/fixtures/packs/pack_invalid_requirements/BUILD @@ -1,6 +1,12 @@ +pack_metadata( + name="metadata", +) + resource( name="pack_requirements", source="requirements.txt", ) -python_sources() +python_sources( + dependencies=[":metadata"], +) diff --git a/st2tests/st2tests/fixtures/packs/test_library_dependencies/BUILD b/st2tests/st2tests/fixtures/packs/test_library_dependencies/BUILD index 075e7aff44..410ec9f74b 100644 --- a/st2tests/st2tests/fixtures/packs/test_library_dependencies/BUILD +++ b/st2tests/st2tests/fixtures/packs/test_library_dependencies/BUILD @@ -1,6 +1,12 @@ +pack_metadata( + name="metadata", +) + resource( name="pack_requirements", source="requirements.txt", ) -python_sources() +python_sources( + dependencies=[":metadata"], +) diff --git a/st2tests/st2tests/fixtures/packs_1/dummy_pack_4/BUILD b/st2tests/st2tests/fixtures/packs_1/dummy_pack_4/BUILD index db46e8d6c9..99d651ce3c 100644 --- a/st2tests/st2tests/fixtures/packs_1/dummy_pack_4/BUILD +++ b/st2tests/st2tests/fixtures/packs_1/dummy_pack_4/BUILD @@ -1 +1,7 @@ -python_sources() +pack_metadata( + name="metadata", +) + +python_sources( + dependencies=[":metadata"], +) diff --git a/st2tests/st2tests/fixtures/packs_invalid/dummy_pack_17/BUILD b/st2tests/st2tests/fixtures/packs_invalid/dummy_pack_17/BUILD index db46e8d6c9..99d651ce3c 100644 --- a/st2tests/st2tests/fixtures/packs_invalid/dummy_pack_17/BUILD +++ b/st2tests/st2tests/fixtures/packs_invalid/dummy_pack_17/BUILD @@ -1 +1,7 @@ -python_sources() +pack_metadata( + name="metadata", +) + +python_sources( + dependencies=[":metadata"], +) diff --git a/st2tests/st2tests/fixtures/packs_invalid/dummy_pack_18/BUILD b/st2tests/st2tests/fixtures/packs_invalid/dummy_pack_18/BUILD index db46e8d6c9..99d651ce3c 100644 --- a/st2tests/st2tests/fixtures/packs_invalid/dummy_pack_18/BUILD +++ b/st2tests/st2tests/fixtures/packs_invalid/dummy_pack_18/BUILD @@ -1 +1,7 @@ -python_sources() +pack_metadata( + name="metadata", +) + +python_sources( + dependencies=[":metadata"], +) diff --git a/st2tests/st2tests/fixtures/rule_enforcements/BUILD b/st2tests/st2tests/fixtures/rule_enforcements/BUILD index db46e8d6c9..99d651ce3c 100644 --- a/st2tests/st2tests/fixtures/rule_enforcements/BUILD +++ b/st2tests/st2tests/fixtures/rule_enforcements/BUILD @@ -1 +1,7 @@ -python_sources() +pack_metadata( + name="metadata", +) + +python_sources( + dependencies=[":metadata"], +) diff --git a/st2tests/st2tests/fixtures/timers/BUILD b/st2tests/st2tests/fixtures/timers/BUILD index db46e8d6c9..99d651ce3c 100644 --- a/st2tests/st2tests/fixtures/timers/BUILD +++ b/st2tests/st2tests/fixtures/timers/BUILD @@ -1 +1,7 @@ -python_sources() +pack_metadata( + name="metadata", +) + +python_sources( + dependencies=[":metadata"], +) diff --git a/st2tests/st2tests/fixtures/traces/BUILD b/st2tests/st2tests/fixtures/traces/BUILD index db46e8d6c9..99d651ce3c 100644 --- a/st2tests/st2tests/fixtures/traces/BUILD +++ b/st2tests/st2tests/fixtures/traces/BUILD @@ -1 +1,7 @@ -python_sources() +pack_metadata( + name="metadata", +) + +python_sources( + dependencies=[":metadata"], +) diff --git a/st2tests/testpacks/checks/BUILD b/st2tests/testpacks/checks/BUILD new file mode 100644 index 0000000000..1a74d30186 --- /dev/null +++ b/st2tests/testpacks/checks/BUILD @@ -0,0 +1,3 @@ +pack_metadata( + name="metadata", +) diff --git a/st2tests/testpacks/errorcheck/BUILD b/st2tests/testpacks/errorcheck/BUILD new file mode 100644 index 0000000000..1a74d30186 --- /dev/null +++ b/st2tests/testpacks/errorcheck/BUILD @@ -0,0 +1,3 @@ +pack_metadata( + name="metadata", +)