[JIRA] (JENKINS-57793) Creates addition empty connection cfg. after applying JCasC

15 views
Skip to first unread message

pjanouse@redhat.com (JIRA)

unread,
May 31, 2019, 10:16:03 AM5/31/19
to jenkinsc...@googlegroups.com
Pavel Janoušek created an issue
 
Jenkins / Bug JENKINS-57793
Creates addition empty connection cfg. after applying JCasC
Issue Type: Bug Bug
Assignee: Owen Mehegan
Components: gitlab-plugin
Created: 2019-05-31 14:15
Labels: jcasc-compatibility
Priority: Major Major
Reporter: Pavel Janoušek

Simple YAML definition as:

unclassified:
  gitLabConnectionConfig:
    connections:
    - apiTokenId: "token"
      clientBuilderId: "autodetect"
      name: "test"
      url: "https://test.foo.com"

The result is 2 connections in UI as you can see in the attached screenshot. The second one shouldn't be there.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

pjanouse@redhat.com (JIRA)

unread,
May 31, 2019, 10:17:02 AM5/31/19
to jenkinsc...@googlegroups.com

owen@nerdnetworks.org (JIRA)

unread,
Jun 10, 2019, 7:19:02 PM6/10/19
to jenkinsc...@googlegroups.com
Owen Mehegan commented on Bug JENKINS-57793
 
Re: Creates addition empty connection cfg. after applying JCasC

Nicolas De Loof do you have any thoughts about why this would happen? The GitLab plugin has not been modified at all to support CasC.

nicolas.deloof@gmail.com (JIRA)

unread,
Jun 11, 2019, 3:08:04 AM6/11/19
to jenkinsc...@googlegroups.com

gitlab is supported and fully tested by JCasC plugin "integrations" module.

see https://github.com/jenkinsci/configuration-as-code-plugin/blob/master/integrations/src/test/resources/io/jenkins/plugins/casc/GitLabTest.yml

 

please also tell us which version of gitlab plugin you're using.

pjanouse@redhat.com (JIRA)

unread,
Jun 13, 2019, 3:47:03 AM6/13/19
to jenkinsc...@googlegroups.com

Used versions:

  • gitlab-plugin 1.5.12
  • configuration-as-code 1.20
  • Jenkins core 2.164.2

pjanouse@redhat.com (JIRA)

unread,
Jun 13, 2019, 3:50:03 AM6/13/19
to jenkinsc...@googlegroups.com

Also JCasC export doesn't work due to io.jenkins.plugins.casc.ConfiguratorException: Can't read attribute 'connectionTimeout' from com.dabsquared.gitlabjenkins.connection.GitLabConnection@a566e.

pjanouse@redhat.com (JIRA)

unread,
Jun 13, 2019, 7:11:03 AM6/13/19
to jenkinsc...@googlegroups.com
Pavel Janoušek edited a comment on Bug JENKINS-57793
Also JCasC export doesn't work due to {{io.jenkins.plugins.casc.ConfiguratorException: Can't read attribute 'connectionTimeout' from com.dabsquared.gitlabjenkins.connection.GitLabConnection@a566e}}.


An update after even a deeper investigation:
Above is valid right after Jenkins booted-up via replaying JCasC YUM definition, so the memory moder for this plug-in is somehow corrupted.

But when you go to Global configuration (and see two GitLab connections, one from your declaration, second 'an empty' one) and change there anything (even not related to the gitlab plugin), than save or apply the current setting and do the JCasC export, there isn't an exception, but exported configuration like:
{code}

unclassified:
  gitLabConnectionConfig:
    connections:
    - apiTokenId: "token"
      clientBuilderId: "autodetect"
      connectionTimeout: 10
      ignoreCertificateErrors: false
      name: "test"
      readTimeout: 10
      url: "https://test.foo.com"
    - clientBuilderId: "autodetect"
      connectionTimeout: 10
      ignoreCertificateErrors: false
      readTimeout: 10
{code}
Reply all
Reply to author
Forward
0 new messages