Skip to content

ci: a failed Store submission no longer leaves a draft that stops every later run - #874

Merged
petre-c merged 2 commits into
mainfrom
ci/store-submit-stuck-draft
Dec 1, 2026
Merged

petre-c merged 2 commits into
mainfrom
ci/store-submit-stuck-draft

Conversation

@petre-c

@petre-c petre-c commented Dec 1, 2026

Copy link
Copy Markdown

Deskbar task 7e552f55

The Store submission workflow has failed on every run since 2026-11-28, and the Store is still on 2.6.92.

Run 46137003590 uploaded 2.6.93 into a draft, and then msstore submission update failed with exit code -1 and gave no reason. The 2.6.92 run an hour earlier had gone through on the same code, so it looks like a Partner Center hiccup. The draft stayed open, though, and every run since stops on the "draft is open" rule (latest). Today one run also got an InternalServerError on a plain read (run 46631536486).

What changes:

  • Every Partner Center call except the 75 MB upload is tried up to three times (Invoke-StoreRetry in StoreSubmission.psm1).
  • If anything fails after the upload, the run deletes its own draft before failing, so the next release starts clean. It only ever deletes a PendingCommit draft. A commit that went through anyway is left alone, and a commit retry checks first whether the earlier try went through.
  • A new discard_draft input on the manual run deletes an open draft. Automatic runs still fail on an open draft, because it could hold someone's edits made in Partner Center. The run summary names the packages the draft carries.

To unstick the Store after the merge, one of these:

  • Delete the draft in Partner Center.
  • Run the workflow by hand with discard_draft ticked and dry_run unticked. That deletes the draft and submits the newest package.

Tested: the Pester tests under Windows PowerShell 5.1 (33 pass, with new cases for the discard rule and the retry), and a parse check of store-submit.ps1. The Partner Center side can only be tried on a real run.

Nothing under src/ changes, so this makes no release.

opus5.5

Petre Chitashvili added 2 commits December 1, 2026 16:45
…ry later run

On 2026-11-28 the save after the 2.6.93 upload failed with exit code -1 and no
reason. The draft it had made stayed open, and every run since stopped on it
("a draft submission is open in Partner Center"), so the Store has stayed on
2.6.92 and each release sent a failure email.

- Partner Center calls are tried up to three times (Invoke-StoreRetry). Today a
  plain read of the published submission got an InternalServerError too.
- If anything fails after the upload, the run deletes its own draft before it
  fails, so the next release starts clean. Only a PendingCommit draft is ever
  deleted.
- A new workflow_dispatch input, discard_draft, deletes an open draft by hand.
  An open draft still fails the automatic runs, since it may hold someone's
  edits in Partner Center.
- The summary names the packages an open draft carries, to tell a leftover
  from hand edits.

*opus5.5*
…hey repeat

From the review of the branch:
- A discard that finds the draft committed meanwhile stops the run instead
  of submitting over a submission in flight.
- A commit retry first looks whether the earlier try went through.
- The cleanup takes a fresh token, since it may come after a slow upload,
  and a 404 on a delete retry counts as deleted.

*opus5.5*
@petre-c
petre-c merged commit b3a886b into main Dec 1, 2026
1 of 2 checks passed
@petre-c
petre-c deleted the ci/store-submit-stuck-draft branch December 1, 2026 12:54
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.

1 participant