Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Upgrading to >=0.62.6 fails #391

Open
carlosmiranda opened this issue Sep 29, 2018 · 8 comments
Open

Upgrading to >=0.62.6 fails #391

carlosmiranda opened this issue Sep 29, 2018 · 8 comments
Labels

Comments

@carlosmiranda
Copy link
Contributor

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", "tes1t@example.com");
        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">tes1t@example.com</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

@0crat
Copy link
Collaborator

0crat commented Sep 29, 2018

@g4s8/z please, pay attention to this issue

@g4s8
Copy link
Contributor

g4s8 commented Oct 1, 2018

@0crat assign @krzyk

@0crat 0crat added the scope label Oct 1, 2018
@0crat
Copy link
Collaborator

0crat commented Oct 1, 2018

@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
Copy link
Collaborator

0crat commented Oct 1, 2018

Bug was reported, see §29: +15 point(s) just awarded to @carlosmiranda/z

@0crat
Copy link
Collaborator

0crat commented Oct 1, 2018

Manual assignment of issues is discouraged, see §19: -5 point(s) just awarded to @g4s8/z

@krzyk
Copy link
Contributor

krzyk commented Oct 22, 2018

@0crat refuse

@0crat
Copy link
Collaborator

0crat commented Oct 22, 2018

@0crat refuse (here)

@krzyk The user @krzyk/z resigned from #391, please stop working. Reason for job resignation: Order was cancelled

@0crat
Copy link
Collaborator

0crat commented Oct 22, 2018

Tasks refusal is discouraged, see §6: -15 point(s) just awarded to @krzyk/z

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants