Commit cd6ef11
authored
feat: publish subgraph hash configmap (#39)
## Summary
- add a helper to load and validate the subgraph hash from a file
- include the subgraph hash ConfigMap in file and Kubernetes outputs
with a default name
- wire the generate command to read the optional subgraph hash file and
extend tests
## Testing
- bun test
- bun run typecheck
- bun run check
------
https://chatgpt.com/codex/tasks/task_e_68cf2d48dc44833287e31391dee5278e
## Summary by Sourcery
Add support for loading and publishing a subgraph IPFS hash as a
ConfigMap in the network bootstrap process.
New Features:
- Introduce loadSubgraphHash helper to read and validate an IPFS hash
from a file
- Add --subgraph-hash-file CLI option and SUBGRAPH_HASH_FILE environment
variable to specify the subgraph hash file
- Include subgraph hash in payload and publish it as a ConfigMap in both
file and Kubernetes outputs
Build:
- Add multiformats dependency for IPFS CID parsing
Documentation:
- Document the new --subgraph-hash-file option in the README
Tests:
- Add unit tests for loadSubgraphHash to validate file existence,
emptiness, and CID format
- Extend bootstrap command and output tests to cover subgraph hash
loading and ConfigMap generation1 parent c436033 commit cd6ef11
10 files changed
Lines changed: 243 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| 39 | + | |
| 40 | + | |
38 | 41 | | |
39 | 42 | | |
40 | 43 | | |
| |||
204 | 207 | | |
205 | 208 | | |
206 | 209 | | |
| 210 | + | |
207 | 211 | | |
208 | 212 | | |
209 | 213 | | |
| |||
242 | 246 | | |
243 | 247 | | |
244 | 248 | | |
| 249 | + | |
245 | 250 | | |
246 | 251 | | |
247 | 252 | | |
| |||
278 | 283 | | |
279 | 284 | | |
280 | 285 | | |
| 286 | + | |
281 | 287 | | |
282 | 288 | | |
283 | 289 | | |
| |||
296 | 302 | | |
297 | 303 | | |
298 | 304 | | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
299 | 355 | | |
300 | 356 | | |
301 | 357 | | |
| |||
337 | 393 | | |
338 | 394 | | |
339 | 395 | | |
| 396 | + | |
340 | 397 | | |
341 | 398 | | |
342 | 399 | | |
| |||
405 | 462 | | |
406 | 463 | | |
407 | 464 | | |
| 465 | + | |
408 | 466 | | |
409 | 467 | | |
410 | 468 | | |
| |||
457 | 515 | | |
458 | 516 | | |
459 | 517 | | |
| 518 | + | |
460 | 519 | | |
461 | 520 | | |
462 | 521 | | |
| |||
487 | 546 | | |
488 | 547 | | |
489 | 548 | | |
| 549 | + | |
490 | 550 | | |
491 | 551 | | |
492 | 552 | | |
| |||
556 | 616 | | |
557 | 617 | | |
558 | 618 | | |
| 619 | + | |
559 | 620 | | |
560 | 621 | | |
561 | 622 | | |
| |||
639 | 700 | | |
640 | 701 | | |
641 | 702 | | |
| 703 | + | |
642 | 704 | | |
643 | 705 | | |
644 | 706 | | |
| |||
730 | 792 | | |
731 | 793 | | |
732 | 794 | | |
| 795 | + | |
733 | 796 | | |
734 | 797 | | |
735 | 798 | | |
736 | 799 | | |
737 | 800 | | |
738 | 801 | | |
739 | 802 | | |
| 803 | + | |
740 | 804 | | |
741 | 805 | | |
742 | 806 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| 52 | + | |
51 | 53 | | |
52 | 54 | | |
53 | 55 | | |
| |||
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
| 63 | + | |
61 | 64 | | |
62 | 65 | | |
63 | 66 | | |
| |||
69 | 72 | | |
70 | 73 | | |
71 | 74 | | |
| 75 | + | |
72 | 76 | | |
73 | 77 | | |
74 | 78 | | |
| |||
303 | 307 | | |
304 | 308 | | |
305 | 309 | | |
| 310 | + | |
306 | 311 | | |
307 | 312 | | |
308 | 313 | | |
| |||
399 | 404 | | |
400 | 405 | | |
401 | 406 | | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
402 | 423 | | |
403 | 424 | | |
404 | 425 | | |
| |||
425 | 446 | | |
426 | 447 | | |
427 | 448 | | |
| 449 | + | |
428 | 450 | | |
429 | 451 | | |
| 452 | + | |
430 | 453 | | |
431 | 454 | | |
432 | 455 | | |
| |||
441 | 464 | | |
442 | 465 | | |
443 | 466 | | |
| 467 | + | |
444 | 468 | | |
445 | 469 | | |
446 | 470 | | |
| |||
487 | 511 | | |
488 | 512 | | |
489 | 513 | | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
490 | 519 | | |
491 | 520 | | |
492 | 521 | | |
| |||
601 | 630 | | |
602 | 631 | | |
603 | 632 | | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
604 | 637 | | |
605 | 638 | | |
606 | 639 | | |
| |||
628 | 661 | | |
629 | 662 | | |
630 | 663 | | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
631 | 670 | | |
632 | 671 | | |
633 | 672 | | |
| |||
0 commit comments