Skip to content

[ServiceNow] Paginate API calls when we have advanced sync rules - #3559

Merged
lorenabalan merged 7 commits into
mainfrom
lb/fix/service-now-pagination
Jul 30, 2025
Merged

[ServiceNow] Paginate API calls when we have advanced sync rules#3559
lorenabalan merged 7 commits into
mainfrom
lb/fix/service-now-pagination

Conversation

@lorenabalan

@lorenabalan lorenabalan commented Jul 29, 2025

Copy link
Copy Markdown
Contributor

Closes #3509

  • Updated list of API calls in get_filter_apis() with appropriate offset instead of 0, similarly to how we do it in get_record_apis()
  • Turned the function async because of the call to get_table_length

Tested it locally and we get more than 50 documents upserted, as per screenshot below:
Screenshot 2025-07-29 at 11 58 00

Checklists

Pre-Review Checklist

  • this PR does NOT contain credentials of any kind, such as API keys or username/passwords (double check config.yml.example)
  • this PR has a meaningful title
  • this PR links to all relevant github issues that it fixes or partially addresses
  • this PR has a thorough description
  • Covered the changes with automated tests
  • Tested the changes locally
  • Added a label for each target release version (example: v7.13.2, v7.14.0, v8.0.0)
  • For bugfixes: backport safely to all minor branches still receiving patch releases
  • Considered corresponding documentation changes

Release Note

@lorenabalan
lorenabalan marked this pull request as ready for review July 29, 2025 13:31
@lorenabalan
lorenabalan requested a review from a team as a code owner July 29, 2025 13:31
Comment thread connectors/sources/servicenow.py Outdated
@lorenabalan lorenabalan changed the title [ServiceNow] Paginate API calls when we have filters [ServiceNow] Paginate API calls when we have advanced sync rules Jul 29, 2025
meghanmurphy1
meghanmurphy1 previously approved these changes Jul 29, 2025

@meghanmurphy1 meghanmurphy1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I think we just need to add backport labels to 8.17, 8.18, 9.0, and 9.1 😵‍💫

Comment thread connectors/sources/servicenow.py
@lorenabalan
lorenabalan merged commit 2ef39ca into main Jul 30, 2025
2 checks passed
@lorenabalan
lorenabalan deleted the lb/fix/service-now-pagination branch July 30, 2025 13:53
github-actions Bot pushed a commit that referenced this pull request Jul 30, 2025
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
github-actions Bot pushed a commit that referenced this pull request Jul 30, 2025
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
github-actions Bot pushed a commit that referenced this pull request Jul 30, 2025
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
github-actions Bot pushed a commit that referenced this pull request Jul 30, 2025
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

💚 Backport PR(s) successfully created

Status Branch Result
9.0 #3571
8.18 #3572
8.17 #3573
9.1 #3574

The backport PRs will be merged automatically after passing CI.

lorenabalan added a commit that referenced this pull request Jul 30, 2025
#3559) (#3571)

Co-authored-by: Lorena Bălan <lorena.balan@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
lorenabalan added a commit that referenced this pull request Jul 30, 2025
…es (#3559) (#3572)

Co-authored-by: Lorena Bălan <lorena.balan@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
lorenabalan added a commit that referenced this pull request Jul 30, 2025
…es (#3559) (#3573)

Co-authored-by: Lorena Bălan <lorena.balan@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
lorenabalan added a commit that referenced this pull request Jul 30, 2025
#3559) (#3574)

Co-authored-by: Lorena Bălan <lorena.balan@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
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.

ServiceNow Connector: Doesn't paginate through all results with an Advanced Sync Rule

4 participants