oxidecomputer / oxidecomputer/omicron
Use instance name as hostname if not provided
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 572
- Forks
- 97
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 96
Description
Based on the discussion in #66 and elsewhere, in the instance create POST we want to:
- Make
hostnameoptional (it's currently required) - Validate it using the same constraints we're currently using for
name -
- If
hostnameis not provided, setnameashostname
- If
Out of scope for now is worrying about uniqueness of hostname, e.g., if the user creates { name: 'db1', hostname: 'db2' } and then tries to create { name: 'db2' } (which implies a hostname of db2), let them.
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
Start at the instance create POST endpoint and locate the current hostname requirement and name validation. Make hostname optional, apply the existing name constraints, and use name when hostname is absent; uniqueness checks are explicitly out of scope. Confirm the behavior for both supplied and omitted hostname values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100