Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XmlFile.java:52-60: Introduce a new class named... #104

Closed
0pdd opened this issue Apr 13, 2020 · 20 comments
Closed

XmlFile.java:52-60: Introduce a new class named... #104

0pdd opened this issue Apr 13, 2020 · 20 comments

Comments

@0pdd
Copy link

0pdd commented Apr 13, 2020

The puzzle 81-27d531fb from #81 has to be resolved:

* @todo #81:30min Introduce a new class named XmlPackagesFile that should be responsible
* of writing the start of the document (as in {XmlFilelists, XmlOthers, XmlPrimary}.startPackages
* and XmlRepomd.begin) as well as writing the end of the document (as in
* {XmlFilelists, XmlOthers, XmlPrimary}.close) by taking the needed information in
* its constructor + a XmlFile. It should also be responsible of counting the number
* of packages added. With all this information, the alter method can then be moved
* to XmlPackagesFile and renamed close by exploiting directly that information.
* Once it is done, use XmlPackagesFile in XmlFilelists, XmlOthers, XmlPrimary and keep
* using XmlFile in XmlRepomd.

The puzzle was created by Victor Noël on 13-Apr-20.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

@0crat
Copy link

0crat commented Apr 13, 2020

@g4s8/z please, pay attention to this issue

@0crat 0crat removed their assignment Apr 13, 2020
@0crat
Copy link

0crat commented Apr 13, 2020

The job #104 assigned to @ammaratef45/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

@ammaratef45
Copy link
Contributor

@g4s8 can I get an example of the result file or information about its structure?

@g4s8
Copy link
Member

g4s8 commented Apr 14, 2020

@ammaratef45 there are few example files in test resources: others.xml.example, primary.xml.example, filelists.xml.example

@ammaratef45
Copy link
Contributor

@g4s8 classes like XmlFilelists and XmlOthers have their own inner classes called package and due to this refactoring, startPackage can't return a Package and stay universal among them.
should I add a puzzle to refactor this to a universal class instead of inner classes?

@0crat
Copy link

0crat commented Apr 18, 2020

@ammaratef45/z this job was assigned to you 5days ago. It will be taken away from you soon, unless you close it, see §8. Read this and this, please.

@g4s8
Copy link
Member

g4s8 commented Apr 18, 2020

@g4s8 classes like XmlFilelists and XmlOthers have their own inner classes called package and due to this refactoring, startPackage can't return a Package and stay universal among them.
should I add a puzzle to refactor this to a universal class instead of inner classes?

@ammaratef45 I don't think it's a good idea. These inner classes have to be different since they produce different file specific data. If I understood correctly this puzzle #104, it's about creating common behavior to generate the start of XML document, count the number of packages (all 3 metadata files counts packages), and update this counter XML attribute on end. @victornoel please fix me if I'm wrong

@victornoel
Copy link
Contributor

@g4s8 @ammaratef45 yes, that was the idea.

I was thinking that XmlFilelists, XmlPrimary and XmlOthers would continue to expose the same behaviour as before without changes to their contract. Instead, their implementations would rely on XmlPackagesFilefor the common behaviour, including opening and closing the xml for each packages as well as counting them.

If it's not doable in practice for any reason, I think you can find another good way of factoring the common code: the intention behind this design is factorisation.

@ammaratef45
Copy link
Contributor

@0crat refuse

@0crat
Copy link

0crat commented Apr 20, 2020

@0crat refuse (here)

@ammaratef45 There is an unrecoverable failure on my side. Please, submit it here:

PID: 11@7d3334767964, thread: PQ-CT2E6TK9B
com.zerocracy.farm.ruled.RdRules[130] java.lang.IllegalStateException: http://datum.zerocracy.com/latest/rules/pm/no-lost-estimates.xsl says: The estimate for job "gh:artipie/maven-adapter#74" exists in estimates.xml, but the job is absent in the WBS among 52 jobs.

0.53.9: CID: 6b132591-9d8a-4c0d-9403-84645adeaf41, Type: "Cancel order"

@ammaratef45
Copy link
Contributor

@g4s8 the reason I gave up on the task is that I was working on it doing something different than what's needed

@ammaratef45
Copy link
Contributor

@0crat status

@0crat
Copy link

0crat commented Apr 20, 2020

@0crat status (here)

@ammaratef45 There is an unrecoverable failure on my side. Please, submit it here:

PID: 11@7d3334767964, thread: PQ-CT2E6TK9B
com.zerocracy.farm.ruled.RdRules[130] java.lang.IllegalStateException: http://datum.zerocracy.com/latest/rules/pm/no-lost-estimates.xsl says: The estimate for job "gh:artipie/maven-adapter#74" exists in estimates.xml, but the job is absent in the WBS among 52 jobs.

0.53.9: CID: 1c9ee4c5-f6d0-4a02-bc5a-d3b1fcfa9846, Type: "Check job status"

@0crat
Copy link

0crat commented Apr 23, 2020

The user @ammaratef45/z resigned from #104, please stop working. Reason for job resignation: It is older than 10 days, see §8

@0crat
Copy link

0crat commented Apr 24, 2020

The job #104 assigned to @HDouss/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

HDouss referenced this issue in HDouss/rpm-adapter Apr 24, 2020
HDouss referenced this issue in HDouss/rpm-adapter Apr 26, 2020
g4s8 referenced this issue in HDouss/rpm-adapter Apr 27, 2020
g4s8 added a commit that referenced this issue Apr 27, 2020
@0pdd
Copy link
Author

0pdd commented Apr 27, 2020

The puzzle 81-27d531fb has disappeared from the source code, that's why I closed this issue.

@0pdd 0pdd closed this as completed Apr 27, 2020
@0pdd
Copy link
Author

0pdd commented Apr 27, 2020

@0pdd the puzzle #147 is still not solved.

@0crat 0crat added the qa label Apr 27, 2020
@0crat
Copy link

0crat commented Apr 27, 2020

@sereshqua/z please review this job completed by @HDouss/z, as in §30; the job will be fully closed and all payments will be made when the quality review is completed

@0crat 0crat removed the scope label Apr 27, 2020
@sereshqua
Copy link

@0crat quality good

@0crat 0crat added quality/good and removed qa labels Apr 27, 2020
@0pdd
Copy link
Author

0pdd commented May 8, 2020

@0pdd the only puzzle #147 is solved here.

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

No branches or pull requests

7 participants