Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor the app to allow choosing between next minor and major update #391

Merged
merged 8 commits into from
Nov 16, 2018

Conversation

VicDeo
Copy link
Member

@VicDeo VicDeo commented Aug 28, 2018

Summary

Core upgrade (this part depends on owncloud/core#32491 that is still WIP)

  • major (10 to 11 and like this) still DOES upgrade apps from 1.0 to 2.0 (if available)
  • minor (10 to 10.1 and like this) does NOT apps upgrade from 1.0 to 2.0

CLI

  • market:upgrade still DOES upgrade 1.0 to 1.1
  • market:upgrade does NOT upgrade 1.0 to 2.0
  • market:upgrade --major DOES upgrade 1.0 to 2.0
  • market:install does NOT upgrade 1.0 to 2.0 if the app is already installed
  • market:install still DOES upgrade 1.0 to 1.1 if the app is already installed

Market app Web UI

  • Shows both 1.1 and 2.0 for 1.0, 1.1 is default

Market app cron job

  • Generates notifications both for 1.1 and 2.0

Screenshots

Updates tab

newupdatespage

App Page

apppage

TODO

  • add --major option to CLI market:upgrade command
  • do not allow update to major releases with CLI market:install command
  • switch to major version of the app only in case there is a core major update is happening
    (Depends on Pass an additional parameter on the core update core#32491)
  • Update app UI to show both minor and major updates
  • Allow update both to major and minor versions from UI

0.3.5 to 0.3.5

deo@jah-mobile:> php occ market:upgrade --local ../customgroups.tar.gz 
customgroups: ../customgroups.tar.gz has the same or older version of the app

0.3.5 to 1.3.5 (no --major)

deo@jah-mobile:> php occ market:upgrade --local ../customgroups.tar.gz 
customgroups: ../customgroups.tar.gz has a different major version, try with --major option

0.3.5 to 1.3.5 (with --major)

deo@jah-mobile:> php occ market:upgrade --local ../customgroups.tar.gz --major
customgroups: Installing new version from ../customgroups.tar.gz

after the merge

  • Documentation needs to be updated

@VicDeo VicDeo added this to the development milestone Aug 28, 2018
@VicDeo VicDeo self-assigned this Aug 28, 2018
@codecov-io
Copy link

codecov-io commented Aug 28, 2018

Codecov Report

Merging #391 into master will increase coverage by 11.81%.
The diff coverage is 59.46%.

Impacted file tree graph

@@              Coverage Diff              @@
##             master     #391       +/-   ##
=============================================
+ Coverage     41.03%   52.84%   +11.81%     
- Complexity      229      278       +49     
=============================================
  Files            15       17        +2     
  Lines           775      931      +156     
=============================================
+ Hits            318      492      +174     
+ Misses          457      439       -18
Impacted Files Coverage Δ Complexity Δ
lib/Listener.php 0% <0%> (ø) 4 <2> (ø) ⬇️
lib/Application.php 0% <0%> (ø) 11 <0> (+2) ⬆️
lib/Controller/MarketController.php 0% <0%> (ø) 42 <6> (+4) ⬆️
lib/Command/UpgradeApp.php 98.11% <100%> (+0.93%) 26 <6> (+8) ⬆️
lib/Command/InstallApp.php 97.5% <100%> (+0.67%) 19 <4> (+4) ⬆️
lib/HttpService.php 47.95% <47.95%> (ø) 29 <29> (?)
lib/MarketService.php 52.23% <59.87%> (+28.83%) 90 <62> (-10) ⬇️
lib/VersionHelper.php 72% <72%> (ø) 10 <10> (?)
lib/CheckUpdateBackgroundJob.php 98.21% <75%> (-1.79%) 15 <0> (+2)
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eae34a3...79d1a44. Read the comment docs.

lib/MarketService.php Outdated Show resolved Hide resolved
@PVince81
Copy link
Contributor

we'll also need the --major for occ market:update which I guess will use the same methods ?

@VicDeo
Copy link
Member Author

VicDeo commented Oct 23, 2018

Build is failing due to a version bump in core:

App "Market" cannot be installed because the following dependencies are not
fulfilled: ownCloud 10.1 or lower is required.

@PVince81
Copy link
Contributor

set max-version to 11.0.0.0 for now

@VicDeo
Copy link
Member Author

VicDeo commented Oct 24, 2018

given that I am not an
UI expert I appreciate if someone explains how this pages should look like if we have both minor an major updates...

Updates
updatesui

App page
apppageui

@PVince81
Copy link
Contributor

@felixheidecke any thoughts ?

We could split the "Update info" column into three:

  • Installed version
  • Minor update target
  • Major update target

Might then need two buttons, or make the update target clickable to select which one to update to.

Or a dropdown to select the version ?

@PVince81
Copy link
Contributor

and now I realize that whatever the UX will be it will have an impact on the info that the controller endpoints must return...

@VicDeo
Copy link
Member Author

VicDeo commented Oct 28, 2018

@PVince81 it has even more impact than you can imagine ;)
market:upgrade --list
updated to the following output

deo@jah-mobile:~> php occ market:upgrade --list
admin_audit : minor:0.9.0, major:1.0.1
enterprise_key : minor:0.1.4
onlyoffice : minor:1.4.0, major:2.0.3
theme-enterprise : major:2.0.2
windows_network_drive : minor:0.7.1

I managed to pass both versions to frontend and display them
screenshot_20181029_000849

Imo for two candidates the right side should mutate into the HTML select element

@PVince81
Copy link
Contributor

@VicDeo go for it :-D

Hint: https://getuikit.com/v2/docs/dropdown.html

@VicDeo VicDeo force-pushed the minor-first branch 2 times, most recently from e6931d6 to 473c395 Compare October 29, 2018 17:24
@VicDeo
Copy link
Member Author

VicDeo commented Oct 29, 2018

@PVince81 another questionable thing is market:install command. It updates the app if it is already installed.
As market:install --major looks pretty non-sense IMHO it should refuse to operate on major versions. what do you think?

@PVince81
Copy link
Contributor

@VicDeo if market:install is only doing installations and not updates, then the switch --major doesn't make sense as there is no local version. Installing an app should always return the latest version I guess.

Is there a possibility to specify a version number to install like with Linux package managers ?

@VicDeo
Copy link
Member Author

VicDeo commented Oct 30, 2018

@PVince81 >Is there a possibility to specify a version number to install like with Linux package managers ?

no, it installs the most recent, or updates to the most recent if the app is already installed.

@VicDeo VicDeo force-pushed the minor-first branch 3 times, most recently from 075fc2e to a5663c6 Compare November 1, 2018 21:23
@VicDeo
Copy link
Member Author

VicDeo commented Nov 5, 2018

@PVince81 it's hard to say as I still suck in the frontend part :(

@PVince81
Copy link
Contributor

PVince81 commented Nov 5, 2018

@VicDeo you can get some advice from @felixheidecke in the chat

@VicDeo
Copy link
Member Author

VicDeo commented Nov 5, 2018

@PVince81 @felixheidecke I updated the PR description with a new look for Updates tab

I appreciate the advice on the app details tab given that both releases could have missing dependencies section here...
appdetails

@VicDeo
Copy link
Member Author

VicDeo commented Nov 5, 2018

What would be correct to use from the point of UI here, radiobutton?

@felixheidecke
Copy link
Contributor

What would be correct to use from the point of UI here, radiobutton?

I am missing the context here. Is it in regard to the screenshot above? What is to be chosen?

@VicDeo
Copy link
Member Author

VicDeo commented Nov 6, 2018

@felixheidecke the context is providing two versions for update: minor and major,
see #387 for more details

@felixheidecke
Copy link
Contributor

The dropdowns in the screenshot in the very first post look good. Don't they suffice?

@VicDeo VicDeo changed the title Process an additional parameter on core update Refactor the app to allow choose between next minor and major update Nov 9, 2018
@VicDeo VicDeo changed the title Refactor the app to allow choose between next minor and major update Refactor the app to allow choosing between next minor and major update Nov 9, 2018
Copy link
Contributor

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good in general. See a few comments.

lib/Command/InstallApp.php Show resolved Hide resolved
lib/HttpService.php Show resolved Hide resolved
tests/unit/HttpServiceTest.php Outdated Show resolved Hide resolved
tests/unit/HttpServiceTest.php Show resolved Hide resolved
@VicDeo
Copy link
Member Author

VicDeo commented Nov 13, 2018

@PVince81 answered everywhere

Copy link
Contributor

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@PVince81 PVince81 merged commit 9c374dc into master Nov 16, 2018
@PVince81 PVince81 deleted the minor-first branch November 16, 2018 10:52
@davitol
Copy link

davitol commented Nov 22, 2018

In this scenario:

screen shot 2018-11-22 at 10 19 00

Do we feel OK with the text shown? Is it clear enough for an admin?

password_policy: No compatible version for password_policy

screen shot 2018-11-22 at 10 19 55

(cc @pmaier1 )

@pmaier1
Copy link
Contributor

pmaier1 commented Nov 22, 2018

Do we feel OK with the text shown? Is it clear enough for an admin?

When exactly is this message shown? Only when there's a requirement for --major to be able to upgrade the app or also when there is no later version available at all or when the version is simply not compatible with the core version (not because of a major app update)? Anything else?

@PVince81 PVince81 modified the milestones: development, QA Nov 22, 2018
@PVince81
Copy link
Contributor

let's clarify UX and messages in #416

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants