Hi

I'm having an issue adding configuration-as-code support to the 
azure-vm-agents plugin
(On Mac, linux all tests pass, and on windows when run through intellij 
they also pass)
On windows when run on the command line a couple of unit tests fail with:

"Refusing to marshal com.microsoft.azure.vmagent.AzureVMCloud for security 
reasons; see https://jenkins.io/redirect/class-filter/";

Gist with stacktrace:
https://gist.github.com/timja/1bb1976ae2637088ee2f0ed13ef078a7

stack:
Caused by: java.io.IOException: java.lang.RuntimeException: Failed to 
serialize jenkins.model.Jenkins#clouds for class hudson.model.Hudson
at hudson.XmlFile.write(XmlFile.java:200)
at jenkins.model.Jenkins.save(Jenkins.java:3221)
at hudson.BulkChange.commit(BulkChange.java:98)
at 
io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:266)
... 11 more
Caused by: java.lang.RuntimeException: Failed to serialize 
jenkins.model.Jenkins#clouds for class hudson.model.Hudson
at 
hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:256)
at 
hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
at 
com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
at 
hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
at 
hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
at 
com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
at 
com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
at 
com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
at 
com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82)
at 
com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)
at com.thoughtworks.xstream.XStream.marshal(XStream.java:1026)
at com.thoughtworks.xstream.XStream.marshal(XStream.java:1015)
at com.thoughtworks.xstream.XStream.toXML(XStream.java:988)
at hudson.XmlFile.write(XmlFile.java:193)
... 14 more
Caused by: java.lang.UnsupportedOperationException: Refusing to marshal 
com.microsoft.azure.vmagent.AzureVMCloud for security reasons; see 
https://jenkins.io/redirect/class-filter/
at hudson.util.XStream2$BlacklistedTypesConverter.marshal(XStream2.java:546)
at 
com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
at 
com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
at 
com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
at 
com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88)
at 
com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64)
at 
hudson.util.DescribableList$ConverterImpl.marshal(DescribableList.java:269)
at 
com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
at 
com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
at 
com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
at 
hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
at 
hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
... 27 more

Full test output:
https://ci.jenkins.io/blue/organizations/jenkins/Plugins%2Fazure-vm-agents-plugin/detail/PR-144/13/tests

The PR:
https://github.com/jenkinsci/azure-vm-agents-plugin/pull/144

Anyone got any idea or tips?
I've read through  https://jenkins.io/redirect/class-filter/ but can't see 
what's wrong

The core version and parent pom weren't changed in this PR, some data model 
changes though.

Any help much appreciated
Thanks
Tim

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/356bd0f7-88a7-4934-bdb5-faf442ea4b25%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to