ODM-13099: unable to create users from a file fix#631
Closed
egor-alexandrov wants to merge 1 commit into
Closed
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes the create_users script which was broken on multiple fronts: the get_connection() call was missing the parsed args, the per-row password handling crashed when the TSV omitted the optional password column, and the TsvReader iterator was structured in a way that prevented iteration from working correctly. Also fixes a minor docstring rendering issue in files_util.py.
Changes:
- In
create_users.py, pass parsedargstoget_connection(args)and tolerate rows without a password column. - In
utils.py, properly define__iter__/__next__(with anextalias for Python 2 compatibility) onTsvReader. - In
files_util.py, replace the escaped\*nameswith*namesin the docstring.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| odm_sdk/scripts/users/create_users.py | Pass args to get_connection and handle rows missing the password field. |
| odm_sdk/scripts/utils.py | Restructure TsvReader to correctly implement the iterator protocol on both Py2/Py3. |
| odm_sdk/files_util.py | Minor docstring fix for *names parameter. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://genestack.atlassian.net/browse/ODM-13099