Click 8.5.0 leaves is_flag options without an explicit default as
an internal sentinel instead of False. pip-tools 7.6.1 compares
that sentinel against the option's value to decide whether to
record it in the regenerated file's header, and for a flag with no
negative counterpart (like --no-index) it falls back to always
emitting the flag name regardless of the actual value. Every fresh
install of pip-tools pulls in the latest click and hits this,
poisoning the lockfile header with a --no-index that was never
requested.
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
The lockfile was regenerated with whatever python3 happened to be on
the contributor's machine (3.12), drifting from the python3.13 venv
the sidecar image actually ships. Add a task that runs pip-compile
inside a debian:trixie-slim dagger container, the same base image
family the sidecar build uses, so regeneration always targets the
right Python version regardless of the local machine.
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Bump barman to 3.20.0 and regenerate the sidecar's pip lockfile with the
same Python 3.13 used by the sidecar's venv.
barman 3.20.0 dropped fake-gcs-server support
(EnterpriseDB/barman#1218), so the GCS backup/restore and
replica-cluster e2e specs are skipped at runtime until that's fixed
upstream.
Also bundles tar into the sidecar image: barman 3.20.0's restore path
now shells out to it, and the distroless base doesn't ship it.
Signed-off-by: Tao Li <tao.li@enterprisedb.com>
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Co-authored-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
The install snippet always linked to the manifest of the latest released
version, regardless of which versioned docs page it was rendered on.
Viewing the 0.13.0 installation page therefore pointed at the 0.14.0
manifest.
Build the manifest URL from the active doc version directly: each
versioned page links its own release tag, and the unreleased "current"
docs link the manifest built off `main` instead of a (nonexistent)
release tag.
---------
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Signed-off-by: Danish <danish.khan@enterprisedb.com>
Co-authored-by: Danish <danish.khan@enterprisedb.com>
wordlist-ordered is a dep of both spellcheck and uncommitted, which run
in parallel. go-task only writes the checksum after a task's cmds
finish, so both parents could start the task concurrently: the first mv
succeeded and removed .wordlist.txt.new before the second mv ran,
failing CI with "No such file or directory".
Mark the task run: once so concurrent deps are deduped.
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
CloudNativePG is moving the bootstrap of new instances from dedicated
Jobs into the instance pod itself (cloudnative-pg/cloudnative-pg#11319):
the restore that used to run in a recovery Job now happens in-process
inside the instance pod before PostgreSQL starts. The sidecar shipped in
that pod must therefore answer the same Restore RPC the operator sends
over the plugin sockets, so the instance mode now registers the
restore-job hooks and advertises the restore-job service capability.
A cluster that only bootstraps from an object store, without continued
archiving, previously received no sidecar at all in its instance pods;
under the new flow that leaves the bootstrap without a plugin socket,
both for the Restore RPC and for `wal-restore` during the recovery
replay. The injection condition is widened to match what the plugin
configuration already considers valid, so recovery-only clusters get the
sidecar too.
The sidecar is dropped once the instance's bootstrap completes
(cluster.Status.CurrentPrimary set), which triggers one deterministic
rollout to remove it, accepted rather than engineered around since it
uses the same switchover/restart machinery as any other pod-spec change.
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Co-authored-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Regenerates this repo's CODEOWNERS from cloudnative-pg/cnpg-infra's
`componentowners-policy.yaml`, the org's tracked desired state for
CODEOWNERS content.
- Routes ownership through this repo's dedicated GitHub owners team
instead of hardcoded usernames, so membership changes are picked up
automatically.
- Any path-scoped rule now also includes the repo's general owners, so a
path rule adds reviewers rather than silently replacing the `*` rule's
owners for that subtree (CODEOWNERS only honors the last matching
pattern, it does not merge).
See cloudnative-pg/cnpg-infra for the policy this is generated from.
Assisted-by: Claude
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Archive() and the restore job hook each re-derived, on their own,
whether to verify the WAL archive destination is empty, by reading a
Cluster annotation and, for Archive, an on-disk marker file. That
decision belongs to the operator, which already tracks both the
annotation and the marker file's lifecycle.
Honor cnpg-i's new WALArchiveRequest/RestoreRequest field
CheckEmptyWalArchive when the operator sets it: obey it directly,
without re-inspecting the marker file. Only fall back to the previous
annotation-and-marker-file logic when talking to an operator that
predates this field.
Related: cloudnative-pg/cnpg-i#353 adds the field this depends on;
cloudnative-pg/cloudnative-pg#11216 is the operator-side counterpart.
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Neither task depends on the other's output: task ci runs lint, tests,
e2e, and docs, while task publish builds and pushes the multi-arch
images. Running them as sequential steps in one job only adds their
durations. Splitting publish into its own job lets it run alongside ci
instead, and lets each job carry only the permissions it actually needs:
ci never writes to the registry, and neither task touches repository
contents, so only packages: write on the publish job remains.
QEMU is only needed for publish, since it's the only job that builds
non-native (arm64) platforms; ci's e2e-ephemeral image build is
amd64-only. The disk cleanup steps aren't needed for publish either: it
only builds two lean multi-arch images, well within the free disk space
available even on the default ubuntu-latest runner.
Note that publishing testing images no longer waits on ci passing, since
gating it away would remove the parallelism this is meant to gain.
Note: main's required status checks are currently ["DCO", "ci"]. A
failure in the new publish job will no longer block merging a PR, since
it isn't in that list (today it does, since publishing is a step inside
the required ci job). Flagging for a decision on whether publish should
be added as a required check.
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
Co-authored-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
When a demoted primary rejoins the cluster after a failover, the
instance manager runs `pg_rewind --restore-target-wal`, and the
resulting `restore_command` invocations are served by this sidecar
exactly as if an instance in recovery were asking. pg_rewind walks the
timeline backwards, fetches every WAL file it needs exactly once, and
treats any restore failure as fatal, so two optimizations meant for
recovery break it: prefetching the following segments is wasted work
that, past the end of the timeline, is guaranteed to end in an archive
miss, and the end-of-wal-stream flag recorded by that miss makes a later
invocation fail without contacting the object store, on a segment the
archive actually has, aborting the whole rewind.
The restore request now carries the context it is made in
(cloudnative-pg/cnpg-i#351). When it says `MODE_REWIND`, the sidecar
restores exactly the requested file: no prefetching, no
end-of-wal-stream flag check, no flag recording. Requests from operators
predating the field keep the current behavior.
This is the plugin-side counterpart of
cloudnative-pg/cloudnative-pg#11204. The cnpg-i dependency points to a
pseudo-version of the protocol pull request and will move to the next
tagged release once it is available.
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Co-authored-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>