steep-eve-20716
09/30/2024, 11:09 PM+/-
symbols or using [..]
to overwrite previous value.
pants.toml:
[GLOBAL]
tag = ["-integration_test"]
command (I've tried nearly every quote/bracket/+ combination):
pants test :: --tag='["integration_test"]'
Warning with pants 2.22:
- Value mismatch for the option `tag`:
Legacy value: ['integration_test'] of type <class 'list'>, from source FLAG
Native value: ['-integration_test'] of type <class 'list'>, from source CONFIG
happy-kitchen-89482
09/30/2024, 11:27 PMfast-nail-55400
09/30/2024, 11:28 PM-
be outside of the quotes?happy-kitchen-89482
09/30/2024, 11:29 PM-
should go outside the brackets?
tag = '-["integration_test"]'
steep-eve-20716
09/30/2024, 11:32 PMfast-nail-55400
09/30/2024, 11:35 PMfast-nail-55400
09/30/2024, 11:35 PMsteep-eve-20716
10/08/2024, 10:41 PM# pants.toml
# disable these type of tests by default locally
tag = '-[ "integration_test" ]'
And inspecting my file just to be sure:
➜ pants peek file_test.py | jq '.[0].tags'
[
"integration_test"
]
Running pants still calls that test by default:
➜ pants test file_test.py
15:38:16.06 [INFO] Completed: Run Pytest - file_test.py:tests - succeeded.
✓ file_test.py:tests succeeded in 10.37s (cached locally).
Where the expected result (and what I get with tag=["-integration_test"]
is this:
➜ pants test file_test.py
15:39:53.19 [WARN] No files or targets specified. The `test` goal works with these target types...
fast-nail-55400
10/08/2024, 10:43 PMpants help global
, what does Pants output for the default and current values of the tag
config?fast-nail-55400
10/08/2024, 10:44 PMsteep-eve-20716
10/08/2024, 10:45 PMsteep-eve-20716
10/08/2024, 10:46 PMtag = '-["integration_test"]'
tag
default: []
current value: [] (from pants.toml)
fast-nail-55400
10/08/2024, 10:47 PMtag = '-["integration_test"]'
should mean remove any entry with the content integration_test
from the configsteep-eve-20716
10/08/2024, 10:47 PMtag = ["-integration_test"]
tag
default: []
current value: [
"-integration_test"
] (from pants.toml)
fast-nail-55400
10/08/2024, 10:48 PM"-integration_test"
then that means to exclude targets with that tagfast-nail-55400
10/08/2024, 10:48 PM-
going on heresteep-eve-20716
10/08/2024, 10:49 PMfast-nail-55400
10/08/2024, 10:49 PM--tag='-["-integration_test"]'
steep-eve-20716
10/08/2024, 10:51 PM➜ pants help global
tag
default: []
current value: [
"-integration_test"
] (from pants.toml)
➜ pants --tag='-["-integration_test"]' help global
tag
default: []
current value: [] (from pants.toml, from command-line flag)
steep-eve-20716
10/08/2024, 10:51 PMsteep-eve-20716
10/08/2024, 10:52 PMfast-nail-55400
10/08/2024, 10:55 PMintegration_test
and -integration-test
being present in the tag
configfast-nail-55400
10/08/2024, 10:55 PM