W dniu 22.06.2016 o 17:52, James E. Blair pisze:
Artur Zarzycki <[email protected]> writes:

...
And now as I understand zuul should recognize dependencies between patches.
So I created patch1 in repo1 and patch2 in repo2 with Depends-On:
I45137d1186caeafda0cee3504370d01ef3d9d271 (patch1)
and I'm trying to merge patch2. I see that zuul run  gate jobs for
repo2 and above area with job I see message:
Queue: some/repo1, some/repo2
When job finish with success -  code from repo2 is merged.

In zuul debug log I see:
2016-06-22 12:09:39,079 DEBUG zuul.DependentPipelineManager: Checking
for changes needed by <Change 0x7fb2ac1b2f90 22411,1>:
2016-06-22 12:09:39,080 DEBUG zuul.DependentPipelineManager:   No
changes needed
2016-06-22 12:09:39,080 DEBUG zuul.DependentPipelineManager: Adding
change <Change 0x7fb2ac1b2f90 22411,1> to queue <ChangeQueue gate:
some/repo1, some/repo2>

Could you please give me some hints what I did wrong? Do I need to
make something else to get it working?
 From what you describe, I don't see anything configured incorrectly.
Those log entries suggest that Zuul did not recognize the Depends-On
header and associate the two changes.  First, I would check:

* You are running a version of Zuul that supports Depends-On
* The syntax of the Depends-On header is correct (the line in the commit
   message must match this regex):
   "^Depends-On: (I[0-9a-f]{40})\s*$"

Then I would suggest looking in the debug log for entries near when Zuul
queried Gerrit for the change.  Assuming you are running git master, you
should see log messages like:

INFO zuul.source.Gerrit: Updating <Change ... patch2>
DEBUG zuul.source.Gerrit: Updating <Change ... patch2>: Running query 
change:I45137d1186caeafda0cee3504370d01ef3d9d271 to find needed changes
DEBUG zuul.source.Gerrit: Updating <Change ... patch2>: Getting 
commit-dependent change patch1
INFO zuul.source.Gerrit: Updating <Change ... patch1>

Indicating that when it loaded the data for patch2, it parsed the
Depends-On header, saw the I..271 change id, queried for it, and found
patch1 as a result.

Can it cause problems if I download code with
           git clone ssh://some_user@repo_url:29418/$ZUUL_PROJECT .
           git fetch $ZUUL_URL/$ZUUL_PROJECT $ZUUL_REF
           git checkout FETCH_HEAD
instead of using zuul_cloner?
What you do in the job should not affect this problem, however, I would
strongly recommend using zuul-cloner as it contains the collective
wisdom of the best way to prepare a git repo for testing.

-Jim

Thank you James!
You're right. The problem was in zuul version, we had 2.1.0 with some patches about I didn't know and one of them had impact on regex you pasted.
After fix it  everything works well  and I see proper logs.

--
Artur





_______________________________________________
OpenStack-Infra mailing list
[email protected]
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-infra

Reply via email to