supabase / postgres

Unmodified Postgres with some useful plugins

Home Page:https://supabase.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ansible task "27-pg-repack.yml"

Towerful opened this issue · comments

Bug report

Describe the bug

I think the download URL is using an outdated version (perhaps github has changed their paths?)
File LOC: https://github.com/supabase/postgres/blob/develop/ansible/tasks/postgres-extensions/27-pg-repack.yml#L4
it is currently:
url: "https://github.com/reorg/pg_repack/releases/tag/ver_{{pg_repack_release}}.tar.gz"
which is returning 404.
This one works:
url: "https://github.com/reorg/pg_repack/archive/refs/tags/ver_{{pg_repack_release}}.tar.gz"
and the extension is correctly installed

Ansible then downloads it to a misnamed file:
File LOC: https://github.com/supabase/postgres/blob/develop/ansible/tasks/postgres-extensions/27-pg-repack.yml#L5
it is currently:
dest: /tmp/pg-repack-{{ pg_repack_release }}.tar.gz
However it is later referenced as:
/tmp/pg_repack-{{ pg_repack_release }}.tar.gz
with an _ between the pg and repack

Finally, setup-extensions.yml incorrectly references this task
File LOC: https://github.com/supabase/postgres/blob/develop/ansible/tasks/setup-extensions.yml#L80
Additionally, setup-extensions.yml is referencing this task as:
import_tasks: tasks/postgres-extensions/27-pg_repack.yml
However the file is named
27-pg-repack.yml

Additional context

I hope the shortened bug reports for small things like this is ok?
I'm still working on getting the ansible playbook to run against a VM.

I've also found that a few of the build commands reference the extracted directory /tmp/pg_repack-{{ pg_repack_release }} during the 27-pg-repack.yml task.
Unfortunately, the extracted directory is actually /tmp/pg_repack-ver_{{ pg_repack_release }}.
This might come from the new github path

Hey @Towerful - good catch - thanks!

We've addressed all this, merged it in, and should be ready to go!