Static Push Publish: remove the static (S3) artifact when push-publishing working/not-live content
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Description
Follow-up enhancement from #35365 (PR #36193, merged; follow-up PR #36274).
Static endpoints (e.g. S3) only ever hold live-rendered artifacts — there is no working/draft state on a static target. #35365 added removal of those artifacts via the explicit Push Remove operation (unpublished content pushed with push-remove deletes the corresponding rendered artifact from the target, driven by /live/ markers emitted by StaticDependencyBundler).
However, a regular Push Publish (not push-remove) of content that is currently in working state (not live / unpublished) is effectively a no-op on a static endpoint today: the content bundlers only render live content, so nothing is uploaded, and any previously-published artifact for that content is left orphaned on S3.
Proposed behavior: When push-publishing content whose source state is working/not-live to a static endpoint, the static publisher should remove the corresponding artifact from the target (since a static target only holds live content, a non-live source has no valid representation there). This makes Push Publish self-correcting for content that has been unpublished — without requiring the author to also run an explicit Push Remove.
| Source state | Operation | Static (S3) behavior today | Proposed |
|---|---|---|---|
| Live | Push Publish | upload live-rendered artifact | (unchanged) |
| Working / not-live | Push Publish | no-op → artifact orphaned | remove the artifact |
| Any | Push Remove | remove the artifact (#35365) | (unchanged) |
⚠️ Needs Product confirmation before implementation — this is the open question raised during the #35365 review (push-publish-of-working = remove vs. keep no-op). Captured here so it isn't lost.
Acceptance Criteria
- Product decision recorded: confirm that push-publishing working/not-live content to a static endpoint should remove the existing artifact (vs. remaining a no-op).
- Assuming confirmed: push-publishing content with no live version to a static (S3) endpoint removes the corresponding rendered artifact(s) from the target.
- Removal covers all languages the artifact was published to — including pages rendered to additional languages via default-language fallback (consistent with the per-language handling fixed in #36274).
- Push Publish of live content is unchanged (still uploads the live-rendered artifact).
- Push Remove behavior from #35365 is unchanged.
- No artifacts are orphaned on the static endpoint after a Push Publish of unpublished content.
- Covered by integration tests in
StaticPublisherIntegrationTest(publish-of-working → artifact removed, including the fallback-language case).
Priority
Medium
Additional Context
- Per-language nuance: like #35365/#36274, static publishing renders pages per configured language (with default-language fallback via
findByIdLanguageFallback), so removal must cover every language the artifact was published to, not just the languages with a real content version. - Dynamic vs. static: on a dynamic endpoint, working content is replicated as working (it has a place to live on the target). A static endpoint has no working state, which is why the "remove on publish of non-live content" semantics are specific to static publishing.
- Implementation pointer: likely in
StaticDependencyBundler/ the static publishers (AWSS3Publisher,StaticPublisher), mirroring the marker-based removal already used for Push Remove.
Refs: #35365, #36193, #36274
Links
Original help desk ticket : 36287
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
First confirm the product decision described in the issue. Then read StaticDependencyBundler, AWSS3Publisher, StaticPublisher, and the existing marker-based Push Remove flow; run or extend StaticPublisherIntegrationTest for publishing working content, including fallback languages. Done means the artifact is removed for every published language, while live Push Publish and Push Remove remain unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, java
- Domain
- backend, cloud
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100