Setting the auto_update value for a package repository

22 views
Skip to first unread message

James Hurley

unread,
Oct 6, 2020, 5:24:27 PM10/6/20
to go-cd

Hi Everyone,

We have a GoCD plugin that implements the Package Material extension to Go in order to provide Docker-based pipeline materials.  As of GoCD 20.3.0 (approximately) the package definitions getting added to our config.xml file suddenly included a defaulted "autoUpdate="false" attribute which is causing the auto-triggering of pipelines to stop (no material changes are detected so no automatic scheduling occurs).  In the past this attribute did not exist and package materials behaved as if auto-update was implicitly enabled.  I've dug through the documentation trying to find out if there was a change that added auto-update behavior to package materials but so far I've had no luck.  I also don't see any way for this to be controlled from the plugin side and no widget appears in the package material configuration screen that lets us specify the auto-update value.  So far I've been manually editing the attributes in the config.xml when they appear but this isn't a real solution.

I'm hoping that someone here can shed some light on what is going on or what changes would need to be made to resolve this (either providing a way to hard-code the auto-update value to "true" as we always want this enabled or at minimum how to expose this in the UI when configuring a package material).  Thanks very much for your help!

kritik...@thoughtworks.com

unread,
Oct 6, 2020, 11:43:09 PM10/6/20
to go-cd
Hello,

In GoCD 20.3.0, the packages page was rewritten as part of the UI/UX refresh (https://www.gocd.org/releases/#20-3-0). But it had a bug that the value of `auto_update` was set to false always.
This was fixed in 20.4.0 (https://github.com/gocd/gocd/pull/8118). You have two options:

1. Upgrade to 20.4.0 or later. Please read the release notes carefully for any breaking changes.
2. You can toggle to the older page packages page via executing the following curl command: (Admin privileges required)
     ```curl
               -H 'Accept: application/vnd.go.cd+json'  \
               -H 'Authorization: Bearer admin-token' \
               -X PUT -d '{ "toggle_value": "on"}'
     ```

James Hurley

unread,
Oct 7, 2020, 4:45:06 PM10/7/20
to go-cd
Thank you very much for your response; I'll start looking at what an upgrade to 20.4.0 or later would entail for us.  In the meantime I'll also take a look at your suggestion for toggling the older page as a possible interim solution.  Its a relief to finally understand what is causing this and what our next course of action needs to be :-)
Reply all
Reply to author
Forward
0 new messages