Skip to content

Conversation

@nichitacebotari0
Copy link
Collaborator

@nichitacebotari0 nichitacebotari0 commented Sep 7, 2025

The goal is to have our (intermediary)representation of the xml data be closer to how it is in the actual file.
This will make it easier to avoid bugs and allow us to not lose any data by collapsing data from multiple entries into one too early.
Note that we can still "collapse" this computed state as an added step later if we deem it necessary.

Changes:

  • Added NewConfigEntry (node)and NewConfigEntryReference(edge) to more closely represent the xml data being parsed.
    • NewConfigEntry Parameters now only contain the parameters of the node in xml, instead we can use getEffectiveParameters() to compute/collapse the parameters from all the ancestors all the way to this child
  • Ported logic to index the new models. Note that the logic around xml parsing was not changed and is simply copy-pasted.
  • Added a v2 controller for index that will query new models
  • Port existing tests to run against new endpoints. Note: testing effectiveParameters instead of parameters in getConfigByPathDeepParameter() test, and return 200 empty array instead of 404 in getConfigByNameFail()
  • Added UI for local testing that will call v1 and v2 so we can compare(pics below)
UI Pics image image image image

Note: routed params logic is mostly unrefactored, and they are still collapsed("pre-computed") and kept directly on the NewConfigEntry

TODOs(not all need to be part of current PR):

  • Do a bit of performance improvements(look into adding @Cacheable on the new stuff as well). Nice to have, the most egregious example is querying for tradeable names takes a few seconds on the V2 as opposed to fractions of a second. Need to measure the startup as well, as we now loop over the entries multiple times instead of pre-computing everything in one loop Issue dissapeared after running mvn clean, install and compile and deleting .vscode cache. As for startup difference seems to be about 0.7-1.2 seconds on my old zephyrus laptop(from ~3.3 seconds to ~4.2
  • Have the Graph node visualizer on the UI show parent names and make references clickable to browse the details. Nice to have ( partially done, added clicking ability)
  • Make a Graph node visualizer on the UI to show all our resources at once, clustered by config file(is there ever any crossfile reference?). Nice to have
  • Do some more refactoring(routed params, more definitive decisions around what is a repo and what is a service, etc). Optional
  • Make tests ignore non-test resource files when running locally. Low priority

@nichitacebotari0 nichitacebotari0 self-assigned this Sep 7, 2025
@nichitacebotari0 nichitacebotari0 marked this pull request as ready for review September 9, 2025 17:03
@Crowfunder Crowfunder self-assigned this Sep 12, 2025
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.

3 participants