Issue #5809
closed
Sync with mirror=false is not additive
Description
I've synced a repo twice, each time with a different url. The second sync clears out the repo version and only contains the content from the latest remote repo. This seems to be a regression since it was additive before.
This is with file content.
- Triaged changed from No to Yes
- Sprint set to Sprint 62
- Status changed from NEW to ASSIGNED
- Assignee set to dalley
iballou, do all of the files in the 2 repositories have the same relative paths? I was able to reproduce this behavior in this circumstance, but not generally, at least not yet. Are these repositories public?
If the relative paths overlap -- two files can't be published to the same relative_path, so Pulp prefers the new one and drops the old one in this circumstance. Pulp is correct in not allowing overlapping relative paths, and I don't think it should fail outright instead of doing what it does, but a warning might be a good idea, instead of replacing them silently.
dalley wrote:
iballou, do all of the files in the 2 repositories have the same relative paths? I was able to reproduce this behavior in this circumstance, but not generally, at least not yet. Are these repositories public?
This is the case, yeah. The two repositories have files with exactly the same names. The repositories are file1 and file2 here (https://github.com/Katello/katello/tree/master/test/fixtures/test_repos). We sync them from the filesystem locally.
If the relative paths overlap -- two files can't be published to the same relative_path, so Pulp prefers the new one and drops the old one in this circumstance. Pulp is correct in not allowing overlapping relative paths, and I don't think it should fail outright instead of doing what it does, but a warning might be a good idea, instead of replacing them silently.
Having repo syncing be additive with the same file names worked before, we had an old test that started failing recently related to this. Do you think this working before was a Pulp 3 bug or was that a more recent design decision?
- Status changed from ASSIGNED to CLOSED - NOTABUG
Basically, Pulp used to have a bug, and we fixed it recently. There's no correct way to publish a repository version with multiple content units using the same relative_path, so any repository version that contains this is essentially invalid. Previously you could still make repository versions like this and it wouldn't stop you, but it would almost certainly cause problems later. Whereas now we validate repository versions for correctness before they are created, and in this case Pulp resolves any conflicts by preferring the incoming file over the older one.
Let me or @dkliban know if this presents any problems for Katello and we can try to find a solution for it.
- Tags Katello added
- Tags deleted (
Katello-P2)
Also available in: Atom
PDF