Skip to content

Fixed double publish bug after file syncing#7554

Merged
dralley merged 1 commit intopulp:mainfrom
gerrod3:double-publish
Apr 15, 2026
Merged

Fixed double publish bug after file syncing#7554
dralley merged 1 commit intopulp:mainfrom
gerrod3:double-publish

Conversation

@gerrod3
Copy link
Copy Markdown
Contributor

@gerrod3 gerrod3 commented Apr 3, 2026

Repository.on_new_version does a publish if autopublish=True, don't think we need to do a publish when mirror=True after syncs.

📜 Checklist

  • Commits are cleanly separated with meaningful messages (simple features and bug fixes should be squashed to one commit)
  • A changelog entry or entries has been added for any significant changes
  • Follows the Pulp policy on AI Usage
  • (For new features) - User documentation and test coverage has been added

See: Pull Request Walkthrough

@dralley dralley marked this pull request as draft April 6, 2026 13:12
@dralley
Copy link
Copy Markdown
Contributor

dralley commented Apr 6, 2026

This looks like just removing the mirroring functionality outright? Not sure that we want to do that.

The RPM plugin just disallows setting both options at once. https://github.com/pulp/pulp_rpm/blob/main/pulp_rpm/app/viewsets/repository.py#L257-L262

@github-actions github-actions bot removed the no-issue label Apr 14, 2026
@gerrod3 gerrod3 force-pushed the double-publish branch 2 times, most recently from 67a2a2e to 9634005 Compare April 14, 2026 18:08
@gerrod3 gerrod3 marked this pull request as ready for review April 14, 2026 18:46
Comment thread pulp_file/app/replica.py
@dralley
Copy link
Copy Markdown
Contributor

dralley commented Apr 14, 2026

@gerrod3 Do you think tests would be warranted for:

  • the mirror + autopublish combination fails
  • the replication operation creates exactly one publication

@dralley dralley enabled auto-merge (rebase) April 14, 2026 20:18
@dralley dralley merged commit 9ba1432 into pulp:main Apr 15, 2026
57 of 66 checks passed
@gerrod3 gerrod3 deleted the double-publish branch April 16, 2026 13:45
@patchback
Copy link
Copy Markdown

patchback bot commented Apr 16, 2026

Backport to 3.105: 💔 cherry-picking failed — conflicts found

❌ Failed to cleanly apply 9ba1432 on top of patchback/backports/3.105/9ba1432dc8ac13fa9c2b526b9bde10aa252406aa/pr-7554

Backporting merged PR #7554 into main

  1. Ensure you have a local repo clone of your fork. Unless you cloned it
    from the upstream, this would be your origin remote.
  2. Make sure you have an upstream repo added as a remote too. In these
    instructions you'll refer to it by the name upstream. If you don't
    have it, here's how you can add it:
    $ git remote add upstream https://github.com/pulp/pulpcore.git
  3. Ensure you have the latest copy of upstream and prepare a branch
    that will hold the backported code:
    $ git fetch upstream
    $ git checkout -b patchback/backports/3.105/9ba1432dc8ac13fa9c2b526b9bde10aa252406aa/pr-7554 upstream/3.105
  4. Now, cherry-pick PR Fixed double publish bug after file syncing #7554 contents into that branch:
    $ git cherry-pick -x 9ba1432dc8ac13fa9c2b526b9bde10aa252406aa
    If it'll yell at you with something like fatal: Commit 9ba1432dc8ac13fa9c2b526b9bde10aa252406aa is a merge but no -m option was given., add -m 1 as follows instead:
    $ git cherry-pick -m1 -x 9ba1432dc8ac13fa9c2b526b9bde10aa252406aa
  5. At this point, you'll probably encounter some merge conflicts. You must
    resolve them in to preserve the patch from PR Fixed double publish bug after file syncing #7554 as close to the
    original as possible.
  6. Push this branch to your fork on GitHub:
    $ git push origin patchback/backports/3.105/9ba1432dc8ac13fa9c2b526b9bde10aa252406aa/pr-7554
  7. Create a PR, ensure that the CI is green. If it's not — update it so that
    the tests and any other checks pass. This is it!
    Now relax and wait for the maintainers to process your pull request
    when they have some cycles to do reviews. Don't worry — they'll tell you if
    any improvements are necessary when the time comes!

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants