Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/handle duplicate records #347

Merged

Conversation

ecchong
Copy link
Contributor

@ecchong ecchong commented Apr 19, 2024

SUMMARY

When processing large number of records, ServiceNow returns duplicated records with the same 'sys_id' in the first fetch call.  It causes 'sys_id' error when processing reference_dict where it tries to pop the same 'sys_id' twice.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

plugins/inventory/now.py

ADDITIONAL INFORMATION

No change to how the plugin is being run.  The issue is in the returned data from ServiceNow.  This change should handle the duplicate records without causing the plugin to fail with error.  The duplicated records have the same sys_id, so they should be the same record.  Therefore, it should be OK to process it twice.

Copy link

Copy link

@tupyy tupyy merged commit ae5df3a into ansible-collections:main May 16, 2024
107 of 108 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants