Skip to content

[O365] - Prune stale listing URLs from cursor to recover from long outages#18510

Open
ShourieG wants to merge 3 commits intoelastic:mainfrom
ShourieG:bugfix/o365_#7097
Open

[O365] - Prune stale listing URLs from cursor to recover from long outages#18510
ShourieG wants to merge 3 commits intoelastic:mainfrom
ShourieG:bugfix/o365_#7097

Conversation

@ShourieG
Copy link
Copy Markdown
Contributor

Type of change

  • Bug

Proposed commit message

packages/o365: prune stale listing URLs from cursor to recover from long outages

A listing URL queued in cursor.todo_links before a prolonged outage
can age past the Management API's 7-day startTime window while parked
there, producing a permanent AF20055 retry loop: the listing-error
branch cannot evict it because its map-shaped error return is treated
by the CEL runtime as a freeze signal that discards cursor mutations.

Add a pre-flight filter that drops listing URLs whose embedded
startTime is older than now - maximum_age, tolerating both startTime
and starttime spellings (NextPageUri responses have been observed
with the lowercase form). Includes a system test that queues a
NextPageUri with a 2019 startTime against a 1h maximum_age and
asserts it is not followed.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.
  • I have verified that any added dashboard complies with Kibana's Dashboard good practices

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Screenshots

…'s accepted window so that prolonged periods without successful fetches (e.g. auth failures during a credential rotation, or agent downtime longer than seven days) self-heal on resume instead of looping on AF20055.
@ShourieG ShourieG self-assigned this Apr 18, 2026
@ShourieG ShourieG requested a review from a team as a code owner April 18, 2026 06:39
@ShourieG ShourieG added Integration:o365 Microsoft Office 365 bugfix Pull request that fixes a bug issue Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] Team:Security-Cloud Services Security Data Experience - Cloud Services team [elastic/cloud-services] labels Apr 18, 2026
@elasticmachine
Copy link
Copy Markdown

Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)

@ShourieG ShourieG requested review from chrisberkhout, efd6 and kcreddy and removed request for kcreddy April 18, 2026 06:43
@elasticmachine
Copy link
Copy Markdown

elasticmachine commented Apr 18, 2026

💔 Build Failed

Failed CI Steps

History

cc @ShourieG

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Pull request that fixes a bug issue Integration:o365 Microsoft Office 365 Team:Security-Cloud Services Security Data Experience - Cloud Services team [elastic/cloud-services] Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants