Skip to content

feat: thread --version into the image build as PLT_DEPLOYMENT_ID - #94

Merged
marcopiraccini merged 3 commits into
mainfrom
skew-protection-deployment-id
Aug 6, 2026
Merged

feat: thread --version into the image build as PLT_DEPLOYMENT_ID#94
marcopiraccini merged 3 commits into
mainfrom
skew-protection-deployment-id

Conversation

@marcopiraccini

@marcopiraccini marcopiraccini commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

desk deploy -d <dir> -v <version> built the image and then labelled the workload plt.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 as plt.dev/version on the workload, and therefore used as the gateway's match key. --version is 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#buildFromDirectory already accepted a buildArgs option; nothing ever populated it.

Deploying without --version is unchanged, and an application whose Dockerfile does not declare the matching ARG PLT_DEPLOYMENT_ID= ignores the build arg.

Related

Verified end to end on a k3d cluster: desk deploy -v <id> now produces an image whose ENV carries PLT_DEPLOYMENT_ID and whose built assets carry ?dpl=<id>, and requests carrying that query reach that version's pod.

Signed-off-by: marcopiraccini <marco.piraccini@gmail.com>
@marcopiraccini marcopiraccini changed the title deployment id feat: thread --version into the image build as PLT_DEPLOYMENT_ID Aug 3, 2026
Signed-off-by: marcopiraccini <marco.piraccini@gmail.com>
@marcopiraccini
marcopiraccini marked this pull request as ready for review August 4, 2026 07:25

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

Signed-off-by: marcopiraccini <marco.piraccini@gmail.com>

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

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.

2 participants