sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

Handle SPFx updates better

Open shaipetel opened this issue 9 years ago • 5 comments

Category

  • [ ] Question
  • [ ] Typo
  • [ ] Bug
  • [x] Enhancement / Suggestion
  • [ ] Additional article idea

Expected or Desired Behavior

As a software vendor, I would like to be able to push updates to my apps seamlessly by simply publishing the update to my CDN, flipping a switch and that's it - all my customers should now have the updates running.

Observed Behavior

In SPFx, every change you make in the code results in a new bundle file name. Which means even if you fix only a typo or spelling mistake - your customers will have to install a new package to their catalog in order to get the fix.

Furthermore, even if you tweak the build process not to include the file hash in the bundle JS file name, any change to your web part "import" or "require" might change the web part definition JSON file. (for instance: add import { PageContext } from '@microsoft/sp-page-context'; to one of your TS files) The JSON file is actually loaded from inside the package and not from the vendor's CDN at all - meaning again, some changes would require the customer to manually install a new version.

Installing a new version is no picnic either. You have to have access to the catalog, you also have to know there is a new version out and some vendors like us will sometimes have 1-2 versions coming out per month. With app cycles becoming shorter - updates are much more frequent. When you do update a package, the update process is buggy as well (see issue https://github.com/SharePoint/sp-dev-docs/issues/550)

Recommendations / ask

I propose either one of two things to handle this issue before everyone go live with SPFx and it becomes a bigger problem:

Option 1

Consider allowing storing the JSON file in the CDN. The app will run a scheduled task once in a while that will "look for updates" automatically, essentially checking if the JSON file changed and taking the new file from the CDN. Not found? No harm done, since probably the CDN is down and the web part won't work anyways since the JS file won't be available as well...

Option 2

Implement a "check for updates" mechanism for SPFx components, and prompt the admin when updates are available. That would be hard to do without a main store, of course.

Thoughts? Comments? Anyone at the stage of about to release an SPFx product must have encountered this situation already, are you happy with the way it is now? Sound off!

shaipetel avatar May 01 '17 15:05 shaipetel

@mcmynn83 can you perhaps comment on this as well?

shaipetel avatar May 01 '17 21:05 shaipetel

That is currently by design. The tenant admin app catalog has not being designed for the flow you are describing which is more "I go to a local place (e.g. Marketplace) where the end user / Tenant Admin is able to buy and make available a solution to users in the tenancy".

Both of the approaches you mentioned are something we will absolutely keep in mind as part of our Store / Marketplace story.

lucaband avatar May 01 '17 23:05 lucaband

All I am worried about is, keep bothering our customers IT department to constantly go back to the catalog and deploy new versions.

remember, 10 years ago people constantly had to go to the iPhone app store to hit update on apps they currently have installed. Today, who cares? If I installed an app, give me updates automatically. Most of our support cases are issues that were already fixed and published but they never updated the app.

Just some food for thought...

shaipetel avatar May 02 '17 15:05 shaipetel

Thank you for the feedback. Please add a feature request on UserVoice and depending on community interest we may or may not be able to make the fix.

ghost avatar Mar 19 '18 23:03 ghost

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

msft-github-bot avatar Jan 29 '20 12:01 msft-github-bot