Skip to content

on ownCloud upgrade: upgrade all apps in order, load important ones - #13865

Closed
blizzz wants to merge 6 commits into
masterfrom
app-upgrade-order
Closed

blizzz wants to merge 6 commits into
masterfrom
app-upgrade-order

Conversation

@blizzz

@blizzz blizzz commented Feb 3, 2015

Copy link
Copy Markdown
Contributor

Fix for #12801 as suggested in #12801 (comment)

Did not test yet, open for discussion. We should make updating right this time and don't run into regressions. We were almost stumbling about a similar issue for OC 8, and at least one is still existing in OC 7.

What do you think @PVince81 @DeepDiver1975 @icewind1991 @LukasReschke

@blizzz blizzz added this to the 8.0.1-next-maintenance milestone Feb 3, 2015
Comment thread lib/private/updater.php Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

❓

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Any other app will go in that array in line 320

@PVince81

PVince81 commented Feb 4, 2015

Copy link
Copy Markdown
Contributor

The code looks good. Curious to find out whether the LDAP upgrade you tested yesterday would work with this fix ?

Also, how critical is it to get this on OC 8 too ? There is some risk of regression so I guess 8.0.1 is ok to give more time for testing.

@PVince81

PVince81 commented Feb 4, 2015

Copy link
Copy Markdown
Contributor

If it works, can you also add a unit test ?
You can use the AppConfig mock approach that was used here to mock app config/types: https://github.com/owncloud/core/blob/master/tests/lib/app.php#L389

@blizzz

blizzz commented Feb 4, 2015

Copy link
Copy Markdown
Contributor Author

The code looks good. Curious to find out whether the LDAP upgrade you tested yesterday would work with this fix ?

Will do a test today. But it should, sharing is filesystem-type, so LDAP should be up to date and running when sharing's turn comes.

Also, how critical is it to get this on OC 8 too ? There is some risk of regression so I guess 8.0.1 is ok to give more time for testing.

We should check whether there are any other update routines that require user or file access. If so, they need to be changed (like we did with encryption) or we need this. I prefer to have it for 8.0.1 earliest in order to have some time for testing.

@PVince81

PVince81 commented Feb 5, 2015

Copy link
Copy Markdown
Contributor

@blizzz doesn't seem to work.

I setup an OC 6 and enabled many apps (LDAP, calendar, contacts, antivirus, impress, text editor, etc)
Then I upgraded to stable7 + this patch applied.

The upgrade page would show "upgrading" with a few steps (but no apps) and then suddenly it goes back to the update page and I have to click again. It never finishes.

When I switched back to "stable7" the update went through and I saw calendar, contact apps being upgraded too.

Maybe something wrong with the foreach:

{"reqId":"54d3a5799573e","app":"core","message":"starting upgrade from 7.0.4.2 to 7.0.4.2","level":0,"time":"2015-02-05T17:16:41+00:00","method":"GET","url":"\/owncloud\/core\/ajax\/update.php?requesttoken=3478b391ec1d506c90a9"}
{"reqId":"54d3a5799573e","app":"PHP","message":"file_put_contents(\/srv\/www\/htdocs\/owncloud\/.htaccess): failed to open stream: Permission denied at \/srv\/www\/htdocs\/owncloud\/lib\/private\/setup.php#253","level":0,"time":"2015-02-05T17:16:41+00:00","method":"GET","url":"\/owncloud\/core\/ajax\/update.php?requesttoken=3478b391ec1d506c90a9"}
{"reqId":"54d3a5799573e","app":"PHP","message":"Invalid argument supplied for foreach() at \/srv\/www\/htdocs\/owncloud\/lib\/private\/updater.php#331","level":0,"time":"2015-02-05T17:16:46+00:00","method":"GET","url":"\/owncloud\/core\/ajax\/update.php?requesttoken=3478b391ec1d506c90a9"}
{"reqId":"54d3a5799573e","app":"user_ldap","message":"No group filter is specified, LDAP group feature will not be used.","level":1,"time":"2015-02-05T17:16:46+00:00","method":"GET","url":"\/owncloud\/core\/ajax\/update.php?requesttoken=3478b391ec1d506c90a9"}
{"reqId":"54d3a5799573e","app":"PHP","message":"Cannot modify header information - headers already sent at \/srv\/www\/htdocs\/owncloud\/lib\/private\/user\/session.php#240","level":0,"time":"2015-02-05T17:16:46+00:00","method":"GET","url":"\/owncloud\/core\/ajax\/update.php?requesttoken=3478b391ec1d506c90a9"}
{"reqId":"54d3a5799573e","app":"PHP","message":"Cannot modify header information - headers already sent at \/srv\/www\/htdocs\/owncloud\/lib\/private\/user\/session.php#241","level":0,"time":"2015-02-05T17:16:46+00:00","method":"GET","url":"\/owncloud\/core\/ajax\/update.php?requesttoken=3478b391ec1d506c90a9"}
{"reqId":"54d3a5799573e","app":"PHP","message":"Cannot modify header information - headers already sent at \/srv\/www\/htdocs\/owncloud\/lib\/private\/user\/session.php#242","level":0,"time":"2015-02-05T17:16:46+00:00","method":"GET","url":"\/owncloud\/core\/ajax\/update.php?requesttoken=3478b391ec1d506c90a9"}
{"reqId":"54d3a5799573e","app":"PHP","message":"Cannot modify header information - headers already sent at \/srv\/www\/htdocs\/owncloud\/lib\/private\/user\/session.php#245","level":0,"time":"2015-02-05T17:16:46+00:00","method":"GET","url":"\/owncloud\/core\/ajax\/update.php?requesttoken=3478b391ec1d506c90a9"}
{"reqId":"54d3a5799573e","app":"PHP","message":"Cannot modify header information - headers already sent at \/srv\/www\/htdocs\/owncloud\/lib\/private\/user\/session.php#246","level":0,"time":"2015-02-05T17:16:46+00:00","method":"GET","url":"\/owncloud\/core\/ajax\/update.php?requesttoken=3478b391ec1d506c90a9"}
{"reqId":"54d3a5799573e","app":"PHP","message":"Cannot modify header information - headers already sent at \/srv\/www\/htdocs\/owncloud\/lib\/private\/user\/session.php#247","level":0,"time":"2015-02-05T17:16:46+00:00","method":"GET","url":"\/owncloud\/core\/ajax\/update.php?requesttoken=3478b391ec1d506c90a9"}

