ENH: No automatic name for mass-imported File entities
5 unresolved threads
5 unresolved threads
Summary
See https://gitlab.com/caosdb/caosdb-server/-/issues/197, there should be no automatic entity name for automatically generated File entities.
Focus
- Was the approach correct?
- Is the result correct?
Test Environment
See the pyinttest code changes: caosdb-pyinttest!57 (merged)
Check List for the Author
Please, prepare your MR for a review. Be sure to write a summary and a focus and create gitlab comments for the reviewer. They should guide the reviewer through the changes, explain your changes and also point out open questions. For further good practices have a look at our review guidelines
-
All automated tests pass -
Reference related issues caosdb/customers/umg/management#68 -
Up-to-date CHANGELOG.md (or not necessary) -
Up-to-date JSON schema (or not necessary) -
Appropriate user and developer documentation (or not necessary) - How do I use the software? Assume "stupid" users.
- How do I develop or debug the software? Assume novice developers.
-
Annotations in code (Gitlab comments) - Intent of new code
- Problems with old code
- Why this implementation?
Check List for the Reviewer
-
I understand the intent of this MR -
All automated tests pass -
Up-to-date CHANGELOG.md (or not necessary) -
Appropriate user and developer documentation (or not necessary) -
The test environment setup works and the intended behavior is reproducible in the test environment -
In-code documentation and comments are up-to-date. -
Check: Are there specifications? Are they satisfied?
For further good practices have a look at our review guidelines.
Edited by Timm Fitschen
Merge request reports
Activity
assigned to @daniel
60 60 loadOnDefault = false, 61 61 stage = TransactionStage.INIT, 62 62 description = 63 "For expert users only! Risk of creating spam records!\nValue of this flag might be any directory on the servers local file system which is part of the server's back-end file storage. This job will insert every readable, nonhidden file in said directory into the database and link the file with a symlink. This is useful to add a huge amount of files without actully copying them to the back-end file storage. If you call this job on a directory more than once every file that was recently added to the source directory is inserted. Every yet known file is left untouched. \nOptional parameter -e EXCLUDE: A regular expression of files which are to be ignored. \n Optional parameter -i INCLUDE: a regular expression of files which are to be included. By default, all files are included. The -e takes precedence. \nOptional parameter -p PREFIX: Stores all new files into the directory PREFIX in the server's file system.\nOptional parameter --force-allow-symlinks: Simlinks in your data are a source of problems for the database. Therefore, simlinks are ignored by default. This option allows symlinks (but still generates simlink warnings). \nPrepend/Dry run: Call this flag with a retrieve transaction (HTTP GET) and it will only count all files and list them without actually inserting them.") 63 "For expert users only! Risk of creating spam records!\nValue of this flag may be any directory on the servers local file system which is part of the server's back-end file storage. This job will insert every readable, nonhidden file in said directory into the database and link the file with a symlink. This is useful to add a huge amount of files without actually copying them to the back-end file storage. If you call this job on a directory more than once every file that was recently added to the source directory is inserted. Every already known file is left untouched. \nOptional parameter -e EXCLUDE: A regular expression of files which are to be ignored. \n Optional parameter -i INCLUDE: a regular expression of files which are to be included. By default, all files are included. The -e takes precedence. \nOptional parameter -p PREFIX: Stores all new files into the directory PREFIX in the server's file system.\nOptional parameter --force-allow-symlinks: Symlinks in your data are a source of problems for the database. Therefore, simlinks are ignored by default. This option allows symlinks (but still generates simlink warnings). \nPrepend/Dry run: Call this flag with a retrieve transaction (HTTP GET) and it will only count all files and list them without actually inserting them.") 266 271 * Create a new InsertEntity (if this is an actual run) or a new RetrieveEntity (in dry-run mode) 267 272 * with {@link Role.File}. 268 273 * 269 * @param name the file name 270 274 * @return new File entity 271 275 */ 272 private EntityInterface createInsertFileEntity(String name) { 276 private EntityInterface createInsertFileEntity() { 273 277 if (getTransaction() instanceof WriteTransactionInterface) { 274 return new InsertEntity(name, Role.File); 278 return new InsertEntity((String) null, Role.File); 275 279 } 276 EntityInterface result = new RetrieveEntity(name); 280 EntityInterface result = new RetrieveEntity((String) null); requested review from @timm
mentioned in commit a2650724
Please register or sign in to reply