Improve expectPubId mismatch error message#2678
Merged
Conversation
Before: expected publication ID 0000000000000000 was not matched (it's actually 117efc2f6100029f): your changes have already been published or another publication has modified this spec; please try again with a fresh copy of the spec. After: This task was updated while you were editing — please refresh the spec and re-apply your changes. This may have been an automated system update. (expected publication ID 0000000000000000, actual 117efc2f6100029f) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
psFried
reviewed
Feb 17, 2026
Contributor
psFried
left a comment
There was a problem hiding this comment.
I'm fine with this, though I might suggest changing "task" to "spec" or something. But this has come up before and I remember @jgraettinger having stronger opinions about it, so I'll let him decide.
Contributor
They do update the |
crates/validation/src/errors.rs
Outdated
| }, | ||
| #[error( | ||
| "expected publication ID {expect_id} was not matched (it's actually {actual_id}): your changes have already been published or another publication has modified this spec; please try again with a fresh copy of the spec." | ||
| "This task was updated while you were editing — please refresh the spec and re-apply your changes.\nThis may have been an automated system update. (expected publication ID {expect_id}, actual {actual_id})" |
Member
There was a problem hiding this comment.
Use "spec" or "specification", as this error applies to collection as well (which are usually not tasks).
Per review feedback — this error applies to collections too, not just tasks.
github-actions bot
pushed a commit
to estuary/homebrew-flowctl
that referenced
this pull request
Mar 25, 2026
This release includes support for the upcoming materialization triggers feature, in addition to several other bugfixes and improvements. ## What's Changed - Fix double-slash in journal list selector breaking collection reads by @jgraettinger in estuary/flow#2718 - Include flowctl version in publication details by @psFried in estuary/flow#2748 - Improve error message for concurrent spec modifications by @jwhartley in estuary/flow#2678 - Add support for materialization triggers by @williamhbaker in estuary/flow#2800
williamhbaker
added a commit
to estuary/homebrew-flowctl
that referenced
this pull request
Mar 25, 2026
This release includes support for the upcoming materialization triggers feature, in addition to several other bugfixes and improvements. ## What's Changed - Fix double-slash in journal list selector breaking collection reads by @jgraettinger in estuary/flow#2718 - Include flowctl version in publication details by @psFried in estuary/flow#2748 - Improve error message for concurrent spec modifications by @jwhartley in estuary/flow#2678 - Add support for materialization triggers by @williamhbaker in estuary/flow#2800
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.
Summary
ExpectPubIdNotMatchederror to be more human-readable: leads with what happened, gives a clear action, and demotes publication IDs to a parentheticalBefore:
After:
Context
This error commonly occurs when automated system updates (e.g. inferred schema changes, auto-discovers, controller convergence) modify a spec while a user is editing it. The old message was written for developers and doesn't help customers understand what to do.
Question: Do inferred schema changes still update
last_pub_id? The Aug 2024 plan (#1520) outlined separatinglast_pub_idfromlast_build_idso that dependency-only changes wouldn't bumplast_pub_id. If that's been implemented, this error should be less frequent — but when it does occur, it should still be clear.Test plan
cargo test -p validation -- test_insert_but_already_exists test_update_but_does_not_existpasses locallylocking_retries.rsupdated to match🤖 Generated with Claude Code