chore(postgres): retire the system-database release pass once the supported lines have shipped it

Aberta
#5,453 0 comentários 1 reação 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 3 dias

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
35/100
Tipo de issue
Refatoração
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
bash, postgresql
Domínio
databases

Direção de pesquisa

Read packages/apps/postgres/templates/init-script.yaml around the system-database release pass and hack/postgres-release-system-databases.bats. First check the supported release lines and the status of #5157 to confirm the removal condition is met. Once the extra minor has shipped, remove the pass and its test, keep the database refusal, and add the SQL recovery recipe to the release notes.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

area/database kind/cleanup triage/needs-triage

Problem / motivation

Since #5155 the chart refuses postgres, template0 and template1 in databases (packages/apps/postgres/templates/init-script.yaml:56-58) and never drops them. The same change added a pass that runs on every init Job (init-script.yaml, from == release system databases, around lines 326-410) and hands back system databases that earlier versions had taken over: it drops the auto-grant trigger, reassigns what the managed roles own, and returns public to its default owner. hack/postgres-release-system-databases.bats tests it by cutting the pass out of the template and running it against a fake psql that answers by the exact SQL text, so it catches a rewording rather than a behaviour change.

The pass protects something real. On an installation where an old version took over template1, every database created afterwards inherits a trigger that names template1_admin; once that role is dropped, every CREATE SCHEMA there fails. Removing the pass now would leave those installations to fix by hand, and I do not know how many exist. But it is a one-time repair that stays in every run of every release forever.

Proposed solution

Pick a removal point: once every supported release line has shipped the pass (it is in v1.7.1; the release-1.6 backport, #5157, is still open) and one more minor has gone out, remove the pass and its bats test, keep the refusal, and leave a SQL recipe in the release notes for anyone who skipped those versions.

Scope check

  • This affects a single component / package (if it spans many, consider a design proposal)
  • I can describe the expected behavior concretely (if not, consider a Discussion first)

Alternatives considered

Remove it now and document the manual recovery: smaller, but it moves the repair onto operators who may not know they are affected. Keep it forever: no risk, but each change to the init script has to keep this pass and its text-matching test working.

Additional context

The e2e suite under hack/e2e-chainsaw/postgres would be the place for a behaviour test while the pass still exists.

Linguagem predominante
Go
Estrelas
2.2k
Forks
209
Merge médio
4d 14h
PRs com merge (30d)
140

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de cozystack/cozystack

Todas as issues de cozystack/cozystack

Issues semelhantes

Mais issues de Go

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.