Skip to content

@W-23938378 | Preserve target-only manifest fields, seed catalog.json only for new apps, and stop PRs into main - #137

Merged
jbisaSF merged 1 commit into
release/26.8from
W-23938378-auto-promote-26.8
Aug 20, 2026
Merged

jbisaSF merged 1 commit into
release/26.8from
W-23938378-auto-promote-26.8

Conversation

@jbisaSF

@jbisaSF jbisaSF commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes auto-promote on release/26.8 so a 26.8 → 26.9 hop cannot clobber 26.9-only metadata, rewrite existing catalog.json, or open a PR into main.

Preserve target-only manifest fields

  • merge_manifest_entry no longer replaces the whole entry when versions are equal or newer. It merges field-by-field: incoming values update shared keys (version, zip, sha256), and fields that exist only on the target stay.
  • That keeps isFeatured, featured*, badge, and companyName on 26.9 — the fields CI: promote from release/26.8 → release/26.9 #113 wiped.
  • Older source versions still do not regress the target pin. Adding Approaching Discounts on 26.8 while Avalara is 1.0.0 there and 1.0.1 on 26.9 leaves Avalara at 1.0.1.

catalog.json

  • New helper seed_init_catalog_if_absent: writes INIT only when the target has no catalog.json.
  • Version bumps of existing apps do not include catalog.json in the auto-promo PR. The target branch's catalog CI job owns version history.

No hop to main

  • next_release_branch prints nothing when there is no newer release/*. Auto-promote will not open release/*main PRs. The newest release branch is the end of the chain.

Workflow wiring

  • ZIP selection and apply live in collect_promotable_zips and apply_promoted_zip_onto_target; update-catalog.yml calls them.
  • Only ZIPs in the source push (and pinned in the source manifest) are copied. Unlisted siblings (e.g. Avalara when only a new app ZIP changed) are not copied or re-catalogued.

Test plan

  • bash .github/scripts/test-promotion-utils.sh — 68 passed, including:
    • equal-version merge keeps target-only keys
    • newer-version merge keeps target-only keys and position
    • whole-file equal-version merge keeps target-only keys (CI: promote from release/26.8 → release/26.9 #113 shape)
    • older source entry does not regress a newer pin (entry and whole-file)
    • new-app promote does not regress a newer target pin (Avalara 1.0.1 + Approaching Discounts)
    • absent catalog is seeded as INIT; existing catalog is skipped and untouched
    • only the changed new-app ZIP is selected; unpinned/missing ZIPs are not
    • new-app ZIP copied + INIT catalog; Avalara 1.0.1 ZIP/catalog unchanged; Avalara 1.0.0 ZIP not copied
    • highest release terminates (does not hop to main)
  • Confirm a push to the newest release/* branch does not open a promo PR into main

@jbisaSF
jbisaSF force-pushed the W-23938378-auto-promote-26.8 branch from ea47ba9 to b18b75b Compare August 20, 2026 15:50
@jbisaSF jbisaSF changed the title @W-23938378 | Overlay manifest extras, seed catalog.json only for new apps, and stop release-to-main PRs @W-23938378 | Preserve target-only manifest fields, seed catalog.json only for new apps, and stop PRs into main Aug 20, 2026

@shauryemahajanSF shauryemahajanSF 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.

Test it out on a fork, but LGTM

@jbisaSF

jbisaSF commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

Test it out on a fork, but LGTM

Verified in the test registry.

@jbisaSF
jbisaSF merged commit ad83c16 into release/26.8 Aug 20, 2026
2 checks passed
@jbisaSF
jbisaSF deleted the W-23938378-auto-promote-26.8 branch August 20, 2026 17:55
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