Flaky test: a_run_whose_retained_definition_does_not_restore_is_held_alone reopens the deployment while the audit sink is still locked

Aberta Para iniciantes
#2,706 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
2/5
Tempo estimado
1-3 horas
Facilidade para iniciantes
76/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
github-actions, postgresql, rust
Domínio
databases, testing

Direção de pesquisa

Comece pelo teste com falha a_run_whose_retained_definition_does_not_restore_is_held_alone em crates/registry-coordinator/tests/deployment_postgres.rs, especialmente pelo teardown e pela chamada a deployment::open_ctl perto da linha 5665. Execute o teste runtime de PostgreSQL do Coordinator e verifique como o teste pode aguardar a liberação do lock do audit sink anterior ou tentar novamente open_ctl ao receber sink-locked por um período limitado. O trabalho estará concluído quando o teste lidar com essa corrida durante o teardown sem flexibilizar a recusa do produto.

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

Descrição

What happened

The Coordinator PostgreSQL runtime job failed in a merge group for an unrelated change (#2705, run 44574520469, 19 Nov 2026). The same job passed on that PR's own run.

test a_run_whose_retained_definition_does_not_restore_is_held_alone ... FAILED
panicked at crates/registry-coordinator/tests/deployment_postgres.rs:5665:67:
called `Result::unwrap()` on an `Err` value: CoordinatorError { code: "deployment.refused",
  message: "the deployment contract was refused", ...,
  suggested_action: Some("restore writable durable audit custody (sink-locked)"), ... }
test result: FAILED. 16 passed; 1 failed; 3 ignored

Likely cause

Just before line 5665 the test aborts the server task (server.abort(); let _ = server.await;), drops the first migration store and calls deployment::open_ctl(&runtime_v2, true). The refusal says the durable audit sink was still locked. That suggests the lock held by the previous store or the aborted server is sometimes released after the reopen begins. This is a teardown ordering race in the test, not a product defect that we have observed outside it.

Suggested fix

Make the reopen wait until the previous holder has released the audit sink lock, for example by waiting for the lock release explicitly or retrying open_ctl on sink-locked for a bounded time in the test only. Do not relax the product's refusal.

Impact

Merge-queue entries that select the Coordinator PostgreSQL suite can be dropped. Rerunning the entry has passed so far.

Linguagem predominante
Rust
Estrelas
2
Forks
0
Merge médio
9h 48min
PRs com merge (30d)
151

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 registrystack/registry-stack

Todas as issues de registrystack/registry-stack

Issues semelhantes

Mais issues de Rust

Receba novas issues na sua caixa de entrada

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