DefangLabs / DefangLabs/defang

Force redeploy should preserve content-addressed digest and trigger via Pulumi, not a random blob name

Open
#2,256 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
166
Forks
24
Avg merge
10h 8m
Merged PRs (30d)
33

Description

Background

PR #2255 fixed a bug where `--force` reused one upload URL after its first use, so the CD build was silently skipped and a stale image was shipped. The fix generates a fresh UUID-named blob for every forced upload, guaranteeing the build context URL differs each time.

Follow-up

@lionello raised a better long-term design: keep uploading under the content sha256 digest (so identical uploads still dedupe in blob storage, and unforced deploys keep working exactly as before), and instead push the "force" intent down to where the deploy decision actually lives — the Pulumi/CD side — using one of Pulumi's own trigger mechanisms (e.g. a `triggers`-style resource dependency, or a random/timestamp input) to force the build/deploy step to re-run even though the S3 URL is unchanged.

This needs:

  • `CreateUploadURL`/`UploadURLRequest` (or equivalent) to carry the force intent through to the CD runner, instead of only the CLI knowing about it.
  • A trigger mechanism in the `pulumi-defang` provider's build/deploy resource so it forces re-execution independent of the S3 build-context URL.

Note: this doesn't need a fabric RPC change routed through Playground — Playground is obsolete, so this is scoped to BYOC providers (`pulumi-defang`) and the CLI's request to `CreateUploadURL`.

Why not do this in #2255

#2255 is a hotfix for images actively being shipped stale in production; the digest-preserving/Pulumi-trigger redesign spans multiple repos and is a bigger lift, so it's tracked here separately rather than blocking the hotfix.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Trace CreateUploadURL/UploadURLRequest in the CLI and the build/deploy resource in the pulumi-defang provider. Determine how to carry the force intent while preserving the content-addressed S3 upload digest, then examine Pulumi trigger mechanisms. Done means repeated forced deployments rerun the build/deploy step without changing the digest-based upload URL.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, go
Domain
cli, cloud, infrastructure
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.