Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-62011

Compatibility breakage AzureCredentials#getClientId()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: _unsorted
    • Labels:
      None
    • Environment:
      jenkins: 2.233
      azure-credentials: 3.0.1
      azure-vm-agents: 1.4.1
    • Similar Issues:
    • Released As:
      4.0.2

      Description

      At least the azure vm agents plugin has been broken by the azure-credentials 3.0.1 release, probably most of the plugins that depend on azure-credentials

      https://github.com/jenkinsci/azure-credentials-plugin/compare/azure-credentials-3.0.0...azure-credentials-3.0.1

      I can't see an issue or pull request referencing why this change was made, as far as I know those values aren't sensitive, and if you wish to treat them in such way it needs to be done by deprecating the old methods and adding new methods

      jenkins    | 2020-04-22 13:42:04.022+0000 [id=73]	SEVERE	c.m.a.v.AzureVMAgentCleanUpTask#execute: AzureVMAgentCleanUpTask: execute: Got execution exception while cleaning
      jenkins    | java.lang.NoSuchMethodError: com.microsoft.azure.util.AzureCredentials.getClientId()Ljava/lang/String;
      jenkins    | 	at org.jenkinsci.plugins.azurekeyvaultplugin.AzureKeyVaultCredentialRetriever.getCredentialById(AzureKeyVaultCredentialRetriever.java:85)
      jenkins    | 	at org.jenkinsci.plugins.azurekeyvaultplugin.AzureCredentialsProvider.fetchCredentials(AzureCredentialsProvider.java:98)
      jenkins    | 	at com.google.common.base.Suppliers$ExpiringMemoizingSupplier.get(Suppliers.java:173)
      jenkins    | 	at org.jenkinsci.plugins.azurekeyvaultplugin.AzureCredentialsProvider.getCredentials(AzureCredentialsProvider.java:62)
      jenkins    | 	at com.cloudbees.plugins.credentials.CredentialsProvider.getCredentials(CredentialsProvider.java:1163)
      jenkins    | 	at com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials(CredentialsProvider.java:428)
      jenkins    | 	at com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials(CredentialsProvider.java:543)
      jenkins    | 	at com.microsoft.azure.util.AzureCredentialUtil.getCredential(AzureCredentialUtil.java:21)
      jenkins    | 	at com.microsoft.azure.util.AzureCredentialUtil.getCredential2(AzureCredentialUtil.java:79)
      jenkins    | 	at com.microsoft.azure.vmagent.util.AzureClientUtil.getToken(AzureClientUtil.java:34)
      jenkins    | 	at com.microsoft.azure.vmagent.util.AzureClientUtil.getClient(AzureClientUtil.java:42)
      jenkins    | 	at com.microsoft.azure.vmagent.AzureVMCloud.lambda$createAzureClientSupplier$0(AzureVMCloud.java:134)
      jenkins    | 	at com.google.common.base.Suppliers$MemoizingSupplier.get(Suppliers.java:131)
      jenkins    | 	at com.microsoft.azure.vmagent.AzureVMCloud.getAzureClient(AzureVMCloud.java:1008)
      jenkins    | 	at com.microsoft.azure.vmagent.AzureVMAgentCleanUpTask.cleanLeakedResources(AzureVMAgentCleanUpTask.java:366)
      jenkins    | 	at com.microsoft.azure.vmagent.AzureVMAgentCleanUpTask.cleanLeakedResources(AzureVMAgentCleanUpTask.java:342)
      jenkins    | 	at com.microsoft.azure.vmagent.AzureVMAgentCleanUpTask.clean(AzureVMAgentCleanUpTask.java:620)
      jenkins    | 	at com.microsoft.azure.vmagent.AzureVMAgentCleanUpTask.access$200(AzureVMAgentCleanUpTask.java:73)
      jenkins    | 	at com.microsoft.azure.vmagent.AzureVMAgentCleanUpTask$3.call(AzureVMAgentCleanUpTask.java:632)
      jenkins    | 	at com.microsoft.azure.vmagent.AzureVMAgentCleanUpTask$3.call(AzureVMAgentCleanUpTask.java:629)
      jenkins    | 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      jenkins    | 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      jenkins    | 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      jenkins    | Caused: java.util.concurrent.ExecutionException
      jenkins    | 	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
      jenkins    | 	at java.util.concurrent.FutureTask.get(FutureTask.java:206)
      jenkins    | 	at com.microsoft.azure.vmagent.AzureVMAgentCleanUpTask.execute(AzureVMAgentCleanUpTask.java:643)
      jenkins    | 	at hudson.model.AsyncPeriodicWork.lambda$doRun$0(AsyncPeriodicWork.java:100)
      jenkins    | 	at java.lang.Thread.run(Thread.java:748)
      

        Attachments

          Activity

          Hide
          dmaciel David Maciel added a comment -

          I was having the same issue and it broke my whole Jenkins instance (all jobs failing) I manage Jenkins using a helm chart and even my rollbacks where failing.

          A temporary workaround is to install the azure-credentials version 3.0.0 ("azure-credentials:3.0.0"). Still have to investigate which plugin is bringing this as a dependency without selecting a specific version

          Show
          dmaciel David Maciel added a comment - I was having the same issue and it broke my whole Jenkins instance (all jobs failing) I manage Jenkins using a helm chart and even my rollbacks where failing. A temporary workaround is to install the azure-credentials version 3.0.0 ("azure-credentials:3.0.0"). Still have to investigate which plugin is bringing this as a dependency without selecting a specific version
          Hide
          timja Tim Jacomb added a comment -

          Raised https://github.com/jenkins-infra/update-center2/pull/370 for blacklisting this version

          Show
          timja Tim Jacomb added a comment - Raised https://github.com/jenkins-infra/update-center2/pull/370 for blacklisting this version
          Hide
          timja Tim Jacomb added a comment -

          Reverted breaking changes in https://github.com/jenkinsci/azure-credentials-plugin/pull/45

          released as 4.0.2

          Show
          timja Tim Jacomb added a comment - Reverted breaking changes in https://github.com/jenkinsci/azure-credentials-plugin/pull/45 released as 4.0.2

            People

            Assignee:
            azure_devops Azure DevOps
            Reporter:
            timja Tim Jacomb
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: