Skip to content
Snippets Groups Projects

ENH: No automatic name for mass-imported File entities

Merged Daniel Hornung requested to merge f-no-automatic-file-naming into dev
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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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);
  • 4 4 git make mariadb-server maven openjdk-11-jdk-headless \
    5 5 plantuml \
    6 6 python3-pip screen libpam0g-dev unzip curl shunit2 \
    7 python3-sphinx \
    7 python3-sphinx
  • 11 11
    12 12 ### Changed ###
    13 13
    14 * The default behavior of the query FIND SomeName [...] (as well as COUNT and SELECT) is being made configurable and changes
  • 13 13 - family-names: tom Wörden
    14 14 given-names: Henrik
    15 15 orcid: https://orcid.org/0000-0002-5549-578X
    16 - family-names: Spreckelsen
  • Daniel Hornung requested review from @timm

    requested review from @timm

  • Daniel Hornung marked the checklist item All automated tests pass as completed

    marked the checklist item All automated tests pass as completed

  • Daniel Hornung marked the checklist item Annotations in code (Gitlab comments) as completed

    marked the checklist item Annotations in code (Gitlab comments) as completed

  • Timm Fitschen marked the checklist item I understand the intent of this MR as completed

    marked the checklist item I understand the intent of this MR as completed

  • Timm Fitschen marked the checklist item All automated tests pass as completed

    marked the checklist item All automated tests pass as completed

  • Timm Fitschen marked the checklist item Up-to-date CHANGELOG.md (or not necessary) as completed

    marked the checklist item Up-to-date CHANGELOG.md (or not necessary) as completed

  • Timm Fitschen marked the checklist item Appropriate user and developer documentation (or not necessary) as completed

    marked the checklist item Appropriate user and developer documentation (or not necessary) as completed

  • Timm Fitschen marked the checklist item The test environment setup works and the intended behavior is reproducible in the test as completed

    marked the checklist item The test environment setup works and the intended behavior is reproducible in the test as completed

  • Timm Fitschen marked the checklist item In-code documentation and comments are up-to-date. as completed

    marked the checklist item In-code documentation and comments are up-to-date. as completed

  • Timm Fitschen marked the checklist item Check: Are there specifications? Are they satisfied? as completed

    marked the checklist item Check: Are there specifications? Are they satisfied? as completed

  • Timm Fitschen approved this merge request

    approved this merge request

  • Timm Fitschen mentioned in commit a2650724

    mentioned in commit a2650724

  • merged

  • Please register or sign in to reply
    Loading