Open
Conversation
e159323 to
b86031d
Compare
| } | ||
|
|
||
| return env.Settings.ImageBuilderVersion, nil | ||
| } |
There was a problem hiding this comment.
Bug: Missing fallback for empty server image builder version
The new imageBuilderVersion function returns whatever the server provides, which could be an empty string if EnvironmentSettings.ImageBuilderVersion is not set. The old implementation had a hardcoded fallback of "2024.10" when both the profile and server-provided values were empty. Without this fallback, image builds may receive an empty builderVersion, potentially causing undefined behavior if the server doesn't guarantee this field is always populated.
Additional Locations (1)
64c56c7 to
005dfb8
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.
Note
Both SDKs now fetch and cache environment settings and use the server-provided Image Builder Version for image builds, replacing hardcoded defaults and updating calls to pass the resolved environment.
2024.10(may trigger one rebuild on first run).environment.gowithEnvironmentmodel, cached fetch (sync.Map+singleflight) viaEnvironmentGetOrCreateandimageBuilderVersion(ctx, env).Image.Build()uses server-derivedbuilderVersionand logsbuilder_version/env_name.environmentName()withfirstNonEmpty(..., profile.Environment)across services (Apps,Cls,Functions,Proxy,Queue,Volume,Sandbox,Secret).environmentsCacheandenvironmentGroup.ModalClient(fetchEnvironment,getImageBuilderVersion) viaenvironmentGetOrCreate.Image.build()uses server-derivedbuilderVersionand logsbuilder_version/env_name.MODAL_IMAGE_BUILDER_VERSIONwhere needed; vitest sets default env var.CHANGELOG.mdto note breaking change.Written by Cursor Bugbot for commit b65b047. This will update automatically on new commits. Configure here.