GithubHelp home page GithubHelp logo

Comments (11)

ketan avatar ketan commented on August 19, 2024

A unique string is what is expected. Would appreciate if you could update the example and the reference doc (https://docs.gocd.org/current/configuration/configuration_reference.html#config-repo).

Thanks.

from docs.go.cd.

varshavaradarajan avatar varshavaradarajan commented on August 19, 2024

@sghill, thanks for reporting the issue. The id must be a unique alphanumeric string. It can also contain -, _, . Can you also update the plugin attribute to be pluginId?

from docs.go.cd.

arvindsv avatar arvindsv commented on August 19, 2024

Based on this, I thought the ID would be generated if not present. Why isn't that the case? /cc @GaneshSPatil

from docs.go.cd.

sghill avatar sghill commented on August 19, 2024

@varshavaradarajan I tried saving <config-repo pluginId="yaml.config.plugin" id="my-ci-config"> and got this error:

Attribute 'pluginId' is not allowed to appear in element 'config-repo'.

from docs.go.cd.

varshavaradarajan avatar varshavaradarajan commented on August 19, 2024

@sghill , the attribute plugin was changed to pluginId for the release 17.9.0 I think. You can verify it with one of the experimental releases from https://www.gocd.org/download/?experimental=true. Sorry, I thought that the document wasn't updated for 17.8.0.

from docs.go.cd.

sghill avatar sghill commented on August 19, 2024

@varshavaradarajan thanks for the clarification! Since the docs are also versioned, maybe we should leave that out until 17.9.0 is released?

@arvindsv sounds like this might be an implementation bug instead of a docs bug?

from docs.go.cd.

GaneshSPatil avatar GaneshSPatil commented on August 19, 2024

@arvindsv @sghill -- id field on config repo is mandatory as of release 17.8.0.
This error is thrown due to xsd validations.
Related code:
XsdErrorTranslator
config repo id attribute

from docs.go.cd.

arvindsv avatar arvindsv commented on August 19, 2024

@GaneshSPatil If so, the doc page for 17.8 needs to be updated: https://docs.gocd.org/17.8.0/advanced_usage/pipelines_as_code.html#storing-pipeline-configuration-in-yaml

Also, I thought that the ID was auto generated. Why is that not the case?

from docs.go.cd.

GaneshSPatil avatar GaneshSPatil commented on August 19, 2024

@arvindsv -- Yes, the docs need to be updated for id as well as pluginId attributes of config-repo. Issue link: gocd/gocd#3671 (comment)

id attribute on Config repo tag was added as part of GoCD version 17.8.0.
So, if someone upgrades from older version to 17.8.0 or above, xsl migration will add the missing id attribute on it (which will be a random string).

But from 17.8.0, if a new config-repo tag needs to be added, id field is mandatory.

from docs.go.cd.

varshavaradarajan avatar varshavaradarajan commented on August 19, 2024

@arvindsv , the auto generation of id happens for entities like scms, package repos. But it doesn't happen on newer entities. Like auth config, role config, etc. We need to make it consistent whichever way. I think that autogeneration should be supported on newer entities if the user doesn't provide one. @GaneshSPatil ?

from docs.go.cd.

arvindsv avatar arvindsv commented on August 19, 2024

Yes, I think it should be consistent and it should be generated. If the client-side wants to provide it (and it is valid in that context), that's ok too.

from docs.go.cd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.