@PVince81

PVince81 commented Feb 5, 2015

Copy link
Copy Markdown
Contributor

I debugged a bit and it seems that the "documents" app isn't upgrading.
Got it, the "other" stack is broken. Will push a quickfix.

@PVince81

PVince81 commented Feb 5, 2015

Copy link
Copy Markdown
Contributor

With the commit I just pushed the update to stable7 worked properly (I applied it there too). Shares and reshares are also still there, no suspicious storage entry.

  • add unit tests

@PVince81

PVince81 commented Feb 5, 2015

Copy link
Copy Markdown
Contributor

after that I updated to this branch and it also worked.

Note that the orginal issue might not be reproducible on the OC 7 -> OC 8 upgrade path because the files_sharing code that bugged isn't triggered (that was the code to convert the "Shared" folder to a regular folder for all users)

@PVince81

PVince81 commented Feb 5, 2015

Copy link
Copy Markdown
Contributor

@schiesbn ^

@PVince81

PVince81 commented Feb 6, 2015

Copy link
Copy Markdown
Contributor

Fixes encryption key migration: #13950

@PVince81

PVince81 commented Feb 9, 2015

Copy link
Copy Markdown
Contributor

So as discussed with @blizzz unit testing this is close to impossible due to the static classes.
And we need a backportable fix.

@PVince81

PVince81 commented Feb 9, 2015

Copy link
Copy Markdown
Contributor

So how do we proceed ? I'd say merge for now, as unit tests are not possible.
My tests were positive so far. I even did a local backport to OC 7 which seemed to run fine.

👍

@PVince81

PVince81 commented Feb 9, 2015

Copy link
Copy Markdown
Contributor

Maybe @jnfrmarks can also help testing

@blizzz

blizzz commented Feb 9, 2015

Copy link
Copy Markdown
Contributor Author

Yes, I by accident posted to comments into the related issue instead of here: #12801 (comment) #12801 (comment) but basically @PVince81 summed it up.

And one more tester is needed.

@karlitschek

Copy link
Copy Markdown
Contributor

@jnfrmarks is not available the next few days.

@PVince81

Copy link
Copy Markdown
Contributor

@icewind1991 @MorrisJobke can you help testing ? Thanks.

@DeepDiver1975

Copy link
Copy Markdown
Contributor

Can we please spend a few minutes on how to unit test this class?

It's critical class and has to be unit tested - THX

@blizzz

blizzz commented Feb 19, 2015

Copy link
Copy Markdown
Contributor Author

As discussed with @DeepDiver1975 this PR will be postponed, because the refactoring also conflicts with #14282. Instead we will for now port the OC 8.0 fix (#14041) to master, and eventually i will continue to work on it based on what's left from here.

@PVince81

PVince81 commented Mar 2, 2015

Copy link
Copy Markdown
Contributor

#14282 was merged so it might be possible to continue this, if needed

@jancborchardt jancborchardt modified the milestones: Maybe someday, backlog Mar 23, 2015
@MorrisJobke

Copy link
Copy Markdown
Contributor

@PVince81 @blizzz Is this still a valid PR or was is replace by all the other cross referenced PRs?

@blizzz

blizzz commented Jun 5, 2015

Copy link
Copy Markdown
Contributor Author

It's WIP, i needed to let go of it for 8.1.

@MorrisJobke

Copy link
Copy Markdown
Contributor

@blizzz Do we want to split stuff out of this? To get some of your work into core? Maybe in smaller pieces? Would be nice to not lose this.

@blizzz

blizzz commented Aug 30, 2015

Copy link
Copy Markdown
Contributor Author

That was the problem – i only intended to change a little piece, but this is knit together, I am afraid this needs such a big and complete deed.

@DeepDiver1975

Copy link
Copy Markdown
Contributor

@blizzz do we want to revive this one? 🙊

@blizzz

blizzz commented Feb 3, 2016

Copy link
Copy Markdown
Contributor Author

@DeepDiver1975 actually, with the overhaul of the updater, I don't know whether this is all still applicable.

@DeepDiver1975

Copy link
Copy Markdown
Contributor

meanwhile we have the app manager in core - no idea if interfaces match up .... rebase is a pain.

Let's extract 1a6d61e and see where we are going ...

@DeepDiver1975

Copy link
Copy Markdown
Contributor

this is already in master -> close

@DeepDiver1975
DeepDiver1975 deleted the app-upgrade-order branch February 22, 2016 20:20
@lock

lock Bot commented Aug 7, 2019

Copy link
Copy Markdown

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock Bot locked as resolved and limited conversation to collaborators Aug 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants