Skip to content

Commit e3a37a9

Browse files
authored
[cloud-resources] soft assert we can parse image references (#32477)
In the rare case that we can't parse a version from the image ref, log an error so we can debug the issue better. I'm also happy to make this just a `tracing::warn!` if folks prefer, the `soft_assert` seemed nice though since this should(?) be rare. ### Motivation Some minimum version checks are failing open and it would be nice to know if it's because the image ref can't be parsed. ### Checklist - [ ] This PR has adequate test coverage / QA involvement has been duly considered. ([trigger-ci for additional test/nightly runs](https://trigger-ci.dev.materialize.com/)) - [ ] This PR has an associated up-to-date [design doc](https://github.com/MaterializeInc/materialize/blob/main/doc/developer/design/README.md), is a design doc ([template](https://github.com/MaterializeInc/materialize/blob/main/doc/developer/design/00000000_template.md)), or is sufficiently small to not require a design. <!-- Reference the design in the description. --> - [ ] If this PR evolves [an existing `$T ⇔ Proto$T` mapping](https://github.com/MaterializeInc/materialize/blob/main/doc/developer/command-and-response-binary-encoding.md) (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](MaterializeInc/cloud#5021)). <!-- Ask in #team-cloud on Slack if you need help preparing the cloud PR. --> - [ ] If this PR includes major [user-facing behavior changes](https://github.com/MaterializeInc/materialize/blob/main/doc/developer/guide-changes.md#what-changes-require-a-release-note), I have pinged the relevant PM to schedule a changelog post.
1 parent 3812ad5 commit e3a37a9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/cloud-resources/src/crd/materialize.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,13 @@ pub mod v1alpha1 {
376376
// version checks. Usually these are custom images that have
377377
// been by a developer on a branch forked from a recent copy
378378
// of main, and so this works out reasonably well in practice.
379-
None => true,
379+
None => {
380+
tracing::warn!(
381+
image_ref = %self.spec.environmentd_image_ref,
382+
"failed to parse image ref",
383+
);
384+
true
385+
}
380386
}
381387
}
382388

0 commit comments

Comments
 (0)