Bug 10762 - patchwork: Enable automatic status update when patches are merged for all projects
Summary: patchwork: Enable automatic status update when patches are merged for all pro...
Status: RESOLVED FIXED
Alias: None
Product: Patchwork/Patchtest
Classification: Yocto Project Subprojects
Component: Patchwork (show other bugs)
Version: 2.3
Hardware: x86 Multiple
: Medium+ enhancement
Target Milestone: 2.3 M2
Assignee: Jose Lamego
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-12-03 11:34 UTC by Jose Lamego
Modified: 2017-12-06 17:19 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jose Lamego 2016-12-03 11:34:40 UTC
Currently only oe-core project automatically updates patches state to Accepted when they're merged.
This feature should be enabled for all projects in patchwork.
Comment 1 Jose Lamego 2016-12-09 17:29:34 UTC
OE's git repositories are using a git-hook older than the asynchronous one that is used only for the oe-core project. All repositories will be configured to use the same script, since this script seems to be causing the lack of updates for those projects. All of other project configurations have been verified and no difference was found between them. Even manual state updates can be made.
Comment 2 Jose Lamego 2016-12-14 15:09:43 UTC
All of the OE's git repositories were configured to use the asynchronous githook in Dec 13. Waiting for confirmation that the automatic updates are working as expected.
Comment 3 Jose Lamego 2017-01-03 17:27:18 UTC
Logs show that the githook is working for "oe" and "bitbake" projects as well as "oe-core". The other projects should also be updated upon future merging.

Please let me know if other behavior is detected.
Comment 4 Martin Jansa 2017-01-04 13:19:32 UTC
Today I was pushing some new changes to master and master-next, everything looked OK (push was much faster probably because of asynchronous hook you mentioned before).

It wasn't showing any output from the hook, so I assumed everything is OK, but now some people on IRC are reporting missing branches and indeed master and master-next branches are gone:

OE @ ~/meta-openembedded $ git remote prune origin
Pruning origin
URL: git://git.openembedded.org/meta-openembedded
 * [pruned] origin/master
 * [pruned] origin/master-next
 refs/remotes/origin/HEAD has become dangling!

And I cannot just repush them:
OE @ ~/meta-openembedded $ git push origin master
Everything up-to-date
OE @ ~/meta-openembedded $ git push origin master-next
Everything up-to-date

Can you please check what went wrong on the server and if it's related to the new hook or the recent infra update?
Comment 5 Martin Jansa 2017-01-04 13:43:05 UTC
interesting the same happened in -contrib repository which probably doesn't have this hook

The push looked normal:

OE @ ~/meta-openembedded $ git push -f contrib jansa/master
Counting objects: 38, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (38/38), done.
Writing objects: 100% (38/38), 12.83 KiB | 0 bytes/s, done.
Total 38 (delta 22), reused 0 (delta 0)
To git+ssh://git.openembedded.org/meta-openembedded-contrib
   fcb6d27..6cdb9f6  jansa/master -> jansa/master

but the branch is gone now:
http://git.openembedded.org/meta-openembedded-contrib/log/?h=jansa/master
Comment 6 Leonardo Sandoval Gonzalez 2017-01-04 17:27:57 UTC
(In reply to comment #4)
> Today I was pushing some new changes to master and master-next, everything
> looked OK (push was much faster probably because of asynchronous hook you
> mentioned before).
> 
> It wasn't showing any output from the hook, so I assumed everything is OK,
> but now some people on IRC are reporting missing branches and indeed master
> and master-next branches are gone:
> 
> OE @ ~/meta-openembedded $ git remote prune origin
> Pruning origin
> URL: git://git.openembedded.org/meta-openembedded
>  * [pruned] origin/master
>  * [pruned] origin/master-next
>  refs/remotes/origin/HEAD has become dangling!
> 
> And I cannot just repush them:
> OE @ ~/meta-openembedded $ git push origin master
> Everything up-to-date
> OE @ ~/meta-openembedded $ git push origin master-next
> Everything up-to-date
> 
> Can you please check what went wrong on the server and if it's related to
> the new hook or the recent infra update?

I believe this is something not related to the script discussed on this bug entry but either Jose or Michael have more insight.

Martin, I followed your steps and I saw no pruning on my local branches. 

---- snip ----
$ git remote prune origin
$ git remote -v
origin  git://git.openembedded.org/openembedded-core (fetch)
origin  git://git.openembedded.org/openembedded-core (push)
---- snip ----

Any other step that I am missing?
Comment 7 Jose Lamego 2017-01-04 19:22:06 UTC
(In reply to comment #6)
> (In reply to comment #4)
> > Today I was pushing some new changes to master and master-next, everything
> > looked OK (push was much faster probably because of asynchronous hook you
> > mentioned before).
> > 
> > It wasn't showing any output from the hook, so I assumed everything is OK,
> > but now some people on IRC are reporting missing branches and indeed master
> > and master-next branches are gone:
> > 
> > OE @ ~/meta-openembedded $ git remote prune origin
> > Pruning origin
> > URL: git://git.openembedded.org/meta-openembedded
> >  * [pruned] origin/master
> >  * [pruned] origin/master-next
> >  refs/remotes/origin/HEAD has become dangling!
> > 
> > And I cannot just repush them:
> > OE @ ~/meta-openembedded $ git push origin master
> > Everything up-to-date
> > OE @ ~/meta-openembedded $ git push origin master-next
> > Everything up-to-date
> > 
> > Can you please check what went wrong on the server and if it's related to
> > the new hook or the recent infra update?
> 
> I believe this is something not related to the script discussed on this bug
> entry but either Jose or Michael have more insight.
> 
> Martin, I followed your steps and I saw no pruning on my local branches. 
> 
> ---- snip ----
> $ git remote prune origin
> $ git remote -v
> origin  git://git.openembedded.org/openembedded-core (fetch)
> origin  git://git.openembedded.org/openembedded-core (push)
> ---- snip ----
> 
> Any other step that I am missing?

I believe it is very unlike for the githook to mess with branches, however, I'll ask Michael to take a look at the server and see what he can find.
Comment 8 Martin Jansa 2017-01-04 19:37:03 UTC
> Any other step that I am missing?

different project, try it in meta-openembedded(-contrib)
Comment 9 Michael Halstead 2017-01-05 15:11:04 UTC
This hook is not causing the problem with unavailable branches. It is a umask problem with gitolite and the git daemon.
Comment 10 Jose Lamego 2017-01-05 16:24:56 UTC
I'm closing this bug since the branches issue is not related. Let me know if I should file a new bug to track that.