Skip to content

Add workflow to publish unstable distribution assets - #960

Open
KaiKitJeffreyChan wants to merge 1 commit into
return-reasons-localizations-validatorfrom
07-16-add_workflow_to_publish_unstable_distribution_assets
Open

Add workflow to publish unstable distribution assets#960
KaiKitJeffreyChan wants to merge 1 commit into
return-reasons-localizations-validatorfrom
07-16-add_workflow_to_publish_unstable_distribution_assets

Conversation

@KaiKitJeffreyChan

@KaiKitJeffreyChan KaiKitJeffreyChan commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a workflow that refreshes the rolling unstable prerelease when taxonomy data or dev changes on main.

  • Generates distribution files for all locales.
  • Reuses the staging command from Publish stable release distribution assets #957.
  • Validates asset counts and gzip integrity before modifying the release.
  • Creates the prerelease when absent and replaces assets with --clobber.
  • Reconciles published assets against the staged set after upload: deletes orphaned assets and fails if any staged asset is missing from the release.
  • Serializes runs to prevent overlapping publications.
  • Supports workflow_dispatch for manual recovery re-runs, guarded to refuse non-main refs.
  • Posts a Slack message via incoming webhook when the publish job fails, so failures don't rely on the push actor's email (~83% of data/** commits are the translation bot).

Stacked on #967, which adds return reason localizations to the validator this workflow relies on for all-or-nothing generation.

Closes https://github.com/shop/issues-taxonomy/issues/542.

Known gaps (acknowledged)

  • --clobber alone can't remove or verify assets — it only adds/replaces name-matched assets. The reconcile step closes this. Asset replacement is still non-atomic (GitHub has no transactional multi-asset swap), so a brief mixed window exists mid-run; every green run converges to the exact staged set.
  • Translation lag turns runs red — English data/** changes land days before bot translations; the localization validator fails the publish during that window. Accepted: fail-loud is intended, assets stay at last-good, and the run self-heals once translations merge. Will also request that data changes arrive alongside localizations.
  • Missing localized descriptions silently fall back to English — the validator gates name only; a translated entry lacking a description ships English text with a green run. Accepted as fallback-by-design; verified zero occurrences across all ~280k localized attribute/return-reason entries today.
  • CI generates dist in English only — locale-specific generation bugs (the Fix AlphanumericSorter crash on mixed sequential-text values #942 class) surface first in this workflow, not CI. Accepted: this workflow is the all-locale canary; failures alert via Slack and recover via workflow_dispatch re-run.

KaiKitJeffreyChan commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@JeffrayZhang
JeffrayZhang force-pushed the jz/stable-release-assets branch 2 times, most recently from 5a41ba1 to 37e5b01 Compare July 18, 2026 00:19
@KaiKitJeffreyChan
KaiKitJeffreyChan marked this pull request as ready for review July 27, 2026 16:50
@KaiKitJeffreyChan
KaiKitJeffreyChan force-pushed the 07-16-add_workflow_to_publish_unstable_distribution_assets branch 2 times, most recently from c80c5d5 to fd39d11 Compare July 28, 2026 15:09
Base automatically changed from jz/stable-release-assets to main July 28, 2026 18:27
@KaiKitJeffreyChan
KaiKitJeffreyChan changed the base branch from main to graphite-base/960 July 29, 2026 15:51
@KaiKitJeffreyChan
KaiKitJeffreyChan force-pushed the 07-16-add_workflow_to_publish_unstable_distribution_assets branch from fd39d11 to 335fc66 Compare July 29, 2026 15:51
@KaiKitJeffreyChan
KaiKitJeffreyChan changed the base branch from graphite-base/960 to return-reasons-localizations-validator July 29, 2026 15:51
@KaiKitJeffreyChan
KaiKitJeffreyChan force-pushed the 07-16-add_workflow_to_publish_unstable_distribution_assets branch from 335fc66 to c46255e Compare July 29, 2026 16:37
Assisted-By: devx/db36898b-90ef-49b8-9d62-88c95b00cbbc
@KaiKitJeffreyChan
KaiKitJeffreyChan force-pushed the 07-16-add_workflow_to_publish_unstable_distribution_assets branch from c46255e to dcc9e42 Compare July 29, 2026 23:23

@hadijafar hadijafar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks good

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.

3 participants