Skip to content

[ENG-3815] feat(microsoft): BatchRecordReader#2874

Open
Cobalt0s wants to merge 1 commit into
cobalt0s/microsoft-batchfrom
cobalt0s/microsoft-read-several
Open

[ENG-3815] feat(microsoft): BatchRecordReader#2874
Cobalt0s wants to merge 1 commit into
cobalt0s/microsoft-batchfrom
cobalt0s/microsoft-read-several

Conversation

@Cobalt0s
Copy link
Copy Markdown
Contributor

@Cobalt0s Cobalt0s commented Apr 14, 2026

Description

Adds testroutines.ReadByIds, enabling reusable unit tests for any BatchRecordReaderConnector implementation.

Also introduces a Microsoft implementation of GetRecordsByIds, built on top of the batch strategy for the Microsoft Graph Batch API.

Testing

  • Live test creates 3 Outlook messages
  • Reads them in batch by ID
  • Cleans up the created records afterward

Live Tests

Script output is copied. Some object fields are truncated.

[SETUP] Creating a record for object 'me/messages'
Reading me/messages
Finding recently created me/messages
Object me/messages(AAMkAGY0YzAwY2ViLWQyODktNDI3NS1iNmY4LTE5YzU0MjI5ZTA4OQBGAAAAAABeMJSlO8qLToz2i2IQ1wsqBwB8hj1Rtd60SKTngNs3if9RAACsvo1TAAB8hj1Rtd60SKTngNs3if9RAAEuy3j8AAA=) is ready
[SETUP] Creating a record for object 'me/messages'
Reading me/messages
Finding recently created me/messages
Object me/messages(AAMkAGY0YzAwY2ViLWQyODktNDI3NS1iNmY4LTE5YzU0MjI5ZTA4OQBGAAAAAABeMJSlO8qLToz2i2IQ1wsqBwB8hj1Rtd60SKTngNs3if9RAACsvo1TAAB8hj1Rtd60SKTngNs3if9RAAEuy3j9AAA=) is ready
[SETUP] Creating a record for object 'me/messages'
Reading me/messages
Finding recently created me/messages
Object me/messages(AAMkAGY0YzAwY2ViLWQyODktNDI3NS1iNmY4LTE5YzU0MjI5ZTA4OQBGAAAAAABeMJSlO8qLToz2i2IQ1wsqBwB8hj1Rtd60SKTngNs3if9RAACsvo1TAAB8hj1Rtd60SKTngNs3if9RAAEuy3j_AAA=) is ready
========================
[
  {
    "Associations": {},
    "Fields": {
      "body": {
        "content": "Zoe Stamm",
        "contentType": "text"
      },
      "from": {
        "emailAddress": {
          "address": "Reilly5008@test.com",
          "name": "Reilly5008"
        }
      },
      "subject": "Nelson Dickens [1]",
      "torecipients": [
        {
          "emailAddress": {
            "address": "Rutherford6844@test.com",
            "name": "Rutherford6844"
          }
        }
      ]
    },
    "Id": "AAMkAGY0YzAwY2ViLWQyODktNDI3NS1iNmY4LTE5YzU0MjI5ZTA4OQBGAAAAAABeMJSlO8qLToz2i2IQ1wsqBwB8hj1Rtd60SKTngNs3if9RAACsvo1TAAB8hj1Rtd60SKTngNs3if9RAAEuy3j8AAA=",
    "Raw": {
      "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('ae87552f-48fc-4dec-9322-65040bf9fdfd')/messages/$entity",
      "@odata.etag": "W/\"CQAAABYAAAB8hj1Rtd60SKTngNs3if9RAAEuxchC\"",
      "bccRecipients": [],
      "body": {
        "content": "Zoe Stamm",
        "contentType": "text"
      },
      "bodyPreview": "Zoe Stamm"
    }
  },
  {
    "Associations": {},
    "Fields": {
      "body": {
        "content": "Meta Hilpert",
        "contentType": "text"
      },
      "from": {
        "emailAddress": {
          "address": "Jacobs9280@test.com",
          "name": "Jacobs9280"
        }
      },
      "subject": "Branson Lakin [2]",
      "torecipients": [
        {
          "emailAddress": {
            "address": "Luettgen3944@test.com",
            "name": "Luettgen3944"
          }
        }
      ]
    },
    "Id": "AAMkAGY0YzAwY2ViLWQyODktNDI3NS1iNmY4LTE5YzU0MjI5ZTA4OQBGAAAAAABeMJSlO8qLToz2i2IQ1wsqBwB8hj1Rtd60SKTngNs3if9RAACsvo1TAAB8hj1Rtd60SKTngNs3if9RAAEuy3j9AAA=",
    "Raw": {
      "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('ae87552f-48fc-4dec-9322-65040bf9fdfd')/messages/$entity",
      "@odata.etag": "W/\"CQAAABYAAAB8hj1Rtd60SKTngNs3if9RAAEuxchE\"",
      "bccRecipients": [],
      "body": {
        "content": "Meta Hilpert",
        "contentType": "text"
      },
      "bodyPreview": "Meta Hilpert"
    }
  },
  {
    "Associations": {},
    "Fields": {
      "body": {
        "content": "Claudia Powlowski",
        "contentType": "text"
      },
      "from": {
        "emailAddress": {
          "address": "Cartwright9168@test.com",
          "name": "Cartwright9168"
        }
      },
      "subject": "Jakayla Ruecker [3]",
      "torecipients": [
        {
          "emailAddress": {
            "address": "Reinger6985@test.com",
            "name": "Reinger6985"
          }
        }
      ]
    },
    "Id": "AAMkAGY0YzAwY2ViLWQyODktNDI3NS1iNmY4LTE5YzU0MjI5ZTA4OQBGAAAAAABeMJSlO8qLToz2i2IQ1wsqBwB8hj1Rtd60SKTngNs3if9RAACsvo1TAAB8hj1Rtd60SKTngNs3if9RAAEuy3j_AAA=",
    "Raw": {
      "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('ae87552f-48fc-4dec-9322-65040bf9fdfd')/messages/$entity",
      "@odata.etag": "W/\"CQAAABYAAAB8hj1Rtd60SKTngNs3if9RAAEuxchG\"",
      "bccRecipients": [],
      "body": {
        "content": "Claudia Powlowski",
        "contentType": "text"
      },
      "bodyPreview": "Claudia Powlowski"
    }
  }
]
========================
[CLEANUP] Successful removal
	Object(me/messages)
	ID(AAMkAGY0YzAwY2ViLWQyODktNDI3NS1iNmY4LTE5YzU0MjI5ZTA4OQBGAAAAAABeMJSlO8qLToz2i2IQ1wsqBwB8hj1Rtd60SKTngNs3if9RAACsvo1TAAB8hj1Rtd60SKTngNs3if9RAAEuy3j_AAA=)
[CLEANUP] Successful removal
	Object(me/messages)
	ID(AAMkAGY0YzAwY2ViLWQyODktNDI3NS1iNmY4LTE5YzU0MjI5ZTA4OQBGAAAAAABeMJSlO8qLToz2i2IQ1wsqBwB8hj1Rtd60SKTngNs3if9RAACsvo1TAAB8hj1Rtd60SKTngNs3if9RAAEuy3j9AAA=)
[CLEANUP] Successful removal
	Object(me/messages)
	ID(AAMkAGY0YzAwY2ViLWQyODktNDI3NS1iNmY4LTE5YzU0MjI5ZTA4OQBGAAAAAABeMJSlO8qLToz2i2IQ1wsqBwB8hj1Rtd60SKTngNs3if9RAACsvo1TAAB8hj1Rtd60SKTngNs3if9RAAEuy3j8AAA=)

@linear
Copy link
Copy Markdown

linear Bot commented Apr 14, 2026

@Cobalt0s Cobalt0s self-assigned this Apr 14, 2026
@Cobalt0s Cobalt0s changed the base branch from main to graphite-base/2874 May 1, 2026 00:11
@Cobalt0s Cobalt0s force-pushed the cobalt0s/microsoft-read-several branch from 4937ac7 to f22b651 Compare May 1, 2026 00:11
@Cobalt0s Cobalt0s changed the base branch from graphite-base/2874 to cobalt0s/microsoft-batch May 1, 2026 00:11
@Cobalt0s Cobalt0s marked this pull request as ready for review May 1, 2026 14:44
@Cobalt0s Cobalt0s requested a review from jlimatampersand May 1, 2026 14:44
@Cobalt0s Cobalt0s force-pushed the cobalt0s/microsoft-read-several branch from f22b651 to 5bfbaea Compare May 1, 2026 15:33
@Cobalt0s Cobalt0s force-pushed the cobalt0s/microsoft-batch branch 2 times, most recently from 0d93fb2 to b1ad434 Compare May 1, 2026 17:33
@Cobalt0s Cobalt0s force-pushed the cobalt0s/microsoft-read-several branch from 5bfbaea to 7083e72 Compare May 1, 2026 17:33
@Cobalt0s Cobalt0s force-pushed the cobalt0s/microsoft-batch branch from b1ad434 to c1c665f Compare May 13, 2026 21:33
@Cobalt0s Cobalt0s force-pushed the cobalt0s/microsoft-read-several branch from 7083e72 to 613e46e Compare May 13, 2026 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant