Skip to content

Track Microsoft Store publication of PWABuilder Windows packages - #6339

Open
Judah Gabriel Himango (JudahGabriel) wants to merge 1 commit into
mainfrom
user/judahgabriel/store-publication-tracking
Open

Judah Gabriel Himango (JudahGabriel) wants to merge 1 commit into
mainfrom
user/judahgabriel/store-publication-tracking

Conversation

@JudahGabriel

Copy link
Copy Markdown
Contributor

N/A - no linked issue.

PR Type

  • Feature
  • Documentation content changes

Describe the current behavior?

PWABuilder records generated Windows packages in CosmosDB but does not connect those records to apps subsequently published in the Microsoft Store. The main website's Store-scanning background service is an unused stub.

Describe the new behavior?

The Windows packaging service now scans SFEdge five minutes after startup and every 24 hours thereafter, reusing its existing CosmosDB configuration. All SFEdge requests use User-Agent: StoreWeb PWABuilder.

  • Enumerates the PWA catalog and fetches product details, selecting the matching product envelope and extracting package identity names from every PackageFamilyNames entry.
  • Matches packageId case-insensitively and patches only productId on every corresponding Cosmos document. Older records without the field are supported; unchanged matches are not rewritten and previously discovered IDs are not cleared.
  • Handles SFEdge's empty terminal Products envelope, logs individual product failures, defers catalog/authentication failures to the next daily scan, and cancels work cleanly on shutdown.
  • Removes the unused website stub and documents operation and configuration.

PR Checklist

  • Test: run npm run test and ensure that all tests pass
  • Target main branch (or an appropriate release branch if appropriate for a bug fix)
  • Ensure that your contribution follows standard accessibility guidelines. Use tools like https://webhint.io/ to validate your changes.

Additional Information

Backend-only change; npm and browser accessibility checks are not applicable. All 44 focused xUnit cases passed, covering API paging/parsing, matching and Cosmos patches, cancellation, daily scheduling, non-overlap, and managed identity recovery. The main website also builds after stub removal. Moq is added only to the existing test project for Cosmos SDK mocks.

The existing managed identity needs query/read and item-write permissions on PWABuilderPackages. Without CosmosDB configuration, the job logs a warning and remains disabled. Scheduling is per running service instance, not a distributed singleton.

Add a daily SFEdge sync in the Windows packaging service that patches matching Cosmos package records with Store product IDs. Reuse existing Cosmos configuration, handle paging and recoverable failures, and remove the unused website stub.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3f5d2c20-729b-4f33-88a9-83a30b401431
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

Thanks Judah Gabriel Himango (@JudahGabriel) for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌

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