Skip to content

sync prerelease: recreate the pre-release tree on every populate - #204

Merged
rjd15372 merged 1 commit into
mainfrom
prerelease-recreate
Oct 30, 2026
Merged

rjd15372 merged 1 commit into
mainfrom
prerelease-recreate

Conversation

@rjd15372

Copy link
Copy Markdown
Collaborator

Problem

When a release PR is updated, obs-release-pr.yml repopulates the pre-release project with sync prerelease. That copied over the previous populate, so packages, subprojects or project meta the new cut no longer has stayed behind in the pre-release tree.

Change

  • sync prerelease now deletes the existing pre-release tree (<PR root>:<project> and every subproject under it, deepest first, recursive) before applying the mirror meta, so every populate starts from scratch. Not done on --dry-run, and only after the record / mirror checks pass.
  • Safety guard: refuses to run when the profile rootprj equals the --branch-from root, so the delete can never reach a production :releases: project.
  • A failed repopulate now leaves the pre-release absent instead of stale; hop 2 is unaffected (it already requires the source_commit marker, written only after a complete copy).
  • Docs: docs/PERCONA_OBS_TOOL.md and .github/copilot-instructions.md.

Tests

  • existing tree deleted deepest first, before the meta apply
  • nothing deleted when the record check fails
  • same-root guard
  • pytest tests 752 passed; black + pyright clean

A repopulate after a PR update copied over the previous populate, so
packages, subprojects or meta the new cut no longer has stayed behind.
Delete the existing pre-release project and its subprojects (deepest
first) before applying the mirror meta, and refuse to run when the
profile root equals the --branch-from root so the delete can never
reach a production :releases: project.

Signed-off-by: Ricardo Dias <ricardo.dias@percona.com>
@rjd15372
rjd15372 merged commit 67b8b66 into main Oct 30, 2026
5 checks passed
@rjd15372
rjd15372 deleted the prerelease-recreate branch October 30, 2026 22:10
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

Successfully merging this pull request may close these issues.

1 participant