Skip to content

fix(OSD): validate OSD called on completely empty OSD .txt file - #95

Merged
AndrewBrown-USDA merged 4 commits into
mainfrom
fix/empty-osd1
Sep 28, 2026
Merged

AndrewBrown-USDA merged 4 commits into
mainfrom
fix/empty-osd1

Conversation

@AndrewBrown-USDA

Copy link
Copy Markdown
Collaborator

Fix for series that have a (nearly) empty text entry for their description.

This started causing build errors about a month ago. Surprising it hasn't come up before, but it may be a result of ncss-tech/OSDRegistry#13 combined with an unusual case (entering a single blank line as the description as opposed to a description that is not entered yet)

  • validateOSD(): Added check after trimming empty lines. If length(raw) == 0, logs "EMPTY OSD FILE: %s" and returns FALSE. Also updated osd_to_json() to check before passing to .doParseOSD().
  • Added to test-create_OSD.R for completely empty and whitespace-only files.

@AndrewBrown-USDA
AndrewBrown-USDA merged commit 945cc35 into main Sep 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant