Gustavo Herzmann edd96279bd Fix dcorch proxy metadata file handling for software uploads
Handle FileNotFoundError in read_metadata() to avoid masking software
service upload errors when auditing dc-vault files. This prevents error
propagation during initial uploads where no metadata file exists yet,
while maintaining the expected behavior of returning an empty
dictionary.

Test Plan:
01. PASS - Verify normal software upload flow works with existing
    metadata file containing valid JSON.
02. PASS - Attempt software upload with invalid path and verify the
    original upload error is reported, not metadata errors.
03. PASS - Delete metadata file and verify audit operations handle
    the missing file by returning empty data.
04. PASS - Verify warning logs show proper context for both missing
    file and invalid JSON scenarios.

Closes-Bug: 2086728

Change-Id: Ic6fa7071b95e20a3c2e1dbe31d25e3a481d031fc
Signed-off-by: Gustavo Herzmann <gustavo.herzmann@windriver.com>
2024-11-05 15:40:54 -03:00
..
2024-06-28 13:42:16 +00:00
2024-06-28 13:42:16 +00:00
2024-06-28 13:42:16 +00:00