Skip to content

Conversation

@BD-Hypercall88
Copy link

@BD-Hypercall88 BD-Hypercall88 commented Dec 3, 2025

Related Issues

#5149

relates: https://jira-dc.paloaltonetworks.com/browse/CIAC-15452
preventing formatter from corrupting JSON files in directories whose names
contain content type keywords.

Description

Fixed id_set generation crash when processing lists that store metadata and data in separate files.

Problem:
Lists can be stored as:

  • Unified: Single file with metadata + data
  • Separate: Metadata file (with 'id') + data file (no 'id')

When processing separate data files, id_set generation crashed with AttributeError trying to sort entries with None keys.

Solution:

  • Skip files without 'id' field in get_list_data(), return empty dict
  • Filter empty results in process_general_items() before appending
  • Added debug logging for skipped files

Impact:

  • List metadata files correctly added to id_set
  • List data files safely skipped
  • Unified lists continue to work normally

Testing:

  • Unit test: get_list_data() with unified/metadata/data files
  • Integration test: Full id_set generation with separate files
  • Verified crash before fix, success after

Fixed id_set generation crash when processing lists that store metadata
and data in separate files.

**Problem:**
Lists can be stored as:
- Unified: Single file with metadata + data
- Separate: Metadata file (with 'id') + data file (no 'id')

When processing separate data files, id_set generation crashed with
AttributeError trying to sort entries with None keys.

**Solution:**
- Skip files without 'id' field in get_list_data(), return empty dict
- Filter empty results in process_general_items() before appending
- Added debug logging for skipped files

**Impact:**
- List metadata files correctly added to id_set
- List data files safely skipped
- Unified lists continue to work normally

**Testing:**
- Unit test: get_list_data() with unified/metadata/data files
- Integration test: Full id_set generation with separate files
- Verified crash before fix, success after
@BD-Hypercall88 BD-Hypercall88 requested a review from a team as a code owner December 3, 2025 20:11
@github-actions github-actions bot added the Contribution Thank you! Contributions are always welcome! label Dec 3, 2025
@github-actions
Copy link

github-actions bot commented Dec 3, 2025

Thank you for your contribution. Your willingness to improve our product and contribute to our community is highly appreciated. For your convenience, here is a link to the contributions SLAs document.

@JasBeilin JasBeilin assigned BEAdi and unassigned JasBeilin Dec 17, 2025
@merit-maita merit-maita reopened this Dec 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Contribution Thank you! Contributions are always welcome!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants