GitHub sync bug
avatar zero-24
zero-24
5 May 2015

see: http://issues.joomla.org/tracker/joomla-cms/6858 and joomla/joomla-cms#6858

currect behavior

I'm unable to manage milestones on jissues but jissues removed the milstone.

And the tracker don't updte github too? Something looks wrong?

expected

if you did not have access to the milestone management nothing should be changed. (not on jissues and not on github)

milestone-jissues
milestone-github

avatar zero-24 zero-24 - open - 5 May 2015
avatar b2z
b2z - comment - 6 May 2015

This is really strange. I've tested this several times - if you have no access to remove milestones then they should not be removed. Need to retest.

avatar b2z b2z - change - 6 May 2015
Labels Added: bug
avatar b2z b2z - change - 6 May 2015
Labels Added: bug
avatar zero-24
zero-24 - comment - 6 May 2015

if you have no access to remove milestones then they should not be removed.

Agree but there are 2 points special with my account.

  • I have access to the github repo (Collaborator)
  • My account is in 2 edit groups (JBS and PLT) on JIssues.

But JBS nor PLT have access to label an milestone manangement on jissues.

So it is really strange that i remove the milestone on jissues (where i have no access) but not on github (where i have access).

My first thought is that somewhere we initial a variable like $milestone = null but as i don't have access to the milestone managment we don't set it to the right / current value. And as i have access to edit / manage the issue the still initial $milestone variable gets saved and removed the current milestone from jissues?

avatar zero-24
zero-24 - comment - 7 May 2015

@b2z it looks like the issue is in the sync script.

example: http://issues.joomla.org/tracker/joomla-cms/6904 / joomla/joomla-cms#6904 I'm only add the label but jissues also remove the milestone on sync.

avatar b2z
b2z - comment - 7 May 2015

You have added the label on the tracker?

avatar zero-24
zero-24 - comment - 7 May 2015

No i have add the label on github.

avatar b2z
b2z - comment - 7 May 2015

Still can't understand how it happens. The latest changes was only handling of Events - just add them to the activities table, so this code does not touch Issues...

avatar zero-24
zero-24 - comment - 7 May 2015

@b2z now I'm totaly confused see:

http://issues.joomla.org/tracker/joomla-cms/6904 &
milestone

It looks that every event via hook (here adding a label) send a remove milestone message and that only remove the milestone from Jissues but not from github.

But on the sync via cron script the milestone comes back.
You can see at the issue above that the mileston was removed 4 times without adding it back again.

I know there are code for get hook data but i can find it. Can you point me to the right folder / file?

The cron script looks good but it looks for me that the hook script do something unexpected e.g. passing a wrong variable to the tracker etc. Or do I search in the total wrong direction to catch the issue?

avatar b2z
b2z - comment - 7 May 2015

I am not sure about hooks these were coded by @mbabker, but as far as I know there is no hooks for labeled/milsetoned events
https://developer.github.com/webhooks/#events

But on the sync via cron script the milestone comes back.

Hmm are you sure? I do not see that http://issues.joomla.org/tracker/joomla-cms/6904 got milestone back.

avatar zero-24
zero-24 - comment - 7 May 2015

Hmm are you sure? I do not see that http://issues.joomla.org/tracker/joomla-cms/6904 got milestone back.

hmm I'm sure that it was there until i have add and remove the CodeStyle label for testing.

And bevor this, the milestone was removed 3 times.

How often the cron will run? The last i remember is 30 minutes?

But here @mbabker explain it is 5 Minutes? Is this still valid?

An issue we're hitting is there are cron jobs now running every 5 minutes except for :25 and :55 after the hour to support all of the repositories in the live app.
#617 (comment)

I have just set it back to pending so we have the same state as bevor. And i hope the milestone comes back. :smile:

avatar b2z
b2z - comment - 8 May 2015

And i hope the milestone comes back.

It is not :(

More strange is that I've just tested it locally - I do not have this problem. See jtester/tests#85 and this is how it looks after the sync:

test

Moreover I've synced http://issues.joomla.org/tracker/joomla-cms/6904 and it is also looking good - no duplicates like in #655, no unnecessary removes.

test

Really I am lost here :(

@mbabker your suggestions?

avatar b2z
b2z - comment - 12 May 2015

@zero-24 while we do not have a fix here can you please change labels on the tracker as a temporary solution?

avatar b2z b2z - change - 16 May 2015
Labels Added: GitHub sync
avatar b2z b2z - change - 16 May 2015
Labels Added: GitHub sync
avatar b2z
b2z - comment - 16 May 2015

So after setting up a test server and webhooks I managed to fix it :) 7445858 That was a silly issue :confused:

avatar zero-24 zero-24 - change - 17 Oct 2015
Status New Closed
Closed_Date 0000-00-00 00:00:00 2015-10-17 22:53:24
Closed_By zero-24
avatar zero-24 zero-24 - close - 17 Oct 2015
avatar zero-24 zero-24 - close - 17 Oct 2015
avatar zero-24
zero-24 - comment - 17 Oct 2015

Thanks :)

Add a Comment

Login with GitHub to post a comment