Fix custom log groupings being discarded when parallel adapter loading was enabled#1187
Open
garymccann wants to merge 1 commit intonautobot:developfrom
Open
Conversation
| log_level=log_level, | ||
| message=message, | ||
| grouping=adapter_type, # Group by source or target adapter | ||
| grouping=grouping, |
Contributor
There was a problem hiding this comment.
Wonder if it'd be desirable to combine the adapter type and specified grouping string, e.g. "Loading Data (source)" vs "Loading Data (target)"?
Contributor
Author
There was a problem hiding this comment.
interesting - yeah that would be trivial, combine the groupings. @jdrew82 wdyt?
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes: #1183
A bug of sorts which masks detailed log messages through discarding their groupings.
What's Changed
When parallel adapter loading is enabled, the create_job_log_entry() function in _load_adapters_parallel() hardcoded grouping=adapter_type, which collapsed all custom log groupings (e.g., "Loading ServiceNow Data", "Data Quality Issues") to generic "source" or "target" labels.
The fix reads the custom grouping from the captured LogRecord's dict, falling back to adapter_type when no custom grouping was set:
Before
grouping=adapter_type
After
grouping = record.dict.get("grouping", adapter_type)
This affects all SSoT integrations that set extra={"grouping": ...} in their adapter log calls.
To Do