Skip to content

Make CollectionLookupError returns more precise#35011

Merged
ggevay merged 4 commits intoMaterializeInc:mainfrom
ggevay:instance_client-refactoring-2
Feb 19, 2026
Merged

Make CollectionLookupError returns more precise#35011
ggevay merged 4 commits intoMaterializeInc:mainfrom
ggevay:instance_client-refactoring-2

Conversation

@ggevay
Copy link
Contributor

@ggevay ggevay commented Feb 13, 2026

This is a refactoring related to the frontend peek sequencing, addressing the second paragraph of #33713 (comment) + other related discussions with Moritz and Jan.

This PR makes many function return types specify more precise error types. This made CollectionLookupError used only by PeekClient, so it was moved there.

Part 2 of 3 from the original #34839. Depends on #35010, so only the second commit is new. Edit: Now rebased, the original first commit is on main.

@github-actions
Copy link

Pre-merge checklist

  • The PR title is descriptive and will make sense in the git log.
  • This PR has adequate test coverage / QA involvement has been duly considered. (trigger-ci for additional test/nightly runs)
  • If this PR includes major user-facing behavior changes, I have pinged the relevant PM to schedule a changelog post.
  • This PR has an associated up-to-date design doc, is a design doc (template), or is sufficiently small to not require a design.
  • If this PR evolves an existing $T ⇔ Proto$T mapping (possibly in a backwards-incompatible way), then it is tagged with a T-proto label.
  • If this PR will require changes to cloud orchestration or tests, there is a companion cloud PR to account for those changes that is tagged with the release-blocker label (example).

@ggevay ggevay marked this pull request as ready for review February 13, 2026 22:01
@ggevay ggevay requested review from a team as code owners February 13, 2026 22:01
@ggevay ggevay requested review from mtabebe and teskje February 13, 2026 22:01
@ggevay ggevay force-pushed the instance_client-refactoring-2 branch from 3898271 to 7b0f72e Compare February 17, 2026 12:27
@ggevay
Copy link
Contributor Author

ggevay commented Feb 17, 2026

Rebased, ready for review

Copy link
Contributor

@teskje teskje left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm, just minor comments.

Comment on lines +50 to +49
pub enum CollectionLookupError {
pub enum CollectionFrontiersError {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd keep this named CollectionLookupError, since it's also returned by install_compute_watchset, which is not directly about frontier lookups.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, named it back


/// Errors arising during peek watch set installation.
#[derive(Error, Debug)]
pub enum WatchSetInstallError {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if there is a need for a new error enum if it just reproduces the one from the controller. Does returning the controller error like we did before not work here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, removed this and using CollectionLookupError instead.

@ggevay ggevay force-pushed the instance_client-refactoring-2 branch from 7b0f72e to 60ec7e3 Compare February 19, 2026 16:26
@ggevay
Copy link
Contributor Author

ggevay commented Feb 19, 2026

TFTR!

@ggevay ggevay enabled auto-merge (squash) February 19, 2026 16:27
@ggevay ggevay merged commit 681cdf1 into MaterializeInc:main Feb 19, 2026
134 checks passed
patrickwwbutler pushed a commit to patrickwwbutler/materialize that referenced this pull request Feb 19, 2026
This is a refactoring related to the frontend peek sequencing,
addressing the second paragraph of
MaterializeInc#33713 (comment)
+ other related discussions with Moritz and Jan.

This PR makes many function return types specify more precise error
types. This made `CollectionLookupError` used only by `PeekClient`, so
it was moved there.

Part 2 of 3 from the original MaterializeInc#34839. Depends on MaterializeInc#35010, so only the
second commit is new. Edit: Now rebased, the original first commit is on
`main`.
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.

3 participants