-
Notifications
You must be signed in to change notification settings - Fork 973
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support disabling polling of pluggable SCM materials created via config repositories #11635
Comments
Fix for gocd#11635. Add support for the auto-update flag to be read and used in materials of pipelines that is configured in config repos.
Thanks for the sleuthing here. It does seem that this should be possible to address, and may be an oversight from the way things are modeled with gocd/config/config-api/src/main/java/com/thoughtworks/go/domain/scm/SCM.java Lines 66 to 67 in 0f58107
However there is some potential complexity/mess here to consider due to the way SCMs are de-duplicated which we'd need to reconcile to ensure the semantics are the same as for the non-pluggable materials (equally deterministics or non-deterministic). |
@chadlwilson Thanks for investigating this. |
See the discussion at #11636 (comment) and below in particular. The extent of my thoughts are on the PR, and haven't got any further than that. There's probably not really a next step without addressing the concerns on approach, which I'm not sure how to do right now (or put differently, have not had the time/energy/inclination to figure out). The benefit appears somewhat small (given how long the config repo feature has been around and no-one highlighting this gap until now, that I can find!), and at the moment the effort/risk is relatively high, so we need to find a way to change that equation, which is rather difficult with the resources available. TL;DR The current proposed approach in the PR has at least two problems
That's not really a solution I am comfortable with given the chance for unintended consequences that will be difficult for a user to reason about or debug. |
Issue Type
Bug report/Feature enhancement
Summary
I want to disable polling of materials of pipelines that are configured via a SCM Plugin and instead rely on web-hooks.
It works for manually created pipelines it's possible to set
Repository polling behavior
toFetch updates to this repository only on webhook or manual trigger
, but not when creating pipelines via a SCM plugin like gocd-yaml-config-plugin or gocd-json-config-plugin. When setting theauto_update
flag in the config file it's silently ignored and always set to true in the internal data model.Environment
GoCD Version: 23.2.0
YAML Configuration Plugin: 0.14.1
JSON Configuration Plugin: 0.6.0
Steps to Reproduce
curl
and see thatauto_update
is set totrue
.Expected Results
The
auto_update
flag should be set tofalse
.Actual Results
The
auto_update
flag is set totrue
.Possible Fix
I've been digging around in the code and the flag doesn't exists in
CRPluggableScmMaterial
like it does inCRScmMaterial
.So by adding this property to
CRPluggableScmMaterial
and then make sure the flag propagates fromPluggableSCMMaterialConfig
to theCRPluggableScmMaterial
.Affected code in
ConfigConverter.java
here and here.I have done some tests locally and got it to work so will create a PR to fix this issue.
The text was updated successfully, but these errors were encountered: