Conversation
b3995b2 to
8070dad
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Implements client-side validation for meshstack_building_block_definition.spec.symbol to ensure image data URIs are base64-valid and within the decoded size limit, improving early feedback in Terraform plans/applies.
Changes:
- Added a
SymbolSizestring validator that acceptshttp(s)://URLs or whitelisteddata:image/*;base64,URIs and enforces a 100 KiB decoded limit. - Wired the new validator into the Building Block Definition resource schema for
spec.symbol. - Added provider tests covering valid/invalid URLs, MIME types, base64 correctness, and boundary size conditions.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| internal/validators/symbol_size_validator.go | New string validator implementing base64-aware symbol validation and decoded-size enforcement. |
| internal/provider/building_block_definition_resource_schema.go | Applies validators.SymbolSize{} to spec.symbol schema attribute. |
| internal/provider/building_block_definition_resource_test.go | Adds test matrix for symbol validation behavior via resource test steps. |
fc646b9 to
86e6e34
Compare
grubmeshi
reviewed
Mar 23, 2026
grubmeshi
approved these changes
Mar 23, 2026
…ition symbol BD-2290 [BD-2290](https://meshcloud.bolddesk.com/agent/tickets/2290)
86e6e34 to
6a1e0a8
Compare
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.
BD-2290
BD-2290
related PR: https://github.com/meshcloud/meshfed-release/pull/9620
I've tested it locally. A
tofu plangoes through with an image that is exactly 100 KiB of size, like so:with an image that's 100 KiB plus one byte, we get this error during
plan: