-
Notifications
You must be signed in to change notification settings - Fork 64
FAI-18460: Use updated_on for TestRail runs incremental sync #2300
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
FAI-18460: Use updated_on for TestRail runs incremental sync #2300
Conversation
Co-Authored-By: [email protected] <[email protected]>
…remental sync This change updates the TestRail connector to use the updated_on field instead of created_on as the cursor for incremental synchronization of test runs. This allows the connector to detect when existing test runs are modified (e.g., when test results are added) and re-sync them to Faros. Changes: - Added updated_on field to TestRailsRun interface - Updated RunState to use updated_after instead of created_after - Changed cursor field from created_on to updated_on in Runs stream - Updated API client to use updated_after/updated_before query parameters - Added updated_on to run.json schema This follows the same pattern already implemented in the Cases stream. Co-Authored-By: [email protected] <[email protected]>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the TestRail connector to use updated_on instead of created_on for incremental synchronization of test runs, enabling the connector to detect and re-sync modified runs (e.g., when test results are added), not just newly created ones.
Key changes:
- Changed cursor field from
created_ontoupdated_onfor the Runs stream - Updated API client to use
updated_after/updated_beforequery parameters instead ofcreated_after/created_before - Modified state schema from
created_aftertoupdated_after
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| sources/testrails-source/src/testrails/testrails-models.ts | Added updated_on field to TestRailsRun interface |
| sources/testrails-source/src/testrails/testrails-client.ts | Updated API query parameters to use updated_after/updated_before |
| sources/testrails-source/src/streams/run.ts | Changed state schema and cursor field to use updated_on |
| sources/testrails-source/resources/schemas/run.json | Added updated_on field to JSON schema |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Closing due to inactivity for more than 7 days. Configure here. |



Description
This PR updates the TestRail connector to use
updated_oninstead ofcreated_onas the cursor field for incremental synchronization of test runs. This allows the connector to detect when existing test runs are modified (e.g., when test results are added) and re-sync them to Faros, not just newly created runs.The implementation follows the same pattern already used by the Cases stream, which successfully uses
updated_on/updated_afterfor incremental sync.Key changes:
updated_onfield toTestRailsRuninterfaceRunStatefromcreated_aftertoupdated_aftercreated_ontoupdated_onin Runs streamupdated_after/updated_beforequery parametersupdated_onto run.json schemaType of change
created_aftertoupdated_after)Related issues
Fixes FAI-18460
Migration notes
created_after, but the code now expectsupdated_after.On the first sync after upgrading:
0forupdated_after(due to?? 0in the code)Extra info
Review checklist:
updated_after/updated_beforeparameters on/get_runsendpoint.envrcchange in.gitignoreshould be removed or committed separatelyLink to Devin run: https://app.devin.ai/sessions/1804a07814f849e3b24272db387ccc24
Requested by: [email protected] (@thierryfaros)