Stop the deploy from hiding why it failed - #22
Merged
Merged
Conversation
The step asserted into `/dev/null` and printed the response afterwards, so under `set -e` a failing assertion took the evidence with it. Three deployments failed here in a row and the only visible output was `exit code 1`. It prints first now, into the log and the job summary, and asserts after. It also stops failing the deployment over a raw object that will not flatten. That is a data-quality problem: the infrastructure is live and the tables are published either way, so it is reported as a warning here and left to the `compact` workflow, which exists to assert that every raw object was consumed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01361quprG7tUgaVFKAmKtJZ
cratebank previewPreview removed because this pull request is closed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Production deploys have failed at
Publish current public tablesfour times running, starting with the merge of #14 on 23 August. This does not fix the underlying cause — it makes the cause visible, and stops it failing the wrong thing.Why nobody could see the cause
The assertion goes to
/dev/nulland the response is printed after it. GitHub runsrun:steps underset -e, so when the assertion fails the step dies before the print. Four failed deployments and the only visible output isProcess completed with exit code 1— thirteen seconds of runtime, nothing else.Print first, assert second. It now goes to the log and to the job summary, so a failure explains itself.
What it should be failing on
Compaction is working. The tables were rewritten at 20:18 today with the corrected schema, and the one stored session flattens fine — I ran
main's ownflattenagainst the live object locally: 115 unit rows, 1003 phase rows.So what fails the step is almost certainly
.failed != 0: one or more raw objects undersessions/that will not flatten. That is worth knowing about, but it is not a deployment failure — the infrastructure is live and the tables are published either way. Conflating the two means every future deployment stays red until the data is clean, and a red deploy stops meaning "the deploy broke".So the deploy now reports skipped objects as a warning annotation, and asserts only that compaction returned
ok. The strict "every raw object was consumed" assertion stays where it belongs, in thecompactworkflow, which already prints the full response and publishes it to the job summary.Finding the actual object
The
compactworkflow lists the offending keys — the compactor logscompact: skipping <key>: <error>for each one, and the workflow prints the statistics. One run from the Actions tab will name them.Worth considering once they are named: the ingest endpoint is public and unauthenticated by design, so anything that can POST can put an object in
sessions/that will never flatten, and it will be retried and skipped on every rebuild forever. If that is what happened, the fix is a cleanup path for unflattenable objects rather than tighter ingest — the streaming write is what keeps ingest cheap, and validating at the edge would give that up.🤖 Generated with Claude Code
https://claude.ai/code/session_01361quprG7tUgaVFKAmKtJZ