Menu

#943 Team project TM is overwritten with old content

4.3
closed-fixed
None
3
2019-07-10
2019-04-29
keenblade
No

I have a problem with team project. Newer translations are beeing overridden by older ones often. It may related to a case when a member use two different pc for translations. Also, is there a way to open merge window manually to bring the lost traslations back? I use personal gitlab. I've assigned every member as developer within gitlab and developers are allowed to push to master branch. I searched posts, docs but could not find a solution. Any idea?

Discussion

  • Aaron Madlon-Kay

    No action can be taken on this without steps to reproduce. Ideally it would be helpful to have access to your repo as well.

    Also, is there a way to open merge window manually to bring the lost traslations back?

    No.

     
  • Kos Ivantsov

    Kos Ivantsov - 2019-05-14

    Something similar just happed in https://github.com/OmegaT-L10N/fr.git
    I went to change omegat.project, and then redownloaded the project afresh in OmegaT. When the project loaded, it loaded with all empty translations, and this is the commit: https://github.com/OmegaT-L10N/fr/commit/e9d105aa705f06e96822cd3481cb99d40b95075d
    With GitHub there's an easy remedy: download project_save.tmx from previous commit, place it into /tm/enforce and save.

     
  • Kos Ivantsov

    Kos Ivantsov - 2019-05-14

    Attached is the log excerpt

     
  • Alex Buloichik

    Alex Buloichik - 2019-05-22

    project_save.tmx is just a text file for git. You can use any tools for merge/revert/etc. as for usual files processing for git.

     
  • Aaron Madlon-Kay

    To any users still experiencing this issue: Alex has agreed to investigate again, but will need access to your repository, logs, and any other pertinent information. If you can't make this information public, please contact info [at] omegat.org.

     
  • Aaron Madlon-Kay

    I managed to reproduce the issue reported by Kos. You can reproduce easily by running OmegaT from the branch topic/aaron/bug943test and loading the remote project https://github.com/amake/fr.git.

    1. During the first project load one of the repo mappings timed out (apparently GitHub's svn interface can be slow to respond), throwing a NetworkException here.
    2. The exception prevents all subsequent repos from being loaded, and prevents core project files (including project_save.tmx) from being copied to the local project. It also puts the project into offline mode. Since the remote project_save.tmx failed to copy over, the project is loaded with an empty TM.
    3. Even in offline mode, at save time it will attempt to do team sync (because the connection may have been restored). At this point the empty TM is saved and pushed to the repo.

    There are a bunch of problems with the code:

    1. When loading all repos (remoteRepositoryProvider.switchAllToLatest()), a single exception thrown by any repo will prevent all other repos from loading. We should continue attempting to load other repos when a single one errors out for a repo-specific reason (timeout, bad URL, etc.).
    2. I don't think we (can?) distinguish between repo-specific errors (timeout, bad URL) as opposed to errors that would affect all repos (no network connection). That makes all of our offline-handling logic suspect.
    3. We shouldn't let an exception thrown by remoteRepositoryProvider.switchAllToLatest() prevent doing remoteRepositoryProvider.copyFilesFromRepoToProject(...).
     

    Last edit: Aaron Madlon-Kay 2019-06-27
    • Aaron Madlon-Kay

      I have made the following changes:

      1. An exception thrown during repo update will not prevent files from being copied to the project ([418a52])
      2. An exception thrown when updating a single repo will not prevent other repos from being updated, unless it's a NetworkException which presumably indicates that we have no network connection ([43aeec])

      This addresses my problems #1 and #3 above. I don't have a solution for #2, as especially JGit exceptions don't seem to be very fine-grained.

      The result of these changes in the scenario reported by Kos (a single repo times out on first project load) is that the project will fail to open because one of the expected repos is not present on disk. I think this is reasonable: We cannot claim to successfully load a new team project if we could not successfully download all of the mapped repos.

      In the case of a timeout when opening an existing repo (one where all mapped repos are at least present on disk, though not necessarily up to date), the project can be opened successfully, though it will be in offline mode.

       

      Related

      Commit: [418a52]
      Commit: [43aeec]


      Last edit: Aaron Madlon-Kay 2019-06-27
  • Aaron Madlon-Kay

    • summary: Newer translations are beeing overridden --> Team project TM is overwritten with old content
    • assigned_to: Aaron Madlon-Kay
    • Group: 4.2 --> 4.3
     
  • Aaron Madlon-Kay

    • status: open --> open-fixed
     
  • Aaron Madlon-Kay

    I'm calling this fixed ([418a52]). We can revisit if new information comes to light.

     

    Related

    Commit: [418a52]

  • Aaron Madlon-Kay

    • status: open-fixed --> closed-fixed
     
  • Aaron Madlon-Kay

    Released in 4.3.0.

     

Log in to post a comment.