microsoft / microsoft/msstore-cli

PrepareBundleAsync just marks one existing file as pendingDelete

Open
#124 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
163
Forks
22
Avg merge
5d 6h
Merged PRs (30d)
10

Description

Before #119 the tool was just adding packages to a submission. Result is that now some of my apps have 4/5 packages.

Yesterday did a new release of one of those app with those many packages and my expectation was that it will clean up all obsolete packages with the fix in #119 . Unfortunately that didn't happen.

This morning I debugged what is going on

https://github.com/microsoft/msstore-cli/blob/be96083b324d3475381f093ad237d63a6ab53c82/MSStore.CLI/Helpers/IStorePackagedAPIExtensions.cs#L666-L687

The foreach is over new package files, that the tool have to upload. In my case this is one file. The package list in L668 contains 4 files.
Due to the FirstOrDefault it will only pick one existing file and mark that as pendingDelete. And since there is just one file upload it wont repeat this.

Question is, is this intended behavior or should we change the FirstOrDefault to a where with a foreach loop over the result?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in MSStore.CLI/Helpers/IStorePackagedAPIExtensions.cs around lines 666-687 and trace PrepareBundleAsync, focusing on the loop over new package files and the package list lookup. Confirm whether every obsolete package should be marked pendingDelete when only one new package is uploaded. Done means the intended cleanup behavior is established and the issue is resolved or documented accordingly.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.