Known Issues
A candid list of current limitations and rough edges in microCMDB.CLI, to set expectations and guide contributors.
Recently fixed
These crash/hang paths have been addressed:
- Empty / EOF input no longer crashes.
GetYesNoand the date parser guard againstnullfromConsole.ReadLine(), soCtrl-Dand end-of-pipe no longer throwNullReferenceExceptionor loop forever. - The main shell loop exits on EOF instead of spinning, printing “Invalid command” indefinitely.
set c/set configitemswith no tag prints a usage message instead of throwingIndexOutOfRangeException.findwith no tag is rejected instead of dumping the entire database (an empty prefix matched everything).
Open issues
Correctness
new configitemdouble-adds. The object initializer self-registers in the constructor and the handler callsAddagain, so the item appears twice.new dbdoes not reset IDs. The per-type counter isstaticand survives context replacement, so tags continue from where they left off (CFG0006, …) rather than restarting atCFG0001.- Seed data contains duplicate SoftwareInstallations.
new host/new service/new softwareare stubs that only print a message. Severalset …verbs are likewise stubs.Import()is broken — it splits the file path rather than the file contents, so nothing is actually read, and it is not wired to a command.exportappends to existing CSVs (duplicating rows on repeat) and does not quote/escape values, so commas or newlines in free-text fields corrupt a row.deleteleaves orphaned mappings — related join records are not removed.
Design
- Persistence via constructor side-effect. Entities add themselves to a global static
Db.CurrentDbContext; constructing one without a live context throws, and explicitAddcalls can double-register. - Pervasive static mutable state (the context, the ID counter, reused fields in
Set) makes behaviour order-dependent and hard to unit-test. Dbis in-memory only — there is no persistence layer; state is lost on exit unless exported. Meanwhile microCMDB.Web maintains a parallel, EF-Core-backed copy of the same models.- Large boilerplate duplication across the
Get,Export, and command- dispatch code that a registry or generics could collapse.
Cosmetic
- In
get hosts, theServices:line is not newline-terminated, so the next table separator runs into it.
See the GitHub repository to file or track issues.