feat: thread --version into the image build as PLT_DEPLOYMENT_ID - #94
Merged
Conversation
Signed-off-by: marcopiraccini <marco.piraccini@gmail.com>
Signed-off-by: marcopiraccini <marco.piraccini@gmail.com>
marcopiraccini
marked this pull request as ready for review
August 4, 2026 07:25
Signed-off-by: marcopiraccini <marco.piraccini@gmail.com>
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.
desk deploy -d <dir> -v <version>built the image and then labelled the workloadplt.dev/version=<version>, but never told the build what that version was. This passes it through as--build-arg PLT_DEPLOYMENT_ID=<version>.Query-string skew protection needs one value in three places at once: baked into the client assets as
?dpl=<id>at build time, set asplt.dev/versionon the workload, and therefore used as the gateway's match key.--versionis that value, so it has to reach the build as well as the deploy.Without this the failure is silent, which is why it is worth fixing rather than documenting. The image builds fine, the workload deploys fine, and the app runs fine. But its assets carry no
?dpl, so ICC sees a version that was not built with its own id, correctly refuses to emit a routing rule for it, and the app simply has no skew protection. Nothing errors.lib/registry.js#buildFromDirectoryalready accepted abuildArgsoption; nothing ever populated it.Deploying without
--versionis unchanged, and an application whose Dockerfile does not declare the matchingARG PLT_DEPLOYMENT_ID=ignores the build arg.Related
Verified end to end on a k3d cluster:
desk deploy -v <id>now produces an image whoseENVcarriesPLT_DEPLOYMENT_IDand whose built assets carry?dpl=<id>, and requests carrying that query reach that version's pod.