-
-
Notifications
You must be signed in to change notification settings - Fork 221
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
Bulk Upload Org Structure and Mobile Workers via API #34634
Bulk Upload Org Structure and Mobile Workers via API #34634
Conversation
Hi @snopoke , just a friendly ping about this PR. More than happy to make any further changes or add any kind of test coverage you feel is required. |
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.
LGTM. I'm going to see if I can one more set of eyes on the PR before approval.
Hi @szymonbalasz , thank you for making this PR! Our product team is going to discuss this and will keep you updated. |
Hi @szymonbalasz, I noticed that many of your commit messages are simply labeled as “wip”, to make the review process easier and more efficient, and to keep our git history clean, could you please update your commit messages to be more descriptive? Also, we plan to trigger QA for your feature. A QA plan helps us ensure that all aspects of the changes have been tested and validated. Can you include some test cases ( including edge cases ) and the expected outcomes of those scenarios under QA plan section, so our QA team knows how to test it. Let me know if you need any assistance! |
Hi @jingcheng16 As requested, I have added some steps to test the changes that this PR has introduced. Please let me know if this is sufficient. Regarding updating the commit messages, I wanted to let you know that rebasing is not a viable option in this case. Since master has already been merged into the branch, attempting to rebase would result in duplicate commits as I resolve conflicts. |
@szymonbalasz Thank you for the QA plan, I'll submit a QA ticket for you! For the commit history, it's ok this time. If you contribute in the future, please try to have a cleaner commit history before opening a PR. If helpful, you can refer to our docs on clean git histories. Thanks again! |
@szymonbalasz Hi, I put your branch on staging and our delivery team run into issues when access
|
@jingcheng16 Update pushed and additional test coverage added. Thank you for notifying me and apologies for the inconvenience. I have run another set of manual tests myself and asked a team member to help as well. Should be good now. 🙈 |
@szymonbalasz Thank you. I'll let the team know and add your branch back. |
@jingcheng16 Hi! Just a friendly bump on this issue. Any notes from the testing team? |
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.
@szymonbalasz we're going through the QA feedback and will update back here soon. Apologies for the delay.
@szymonbalasz please make this one update (#34634 (comment)) and also merge in the latest code from |
This was added in dimagi/commcare-hq#34634
These were added in dimagi/commcare-hq#34634
These were added in dimagi/commcare-hq#34634
These were added in dimagi/commcare-hq#34634
Product Description
This change introduces new API endpoints for bulk location and mobile worker (user) uploads, which were previously only available via the Bulk Upload feature in the front end.
Technical Summary
The following changes were made:
Feature Flag
N/A
Safety Assurance
Safety story
The changes introduced in this PR were extensively tested manually via the API and frontend to ensure that the refactoring did not introduce any regressions. The new tests cover the endpoints themselves, including authentication, exceptions, and various scenarios. However, the tests do not cover the underlying import process.
The code changes are isolated to the new endpoints and the refactored BaseUploadUser class. The existing functionality remains unchanged.
Automated test coverage
Two new test classes, BulkLocationUploadAPITest and BulkUserUploadAPITest, have been added to cover the new endpoints.
The tests cover scenarios such as:
QA Plan
QA Ticket: https://dimagi.atlassian.net/browse/QA-6726
This plan covers testing the new bulk location and user upload API endpoints, as well as ensuring no regressions in the existing frontend functionality.
Locations:
A testing environment with an org structure seeded with sufficient location data (a few hundred entities) is recommended.
Users:
Populate and seed some mobile worker/user data in a project and download the bulk file.
Please note that the code responsible for updating locations and users wasn't affected by this PR. If the process is initialized by either endpoint, previous business rules and logic will continue to apply.
Migrations
N/A
Rollback instructions
Labels & Review
Additional Notes
@lock_locations
decoratorComments and feedback are welcome!