Open MJJoyce opened 3 months ago
Hey @MJJoyce, thanks for posting this.
Some background for context: We have external users that need to see TLM, but have restrictions on the CMD dictionary. Since the server is on the edge serving the TLM, we opt'ed to omit the CMD dict altogether. Setting the cmd.yml to an empty file causes the OpenMCT API fail.
The simple solution was to add at least 1 dummy command to the CMD.yml file.
- !Command
name: NOPE_NOOP
opcode: 0x0000000
desc: "Dummy CMD to keep AIT happy"
ccsds:
version: 0
type: 0
seqflags: 0
seqcnt: 0
length: 0
apid: 0
secondary: 0
AIT can fail to gracefully handle empty configuration dictionary files. Adding some checks to make this more robust would be valuable even though it's unlikely most users will run into issues here.
For example, AIT will properly return an empty dictionary if you load the dictionary from a component that doesn't have a configuration file provided. If you edit
config.yaml
and remove the default command dictionary:You get nothing when you request a dictionary.
However, if you pass an empty configuration dictionary the dictionary load will fail: