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

Cleanup: Huge XML cleanup #999

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mathieucarbou
Copy link
Member

@mathieucarbou mathieucarbou commented May 15, 2021

  • Moved all XML parsers to the converter (which was depending on them)
  • Stripped the XML parsers to their bare minimal requirement (which is outputting jaxb objects)
  • Removed any dependency towards tc-config-parser plus the descriptors
  • Removed any dependency towards tcconfig-schemas in plugins / services
  • Introduced a new interface XmlParser in DC api to replace the previous ones, and which is more focused on parsing jaxb objects

@mathieucarbou mathieucarbou added this to the 5.8.5 milestone May 15, 2021
@mathieucarbou mathieucarbou self-assigned this May 15, 2021
@mathieucarbou
Copy link
Member Author

mathieucarbou commented May 15, 2021

@chrisdennis : if this refactoring works for you, we can apply the same recipe for EE. The idea is to move the parser and jaxb objects to the converter EE module, and after that we can remove the dependency the converter had with the plugins / services. This centralizes all the ugly crap in one place.

The idea is to move out the XML code from the plugins / services to the converter tool, and then cleanup the dependencies of the converter tool.

Also, no need anymore to depend on tc-parser and the 2 interfaces. We can replace that easily with another one.

- Moved all XML parsers to the converter (which was depending on them)
- Stripped the XML parsers to their bare minimal requirement (which is outputting jaxb objects)
- Removed any dependency towards tc-config-parser plus the descriptors
- Removed any dependency towards tcconfig-schemas in plugins / services
- Introduced a new interface `XmlParser` in DC api to replace the previous ones, and which is more focused on parsing jaxb objects
@mathieucarbou mathieucarbou changed the title Huge XML cleanup Cleanup: Huge XML cleanup May 17, 2021
Copy link
Member

@chrisdennis chrisdennis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not doubting that this works... but I'm not a fan of the approach here. I'd much rather treat the old XML parsing code as legacy that we support. That means minimal changes to avoid accidentally changing the semantics of the parsing behavior. To that end I'd much prefer moving the XML parsing classes to <service-provider-module>/xml child modules with distinct coordinates. The classes can all move without being modified which minimized the chances of any behavioral changes, the upgrade tool depends on those modules (that can transitively depend on their parents if necessary) and the new kit gets naturally cleaned of all xml traces.

@mathieucarbou
Copy link
Member Author

mathieucarbou commented May 17, 2021

I'd much rather treat the old XML parsing code as legacy that we support.

=> the removed code was dead and was never called. We do not use the parse methods and old interfaces anymore (except when the jaxb objects were not directly accessible). Whether this is in this PR or before in DC... I have only kept the "jaxb" output.

@mathieucarbou mathieucarbou marked this pull request as draft May 19, 2021 12:05
@mathieucarbou mathieucarbou modified the milestones: 5.8.5, 5.8.6 May 25, 2021
@mathieucarbou mathieucarbou deleted the xml branch June 23, 2021 20:00
@mathieucarbou mathieucarbou restored the xml branch June 29, 2021 20:51
@mathieucarbou mathieucarbou reopened this Jun 29, 2021
@mathieucarbou
Copy link
Member Author

will try to look at this one in some spare time...

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

Successfully merging this pull request may close these issues.

2 participants