oxidecomputer / oxidecomputer/omicron
[dependencies] Consider switching from ipnetwork to ipnet for IP network management
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 572
- Forks
- 97
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 96
Description
ipnetwork - currently used in omicron - and ipnet (not used yet) serve very similar purposes: they both track network addresses, ranges, and subnets.
Background
- We originally began using
ipnetworkas it was supported natively within Diesel (see: the conversion for https://docs.diesel.rs/master/diesel/pg/sql_types/struct.Inet.html ).ipnetdidn't have such converters. - Additionally, neither type implemented JsonSchema - we had to hand-roll that ourselves.
Progress
- The
ipnetcrate has been pretty amenable to addingJsonSchemasupport: https://github.com/krisprice/ipnet/pull/31 - It seems relatively straightforward (though I haven't tried) to add
ipnetconvertersToSqlandFromSqlfor Diesel
Doing so would let us move to a crate with slightly better subnet-management functionality, and a better cadence of support.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by locating the current ipnetwork uses and Diesel Inet conversion boundaries, then review ipnet's JsonSchema support and the feasibility of its ToSql and FromSql converters. Done means the migration's scope and compatibility are established, or the switch is ruled out.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- databases, networking
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100