Repository navigation
List an OpenAPI description among the contents of a directory - #1333
Conversation
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
There was a problem hiding this comment.
Benchmark (community)
Details
| Benchmark suite | Current: 290cefc | Previous: 2685e21 | Ratio |
|---|---|---|---|
Add one schema (0 existing) |
283 ms |
186 ms |
1.52 |
Add one schema (100 existing) |
47 ms |
36 ms |
1.31 |
Add one schema (1000 existing) |
93 ms |
83 ms |
1.12 |
Add one schema (10000 existing) |
739 ms |
764 ms |
0.97 |
Update one schema (1 existing) |
36 ms |
27 ms |
1.33 |
Update one schema (101 existing) |
45 ms |
35 ms |
1.29 |
Update one schema (1001 existing) |
93 ms |
104 ms |
0.89 |
Update one schema (10001 existing) |
722 ms |
713 ms |
1.01 |
Cached rebuild (1 existing) |
15 ms |
11 ms |
1.36 |
Cached rebuild (101 existing) |
16 ms |
14 ms |
1.14 |
Cached rebuild (1001 existing) |
42 ms |
35 ms |
1.20 |
Cached rebuild (10001 existing) |
316 ms |
269 ms |
1.17 |
Index 100 schemas |
478 ms |
326 ms |
1.47 |
Index 1000 schemas |
1925 ms |
968 ms |
1.99 |
Index 10000 schemas |
12865 ms |
9701 ms |
1.33 |
Index 10000 schemas (custom meta-schema) |
16539 ms |
12287 ms |
1.35 |
Index 10000 schemas ($ref fan-out) |
14927 ms |
11547 ms |
1.29 |
test/e2e/html: Schema Fetch (p50) |
396 us |
227 us |
1.74 |
test/e2e/html: Schema Fetch (p99) |
487 us |
379 us |
1.28 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Benchmark (enterprise)
Details
| Benchmark suite | Current: 290cefc | Previous: 2685e21 | Ratio |
|---|---|---|---|
Add one schema (0 existing) |
397 ms |
443 ms |
0.90 |
Add one schema (100 existing) |
95 ms |
108 ms |
0.88 |
Add one schema (1000 existing) |
154 ms |
164 ms |
0.94 |
Add one schema (10000 existing) |
871 ms |
1183 ms |
0.74 |
Update one schema (1 existing) |
84 ms |
94 ms |
0.89 |
Update one schema (101 existing) |
91 ms |
106 ms |
0.86 |
Update one schema (1001 existing) |
154 ms |
168 ms |
0.92 |
Update one schema (10001 existing) |
877 ms |
1044 ms |
0.84 |
Cached rebuild (1 existing) |
13 ms |
14 ms |
0.93 |
Cached rebuild (101 existing) |
16 ms |
15 ms |
1.07 |
Cached rebuild (1001 existing) |
42 ms |
38 ms |
1.11 |
Cached rebuild (10001 existing) |
289 ms |
308 ms |
0.94 |
Index 100 schemas |
529 ms |
702 ms |
0.75 |
Index 1000 schemas |
1437 ms |
1707 ms |
0.84 |
Index 10000 schemas |
12285 ms |
15010 ms |
0.82 |
Index 10000 schemas (custom meta-schema) |
12741 ms |
15561 ms |
0.82 |
Index 10000 schemas ($ref fan-out) |
18240 ms |
19989 ms |
0.91 |
enterprise/e2e/auth: Schema Anonymous (p50) |
220 us |
288 us |
0.76 |
enterprise/e2e/auth: Schema Anonymous (p99) |
305 us |
366 us |
0.83 |
enterprise/e2e/auth: Schema API Key Identity (p50) |
224 us |
291 us |
0.77 |
enterprise/e2e/auth: Schema API Key Identity (p99) |
300 us |
364 us |
0.82 |
enterprise/e2e/auth: Schema API Key SHA256 (p50) |
227 us |
295 us |
0.77 |
enterprise/e2e/auth: Schema API Key SHA256 (p99) |
302 us |
372 us |
0.81 |
enterprise/e2e/auth: Schema JWT (p50) |
322 us |
406 us |
0.79 |
enterprise/e2e/auth: Schema JWT (p99) |
441 us |
511 us |
0.86 |
test/e2e/html: Schema Fetch (p50) |
225 us |
295 us |
0.76 |
test/e2e/html: Schema Fetch (p99) |
325 us |
353 us |
0.92 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
1 issue found across 24 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/index/explorer.h">
<violation number="1" location="src/index/explorer.h:191">
P1: Adding this packed field is not backward-compatible with persisted `directory.metapack` artifacts: incremental upgrades can misread existing paths/counts or hit the new missing-field assertion. Version/invalidate the directory extension and rebuild old artifacts before interpreting them with the new layout.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
| MetapackVersionInfo version; | ||
| std::int64_t health; | ||
| std::int64_t schemas; | ||
| std::int64_t openapi; |
There was a problem hiding this comment.
P1: Adding this packed field is not backward-compatible with persisted directory.metapack artifacts: incremental upgrades can misread existing paths/counts or hit the new missing-field assertion. Version/invalidate the directory extension and rebuild old artifacts before interpreting them with the new layout.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At src/index/explorer.h, line 191:
<comment>Adding this packed field is not backward-compatible with persisted `directory.metapack` artifacts: incremental upgrades can misread existing paths/counts or hit the new missing-field assertion. Version/invalidate the directory extension and rebuild old artifacts before interpreting them with the new layout.</comment>
<file context>
@@ -188,6 +188,7 @@ struct MetapackDirectoryExtension {
MetapackVersionInfo version;
std::int64_t health;
std::int64_t schemas;
+ std::int64_t openapi;
std::uint16_t path_length;
std::uint16_t title_length;
</file context>
🤖 Augment PR SummarySummary: Makes ingested OpenAPI descriptions discoverable in directory listings.
🤖 Was this summary useful? React with 👍 or 👎 |
| "private", make_private(authentication, | ||
| child_registry_path(directory_registry_path, | ||
| entry.name))); | ||
| entries.push_back(std::move(entry.json)); |
There was a problem hiding this comment.
Could we check HTML navigation for the entries appended at src/index/explorer.h:1880? make_file_manager_row links their extensionless path, but ACTION_WEB_SCHEMA only generates HTML artifacts for schemas, so clicking /test/openapi-petstore in the standard explorer now returns 404.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
| const std::uint8_t *base) -> sourcemeta::core::JSON { | ||
| auto result{sourcemeta::core::JSON::make_object()}; | ||
| result.assign("name", sourcemeta::core::JSON{name}); | ||
| result.assign("type", sourcemeta::core::JSON{"openapi"}); |
There was a problem hiding this comment.
Could we check the experimental directory browser against the new type at src/index/explorer.h:1444? ui/src/components/DirectoryNode.tsx:28–55 treats every non-schema entry as a directory, so OpenAPI documents appear as expandable folders; clicking openapi-petstore requests /self/v1/api/list/test/openapi-petstore and silently collapses the row on 404.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
Signed-off-by: Juan Cruz Viotti jv@jviotti.com