Commit Graph

27 Commits

Author SHA1 Message Date
quobix
18a817b89e Added test in resolver for #481 2024-04-21 09:10:53 -04:00
quobix
5649e798f0 resolved issue #259 2024-04-19 06:45:19 -04:00
quobix
79d49faf70 Addressed https://github.com/daveshanley/vacuum/issues/459
Signed-off-by: quobix <dave@quobix.com>
2024-02-20 13:34:39 -05:00
quobix
2f82a69d6c A clean sweep around resolving during model builds.
Really hammering on this model using all available examples of crazy references used in crazy ways. The fixes mean I can delete the recent patch added to handle lost indexes.

I spent two days on this commit.

Signed-off-by: quobix <dave@quobix.com>
2024-02-20 13:34:39 -05:00
quobix
c55527066a Addressed invalid polymorphic circular reference issue.
If a polymorphic type was used incorrectly (as a map and not an array) then the logic was getting a little upset. This fixes that issue and adds some tests to validate correct handling.

Signed-off-by: quobix <dave@quobix.com>
2024-01-30 16:44:06 -08:00
Ilja Lapkovskis
b01b967433 Fix issue with non-working IgnorePoly flag. 2024-01-26 06:20:29 -05:00
quobix
7a5a4bcb2d Tuned circular reference handling
stopped rolodex looking up root file, looking in components schemas for a reference also. Dropped stripe circular refs down by one. seems to be catching the duplicate now.

Signed-off-by: quobix <dave@quobix.com>
2023-12-03 15:54:20 -05:00
quobix
1e9b42a1ce catching circular references that spin out of control
This builds on the last patch, by also catching the issue in the resolver and then allowing it to bubble up to applications.
no new fixes, no new featuers, just better integration so vacuum can report the issues.

Signed-off-by: quobix <dave@quobix.com>
2023-12-03 11:06:43 -05:00
quobix
afe5c1213b Added a safety check to resolver
If the number of relatives exceeds 500  deep when resolving, libopenapi will now log a warning and escape that path from continuing. There is no reason on earth for a depth this large. It most likely indicates a circular reference that was ignored and then resolved.

Signed-off-by: quobix <dave@quobix.com>
2023-12-03 09:23:18 -05:00
quobix
82c9e21df1 fixed tests.
Signed-off-by: quobix <dave@quobix.com>
2023-12-01 18:11:54 -05:00
quobix
190330ca9b Added in fix for stackoverflow issue
discovered while running tests, vacuum explodes with the new stripe spec. It’s a `FullDefintion` vs `Definition` misfire.

Signed-off-by: quobix <dave@quobix.com>
2023-11-30 12:59:59 -05:00
quobix
e624efbf84 addressed issue #195
Resolving and indexing has changed, new code is required and this isue highlighted a glitch introduced with the addition of the rolodex when resolving.

Signed-off-by: quobix <dave@quobix.com>
2023-11-08 12:36:08 -05:00
quobix
265d462a10 Added back in logic required by vacuum.
And added test for it.

Signed-off-by: quobix <dave@quobix.com>
2023-11-04 12:36:47 -04:00
quobix
9b92a55536 Added in full resolving for specs is virtual filesystems
added last remaining coverage

Signed-off-by: quobix <dave@quobix.com>
2023-11-04 11:28:22 -04:00
quobix
7d8762fdd9 added more coverage and resolved param ref issue
Signed-off-by: quobix <dave@quobix.com>
2023-11-03 18:25:27 -04:00
quobix
fde5a9972d tuning ref lookups, finding some gaps.
coverage will drop no doubt

Signed-off-by: quobix <dave@quobix.com>
2023-11-03 14:06:37 -04:00
quobix
fa0b315756 Enabling deep array circular reference checking
Signed-off-by: quobix <dave@quobix.com>
2023-11-03 09:49:02 -04:00
quobix
713aeecdfa Tuning parameter exraction for circular ref handling
Lots and lots of variations. means lots of branches to check.

Signed-off-by: quobix <dave@quobix.com>
2023-11-02 15:04:47 -04:00
quobix
5d41427960 more coverage, bumping up rolodex coverage
fixing small glitches now as we go.

Signed-off-by: quobix <dave@quobix.com>
2023-10-31 10:15:19 -04:00
quobix
a87d9236d8 bumping test coverage
more to go, more cleaning inbound also

Signed-off-by: quobix <dave@quobix.com>
2023-10-25 08:09:33 -04:00
quobix
8717b3cd33 An enormous amount of surgery on the low level model.
Every `Build()` method now requires a `context.Context`. This is so the rolodex knows where to resolve from when locating relative links. Without knowing where we are, there is no way to resolve anything. This new mechanism allows the model to recurse across as many files as required to locate references, without loosing track of where we are in the process.

Signed-off-by: quobix <dave@quobix.com>
2023-10-23 15:04:34 -04:00
quobix
be7e477529 index tests all pass! now time to clean.
Signed-off-by: quobix <dave@quobix.com>
2023-10-21 17:29:53 -04:00
quobix
48c83ddb30 resolver tests all operational
time to start some cleanup.

Signed-off-by: quobix <dave@quobix.com>
2023-10-18 12:01:06 -04:00
quobix
51971762a9 Another massive surgical strike with the rolodex and index reshuffle.
Signed-off-by: quobix <dave@quobix.com>
2023-10-18 09:29:26 -04:00
quobix
cea7bb0cc8 chopping through index changes, basic design works.
seems to be holding, more tests to change.

Signed-off-by: quobix <dave@quobix.com>
2023-10-16 14:56:58 -04:00
quobix
8b795c6321 working through rolodex design and using it externally via vacuum
this is some complex and messy work.

Signed-off-by: quobix <dave@quobix.com>
2023-10-15 12:34:54 -04:00
quobix
511843e4df Major surgery on the index and resolver. A complete flip in design.
Signed-off-by: quobix <dave@quobix.com>
2023-10-14 12:36:38 -04:00