GoCD polls for changes scenario.

Skip to first unread message

Sifu Tian

unread,
Apr 1, 2022, 5:26:33 PM4/1/22
to go-cd
Hi all,

I have a scenario that I am curious about.

Whenever we have a code freeze, we turn on a merge block that won't allow changes to be merged into our main branch in Github.

There are occasions where we merge a change into our main branch that needs to go in as an admin, but we still have a merge block on.

I noticed that GoCD does not pick up the new change that has been merged if a merge block is on.

Is this a bug or is there something I need to configure to continue to trigger a pipeline if there is a merge block but force merge into the main branch.


Chad Wilson

unread,
Apr 2, 2022, 1:00:02 AM4/2/22
to go...@googlegroups.com
Hiya

I'm not sure exactly how you have GoCD set up, but I don't think GoCD has any way to be aware of custom git server-side policy constructs such as "blocking merges", merge policy or "protected branches". So I don't think it is possible for GoCD to behave differently based on whatever policy GitHub is enforcing unless perhaps you are relying on webhook integration to trigger builds on GoCD, and GitHub is not making these webhook calls in these cases.

If new commits are added to a branch, and GoCD is polling those branches it should trigger a build within ~ a minute assuming you don't have contention due to too many materials, or Github rate limits etc.

If there is no other explanation in the above, it sounds like you might need to do some deeper investigation to see what is going on. If you manually trigger the pipeline, does the new commit get found? Do you see the new commits in the Materials view? What if you manually refresh the material here? What's the configuration of the pipeline in question?

-Chad

--
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/45b9a45f-a6ec-4907-a1f0-ed16779a117cn%40googlegroups.com.

Sriram Narayanan

unread,
Apr 2, 2022, 4:02:51 AM4/2/22
to go...@googlegroups.com
I haven't used any of these policies before, but I wonder if one of them prevents GoCD from seeing changes.


I am curious about the responses to Chad's questions.

-- Sriram

Sifu Tian

unread,
Apr 4, 2022, 9:18:14 PM4/4/22
to go-cd
Hi Chad,

The Github merge block is pretty straight forward.  Under >>>settings>>>branch>>>main branch>>> there is a tick box "Restrict who can push to matching branches
When manually triggering the pipeline, it did not find the new commit. Even though when I check the new material, the latest is there.
We are not using webhook integrations either.  It did however pick up new changes after a couple of hours.  The logs had no errors, the server wasn't out of space so it was very peculiar.

Screen Shot 2022-04-04 at 9.15.06 PM.png

Chad Wilson

unread,
Apr 5, 2022, 2:15:39 AM4/5/22
to go...@googlegroups.com
Perhaps I am missing something, but I'm not really convinced this has anything to do with that GitHub setting. If it's a one-off, it sounds like it could just be co-incidental timing, and there is some other reason your GoCD was not pulling changes from GitHub in that period.

Anyway, if you are convinced it is that setting you can presumably set up a test repository and pipeline, turn on a similar merge block and see if the issue can be reproduced.

-Chad

Sifu Tian

unread,
Apr 5, 2022, 9:29:00 AM4/5/22
to go-cd
I will do that and keep you posted on my findings.  Thanks.
Reply all
Reply to author
Forward
0 new messages