We upgraded server and api call is now failing.
error is
'SonarQubeQualityGates' object has no attribute 'get_project_qualitygates_status'
code working on old server
sonar = SonarQubeClient(sonarqube_url=sq_api_url, username=sonar_usr, password=sonar_pd)
project_pull_requests = sonar.qualitygates.get_project_qualitygates_status(projectKey=projectKey, pullRequest=gerrit_cn_ps)
ps_conditions = project_pull_requests['projectStatus']['conditions']
what is new api for this?
21:43:40.157 DEBUG Post-jobs :
21:43:40.162 INFO Analysis total time: 14.520 s
21:43:40.162 INFO EXECUTION SUCCESS
21:43:40.163 INFO Total time: 31.359s
Exception in thread "Thread-0" java.lang.NoClassDefFoundError: ch/qos/logback/classic/spi/ThrowableProxy
at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:145)
at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:424)
at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:386)
at ch.qos.logback.classic.Logger.error(Logger.java:543)
at org.eclipse.jgit.internal.util.ShutdownHook.cleanup(ShutdownHook.java:87)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: ch.qos.logback.classic.spi.ThrowableProxy
at java.base/java.net.URLClassLoader.findClass(Unknown Source)
at org.sonarsource.scanner.lib.internal.IsolatedClassloader.loadClass(IsolatedClassloader.java:82)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
... 6 more
info
21:43:08.845 INFO SonarScanner CLI 6.0.0.4432
21:43:08.846 INFO Java 17.0.11 Eclipse Adoptium (64-bit)
21:43:08.846 INFO Linux 5.4.0-163-generic amd64
21:43:08.851 DEBUG Scanner max available memory: 12 GB
21:43:08.865 DEBUG uname -m returned 'x86_64'
21:43:08.866 DEBUG Create: /root/.sonar/cache
21:43:08.866 INFO User cache: /root/.sonar/cache
21:43:08.866 DEBUG Create: /root/.sonar/cache/_tmp
21:43:09.062 DEBUG Loaded [411] system trusted certificates
21:43:15.477 DEBUG Execution execute
21:43:15.608 DEBUG Enterprise 10.5.1.90531
21:43:15.749 INFO Load global settings