-
Improvement
-
Resolution: Fixed
-
Major
In P4 that you cannot run 'p4 changes STREAM_NAME' to see what has changed. If you run:
p4 changes -m1 //streams/main/...
you just get files under that depot path and dont see any of the imports.
To work around this we made a change to stream polling to use a workspace view to check for changes. For example:
P4: Polling with range: 48475,now ... p4 changes -m20 //jenkins-master-00623018-StreamWithImport-0/...@48475,now
However it doesnt look like we ever made the same change to multi branch polling:
... p4 changes -m1 //streams/main/...@now ... p4 files -e //streams/main/Jenkinsfile ‘Jenkinsfile’ found No changes detected: mainX (still at 2489)
Therefore if the file is is an import and not under the path '//streams/main/...' we miss the change.
Reproduction Steps:
(1) Create a stream with an 'import' or 'import+' path. For example:
Stream: //streams/dev-with-import Update: 2020/04/03 15:13:46 Access: 2020/04/03 15:03:00 Owner: super Name: dev-with-import Parent: //streams/dev Type: development Description: Created by super. Options: allsubmit unlocked toparent fromparent mergedown Paths: share ... import+ imports/... //depot/Project1/...
(2) Create a new stream based multibranch project.
(3) Force a build.
(4) Submit a change to '//depot/Project1/...'.
(5) Scan the multibranch project
Notes:
- There is the potential for the Jenkinsfile to be in the import when using pipeline multibranch.
- This is a big change in behavior so would need to be optional or well communicated. For example for customers that do not want the build triggered on imports only changes to the main codeline.