sparse-lifeguard-95737
05/19/2022, 4:15 PMv2.11.1rc0
. We have a CI step that essentially does ./pants --changed-dependees=transitive --changed-since=$(git rev-parse HEAD~) --tag=push_to_ecr filter --target-type=docker_image
. After upgrading to v2.11.1rc0
, the filter fails to notice images with the tag - removing the --tag
arg fixes things. We upgraded from commit 9ac327d46d8ef98a6f635c9795e26433b50e62b8
(on the 2.11.x branch) so one of the commits between it and the RC changed the behaviorhundreds-father-404
05/19/2022, 4:16 PM--tags
sparse-lifeguard-95737
05/19/2022, 4:18 PMhundreds-father-404
05/19/2022, 4:22 PMhundreds-father-404
05/19/2022, 4:23 PMthe other probably-relevant thing to note is that the change we expected to be detected was in a transitive dependency without the tag.Oh, so you're using
--tag=foo
and expecting to get back a target without tags=["foo"]
specifically because it's a transitive dep of something w/ the tag?sparse-lifeguard-95737
05/19/2022, 4:26 PMapp/
Dockerfile
entrypoint.sh
BUILD.pants
and then in `BUILD.pants`:
shell_source(name="entrypoint", source="entrypoint.sh")
docker_image(tags=["push_to_ecr"], dependencies=[":entrypoint"])
we made a change to entrypoint.sh
, then ran an equivalent of:
./pants --changed-dependees=transitive --changed-since=$(git rev-parse HEAD~) --tag=push_to_ecr filter --target-type=docker_image
pre-2.11.1rc0 this would print the target for app/Dockerfile
. on 2.11.1rc0 the target for app/Dockerfile
is not printedsparse-lifeguard-95737
05/19/2022, 4:27 PMsparse-lifeguard-95737
05/19/2022, 4:35 PMfcaac9840256ac52b57b3dc2281d07a6b1e02455
(cherry-pick commit of the PR you linked) is where the behavior changes - 88b73ee0712928d1a63796907ab2924fe721bff6
(commit immediately before it) works the way it did in 2.11.0sparse-lifeguard-95737
05/19/2022, 4:43 PMsparse-lifeguard-95737
05/19/2022, 5:02 PMbusy-vase-39202
05/19/2022, 5:16 PMhundreds-father-404
05/19/2022, 5:25 PM--tag
, you will only get back things w/ the tag.
I'm trying to think about what is desirable though. --changed-dependees
is a wild-card here I didn't consider enough.
In the meantime, I think we should revert the changes to 2.11, as it looks like it's breaking and violates the stability we try to offerhundreds-father-404
05/19/2022, 5:27 PM./pants --tag=push_to_ecr --changed-since=HEAD list :: | xargs ./pants dependees --transitive | xargs ./pants filter --target-type=docker_image
hundreds-father-404
05/19/2022, 5:54 PMhundreds-father-404
05/19/2022, 6:34 PMsparse-lifeguard-95737
05/19/2022, 6:43 PM