datum
datum copied to clipboard
Upgrading to >=0.62.6 fails
Project zerocracy/farm is currently on version 0.62.5. When upgrading to 0.62.6 or beyond, we are getting an XML error from people.xml
. For example, PeopleTest.upgradesXsdAutomatically
public void upgradesXsdAutomatically() throws Exception {
final Project project = new FkProject();
Files.write(
project.acq("people.xml").path(),
String.join(
"",
"<people xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'",
" xsi:noNamespaceSchemaLocation='",
"http://datum.zerocracy.com/0.7.1",
"/xsd/project/people.xsd'/>"
).getBytes()
);
final FkFarm farm = new FkFarm(project);
final People people = new People(farm).bootstrap();
final String uid = "karato90";
people.wallet(uid, "paypal", "[email protected]");
people.rate(uid, new Cash.S("$27"));
}
Result:
XML pmo/people.xml upgraded to "0.24" by http://datum.zerocracy.com/latest/upgrades/pmo/people/0.24-version-and-date.xsl in people.xml
XML pmo/people.xml upgraded to "0.54.3" by http://datum.zerocracy.com/latest/upgrades/pmo/people/0.54.3-reputation.xsl in people.xml
XML pmo/people.xml upgraded to "0.54.3" by http://datum.zerocracy.com/latest/upgrades/pmo/people/0.54.3-skills.xsl in people.xml
XML pmo/people.xml upgraded to "0.60.2" by http://datum.zerocracy.com/latest/upgrades/pmo/people/0.60.2-applied.xsl in people.xml
XML pmo/people.xml upgraded to "0.61.2" by http://datum.zerocracy.com/latest/upgrades/pmo/people/0.61.2-speed.xsl in people.xml
XML pmo/people.xml upgraded to "0.62.6" by http://datum.zerocracy.com/latest/upgrades/pmo/people/0.62.6-active.xsl in people.xml
XSD upgraded to "http://datum.zerocracy.com/0.62.6/xsd/pmo/people.xsd" in people.xml
1 XML validation error(s):
-1:-1: cvc-complex-type.2.4.b: The content of element 'person' is not complete. One of '{mentor, rate, details, applied, active, vacation, badges}' is expected.
<?xml version="1.0" encoding="UTF-8"?>
<people xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
updated="2018-09-29T15:17:22Z"
version="0.62.6"
xsi:noNamespaceSchemaLocation="http://datum.zerocracy.com/0.62.6/xsd/pmo/people.xsd">
<person id="karato90">
<reputation>0</reputation>
<jobs>0</jobs>
<projects>0</projects>
<speed>0.0</speed>
<skills updated="2018-09-29T15:17:22.314Z"/>
<links>
<link href="karato90" rel="github"/>
</links>
<wallet bank="paypal">[email protected]</wallet>
</person>
</people>
java.lang.IllegalArgumentException: 1 error(s) in XML document: -1:-1: cvc-complex-type.2.4.b: The content of element 'person' is not complete. One of '{mentor, rate, details, applied, active, vacation, badges}' is expected.
at com.jcabi.xml.StrictXML.<init>(StrictXML.java:124)
at com.jcabi.xml.StrictXML.<init>(StrictXML.java:95)
at com.jcabi.xml.StrictXML.<init>(StrictXML.java:86)
at com.zerocracy.Xocument.modify(Xocument.java:265)
at com.zerocracy.pmo.People.wallet(People.java:430)
at com.zerocracy.pmo.PeopleTest.upgradesXsdAutomatically(PeopleTest.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:239)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
This is a strange error for the following reasons:
- There is no
<active>
element, even though we have the right upgrade script - mentor, rate, details, applied, vacation, and badges elements are not supposed to be required.
This is currently blocking https://github.com/zerocracy/farm/pull/1723
@g4s8/z please, pay attention to this issue
@0crat assign @krzyk
@0crat assign @krzyk (here)
@g4s8 The job #391 assigned to @krzyk/z, here is why; the budget is 30 minutes, see §4; please, read §8 and §9; if the task is not clear, read this and this; there will be a monetary reward for this job
@0crat refuse