Skip to content

Commit ed11737

Browse files
committed
fix: packaging migration scripts
Running `./pants package ::` results in the following error. We included the v3.5 migration script in `setup.py` and in the `pants_distribution`. But, that script does not end in `.py`, so the `python_sources` target did not "own" it. In order to correct this, we explicitly include the extension-less binaries. > ValueError: The explicit dependency > `st2common/bin/migrations/v3.5/st2-migrate-db-dict-field-values` of > the target at `st2common:st2common` does not provide enough address > parameters to identify which parametrization of the dependency target > should be used. > Target `st2common/bin/migrations/v3.5:v3.5` can be addressed as: > * st2common/bin/migrations/v3.5:v3.5 > * st2common/bin/migrations/v3.5/__init__.py > * st2common/bin/migrations/v3.5/st2_migrate_db_dict_field_values.py In fixing this, I also noticed that we did not include the v3.8 migration script, so I marked that executable and included it as well.
1 parent 14e98ca commit ed11737

4 files changed

Lines changed: 7 additions & 1 deletion

File tree

st2common/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ st2_component_python_distribution(
2020
"bin/st2-pack-download",
2121
"bin/st2-pack-setup-virtualenv",
2222
"bin/migrations/v3.5/st2-migrate-db-dict-field-values",
23+
"bin/migrations/v3.8/st2-drop-st2exporter-marker-collections",
2324
"bin/st2-run-pack-tests:shell",
2425
"bin/st2ctl:shell",
2526
"bin/st2-self-check:shell",
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
# TODO: what to do about st2-migrate-db-dict-field-values ?
22
# st2_migrate_db_dict_field_values.py is a symlink to st2-migrate-db-dict-field-values
3-
python_sources()
3+
python_sources(
4+
sources=["*.py", "st2*"],
5+
)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
python_sources(
2+
sources=["st2*"],
3+
)

st2common/bin/migrations/v3.8/st2-drop-st2exporter-marker-collections

100644100755
File mode changed.

0 commit comments

Comments
 (0)