[JIRA] (JENKINS-62011) Compatibility breakage AzureCredentials#getClientId()

13 views
Skip to first unread message

timjacomb1@gmail.com (JIRA)

unread,
Apr 22, 2020, 9:48:03 AM4/22/20
to jenkinsc...@googlegroups.com
Tim Jacomb created an issue
 
Jenkins / Task JENKINS-62011
Compatibility breakage AzureCredentials#getClientId()
Issue Type: Task Task
Assignee: Azure DevOps
Components: azure-credentials-plugin, azure-vm-agents-plugin
Created: 2020-04-22 13:47
Environment: jenkins: 2.233
azure-credentials: 3.0.1
azure-vm-agents: 1.4.1
Priority: Blocker Blocker
Reporter: Tim Jacomb

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)
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

timjacomb1@gmail.com (JIRA)

unread,
Apr 22, 2020, 10:35:03 AM4/22/20
to jenkinsc...@googlegroups.com

jdmaciel@gmail.com (JIRA)

unread,
Apr 22, 2020, 12:15:02 PM4/22/20
to jenkinsc...@googlegroups.com
David Maciel commented on Bug JENKINS-62011
 
Re: Compatibility breakage AzureCredentials#getClientId()

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

timjacomb1@gmail.com (JIRA)

unread,
Apr 22, 2020, 12:55:04 PM4/22/20
to jenkinsc...@googlegroups.com

timjacomb1@gmail.com (JIRA)

unread,
Apr 27, 2020, 9:03:02 AM4/27/20
to jenkinsc...@googlegroups.com
Tim Jacomb resolved as Fixed
Change By: Tim Jacomb
Status: Open Resolved
Resolution: Fixed
Released As: 4.0.2

timjacomb1@gmail.com (JIRA)

unread,
Apr 27, 2020, 9:04:04 AM4/27/20
to jenkinsc...@googlegroups.com
Tim Jacomb closed an issue as Fixed
 

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

released as 4.0.2

Change By: Tim Jacomb
Status: Resolved Closed
Reply all
Reply to author
Forward
0 new messages