Skip to content

feat(stovepipe): Persist terminal build identity - #746

Open
prathshenoy wants to merge 1 commit into
mainfrom
prath.shenoy/stovepipe-project-result-build
Open

prathshenoy wants to merge 1 commit into
mainfrom
prath.shenoy/stovepipe-project-result-build

Conversation

@prathshenoy

@prathshenoy prathshenoy commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

What:

  • Persist the winning build ID in the terminal request-history entry when a build reaches a terminal state.
  • Atomically commit the terminal request state and its matching history entry, and reload that entry on duplicate delivery or concurrent completion.

Why:

  • Preserve which build established a request’s final outcome for later artifact lookup.
  • Keep the build-to-request relationship one-way by retaining the selected terminal build ID in immutable request history, rather than adding a reverse build reference to the mutable request row.
  • Prevent crashes or competing builds from leaving a terminal request without the corresponding winning build identity.

Test Plan

  • Add unit tests.

Revert Plan

  • Revert this PR. Reverting restores the prior request-finalization path, which is safer than leaving validations unable to record or publish terminal outcomes.

Issues

Stack

  1. @ feat(stovepipe): Persist terminal build identity #746
  2. feat(stovepipe): Add project build identity #747

@prathshenoy
prathshenoy force-pushed the prath.shenoy/stovepipe-project-result-build branch 3 times, most recently from 208831a to 66cef3f Compare September 25, 2026 03:19
@prathshenoy prathshenoy changed the title feat(stovepipe): Pass terminal build to project result resolver feat(stovepipe): Persist terminal build identity Sep 25, 2026
@prathshenoy
prathshenoy force-pushed the prath.shenoy/stovepipe-project-result-build branch 11 times, most recently from ed96f51 to 21187f1 Compare September 28, 2026 15:19
Summary:
Persist the winning terminal build identity in the terminal request-history entry, atomically with the request outcome, so record can later resolve final artifacts without a Build reverse index.

Test Plan:
./tool/bazel test //stovepipe/controller/buildsignal:go_default_test //stovepipe/core/messagequeue:go_default_test //stovepipe/extension/storage/mysql:go_default_test --test_output=errors

Revert Plan:
Revert this commit to stop persisting terminal build identity.

Jira Issues: None
@prathshenoy
prathshenoy force-pushed the prath.shenoy/stovepipe-project-result-build branch 2 times, most recently from c354c8e to 9193d79 Compare September 28, 2026 15:47
@prathshenoy
prathshenoy marked this pull request as ready for review September 28, 2026 15:47
@prathshenoy
prathshenoy force-pushed the prath.shenoy/stovepipe-project-result-build branch from 9193d79 to c354c8e Compare September 28, 2026 16:24

This branch has not been deployed

No deployments
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