Skip to content

fix: updated the team upload functionality while rerunning the post deployment script to fix duplicate team issue - #1140

Merged
Roopan-Microsoft merged 1 commit into
devfrom
psl-duplicateTeamIssue
Aug 13, 2026
Merged

fix: updated the team upload functionality while rerunning the post deployment script to fix duplicate team issue#1140
Roopan-Microsoft merged 1 commit into
devfrom
psl-duplicateTeamIssue

Conversation

@Dhruvkumar-Microsoft

Copy link
Copy Markdown
Contributor

Purpose

This pull request makes improvements to the team configuration upload and storage process, focusing on making uploads idempotent, cleaning up the upload logic, and standardizing API field names. The main changes are grouped below:

Idempotent team configuration storage:

  • The save_team_configuration method in team_service.py now ensures that saving a team config is idempotent by team ID. If a team with the same ID already exists, it updates the existing record instead of creating a duplicate, preserving immutable fields like the document ID and partition key. This prevents duplicate teams when re-running the seed script.

Upload logic simplification:

  • The logic in upload_team_config.py for deleting and re-uploading existing teams was removed, as the backend now handles idempotency. This simplifies the upload process and reduces unnecessary delete operations.

API field name standardization:

  • In router.py, all API responses and event tracking related to team config uploads now use the field name file_name instead of filename, ensuring consistency across the API. [1] [2] [3] [4]

Does this introduce a breaking change?

  • Yes
  • No

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

@github-actions

Copy link
Copy Markdown

Coverage

Coverage Report •
FileStmtsMissCoverMissing
api
   router.py5386887%63–64, 83–84, 93–94, 98, 113, 116, 124–125, 133–134, 363–365, 375, 407–408, 426, 431–432, 434–436, 439, 451–452, 460, 535–536, 624, 626, 629, 749–754, 758, 781, 812–815, 835, 907–908, 917, 980–981, 987, 1091–1092, 1117–1119, 1497–1506
services
   team_service.py2861794%73, 180, 183–188, 193–194, 198, 314–316, 499–501
TOTAL383256285% 

Tests Skipped Failures Errors Time
834 0 💤 1 ❌ 0 🔥 10.629s ⏱️

@Roopan-Microsoft
Roopan-Microsoft merged commit 165a839 into dev Aug 13, 2026
6 of 7 checks passed
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.

2 participants