Skip to content
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

Import issue from v13.2.0 #635

Closed
AdTarling opened this issue Apr 30, 2024 · 7 comments
Closed

Import issue from v13.2.0 #635

AdTarling opened this issue Apr 30, 2024 · 7 comments

Comments

@AdTarling
Copy link

I've recently upgraded to usync version 13.2.1, and am getting duplicate key error messages, even though the health check is fine and the files found are unique.
I've traced this down to line 509 in SyncFileService.cs which was updated from version 13.2.0.
image

When I import using 13.2.0 and 13.2.1 I see the duplicate error message.
If I regress to 13.1.3, I obviously don't see the duplicate error message as it doesn't exist, but the import is also a success.

As such, I wonder if something in that check in 13.2.0 is incorrect as the 13.1.3 import is fine without it.

@KevinJump
Copy link
Owner

Hi,

Yeah, i think we missed a bit of logic here.

When you rename things there will be duplicates for the key (because usync creates an 'empty' file for the rename.).

the check is trying to stop that, but it only works if the rename is found second in the folder (e.g it wasn't the first item added to the list).

fix incoming,

@KevinJump
Copy link
Owner

Fix avalible in 'nighly' build

https://dev.azure.com/jumoo/Public/_artifacts/feed/nightly/NuGet/uSync/overview/13.2.2-build.20243001.1

if you add/alter a nuget.config

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="nightly" value="https://pkgs.dev.azure.com/jumoo/Public/_packaging/nightly/nuget/v3/index.json" />
  </packageSources>
</configuration>

you can add it to test :

dotnet add package uSync --version 13.2.2-build.20243001.1

there is nothing else in this release, we will likely release this publicly in the next day or so.

@KevinJump
Copy link
Owner

Hi,

We have tested this, its only a small (but relatively important) fix, so we've have published v13.2.2 onto NuGet, you don't need the nightly build now.

https://www.nuget.org/packages/uSync/13.2.2

@AdTarling
Copy link
Author

Great, thanks

KevinJump added a commit that referenced this issue May 13, 2024
@mlasasa
Copy link

mlasasa commented May 22, 2024

Hi @KevinJump I wonder if this fix will work for deleted files as well? I upgraded to v13.2.2 to fix the rename issue - and I'm getting the same issue with the deleted file.

Error: Duplicate: Item key 3120c422-4f91-4d0d-bceb-a831c16e8866 already exists for \locationsagesubheader.config - run uSync Health check for more info.

I actually have 2 deleted files with the same ID (no regular file with the ID):

<?xml version="1.0" encoding="utf-8"?> <Empty Key="3120c422-4f91-4d0d-bceb-a831c16e8866" Alias="locationAndEventBaseSubheader" Change="Delete" />

<?xml version="1.0" encoding="utf-8"?> <Empty Key="3120c422-4f91-4d0d-bceb-a831c16e8866" Alias="locationSageSubHeader" Change="Delete" />

Deleting one of these fixed the issue.

@KevinJump
Copy link
Owner

Hi,

Yeah little odd because that should be fine, (and i've just checked it locally and it was OK).

Maybe something else was hanging around ?

but if you can reproduce zip up the uSync file and send it over, and we will then see what we can do. ([email protected])

@KevinJump
Copy link
Owner

ahhh, i now see how this can happen, we will fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants