docs(v2): add Examples showcase, and make the examples runnable#939
Conversation
Surface the ready-to-run configs under examples/ in the v2 docs. Adds a new Examples section with a how-to-run intro (run from the example dir), a companion-files/setup guide, categorized index tables linking each example to GitHub with a Setup column, and three inlined end-to-end recipes. Cross-linked from the introduction page. Excludes examples/pool_metadata (references the removed Deno filter) and examples/_deprecated. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Caution Review failedPull request was closed or merged during review No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (26)
📝 WalkthroughWalkthroughAdds a new ChangesExamples Documentation and Configuration
Hydra WebSocket Error Handling
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The shipped examples pointed at relays-new.cardano-mainnet.iohk.io:3001,
which no longer resolves (NXDOMAIN), so running them verbatim only looped
on "error connecting bearer". Point all 21 N2N example configs (and the two
inlined recipes in the Examples docs) at the live
backbone.mainnet.cardanofoundation.org:3001 relay.
Also fix the two broken source examples:
- dolos_source: the U5C source's `metadata` field is required (no serde
default), so the example failed to load with `missing field metadata`.
Add an empty `metadata` table, point the URL at a local Dolos, and
document the Demeter API-key pattern.
- hydra: the source called `.expect("Can't connect")` on bootstrap, so an
unreachable Hydra node panicked the process instead of erroring. Log the
error and return a retryable WorkerError, matching the rest of the source.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The v2 docs and CONTRIBUTING still referenced relays-new.cardano-mainnet.iohk.io:3001, which no longer resolves (NXDOMAIN), so copy-pasted config snippets and `oura watch` commands fail to connect. Point them at the live backbone.mainnet.cardanofoundation.org:3001 relay, matching the example configs fixed in #939. (v1 docs are maintained on the lts/v1 branch and fixed separately.) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
What
Adds an Examples section to the v2 docs that showcases the ready-to-run
configs under
examples/, and fixes the examples themselves so thatfollowing the docs verbatim actually works.
Docs
docs/v2/examples/section (_meta.yaml+index.mdx): how to run anexample, companion-file/setup notes, categorized index of every example
(sources, filters, sinks, cursors, observability, library), and a few inlined
end-to-end recipes.
Example fixes
Validated by building v2.1.0 from source and running every example.
relays-new.cardano-mainnet.iohk.io:3001, which no longer resolves(NXDOMAIN) — run verbatim they only looped on
error connecting bearer. Nowthey use the live
backbone.mainnet.cardanofoundation.org:3001.dolos_source(broken → fixed). The U5C source'smetadatafield isrequired (no serde default), so the example failed to load with
missing field metadata. Added an emptymetadatatable, pointed the URL at alocal Dolos, and documented the Demeter API-key pattern.
hydrasource (panic → graceful).bootstrapcalled.expect("Can't connect"), so an unreachable Hydra node panicked the process.It now logs the error and returns a retryable
WorkerError, like the rest ofthe source.
Not included
examples/pool_metadatastill uses the removedDenofilter (separateremoval/port decision) and is excluded from the showcase.
CONTRIBUTING.md,v1 docs) are left for a follow-up.
🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
Configuration
Bug Fixes