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

Switching to web-executor #355

Merged
merged 3 commits into from
Jul 7, 2016
Merged

Switching to web-executor #355

merged 3 commits into from
Jul 7, 2016

Conversation

VicDeo
Copy link
Member

@VicDeo VicDeo commented Jun 13, 2016

Depends on
master

stable9.1

stable9

Right now web executor is used when update is initiated from Web UI

How to test:

  1. Install OC 9.0.3

  2. Apply [stable9] occ web executor core#25222

  3. Apply Bypass upgrade page when occ controller is requested core#25356

  4. Apply this PR

  5. Specify custom update server url in config.php:
    'updater.server.url' => 'https://domain.tld/your_update_server/',

  6. Download master or stable9 daily.

  7. Repack daily applying
    (for stable9 daily)
    [stable9] occ web executor core#25222 [Stable 9] Bypass upgrade page when occ controller is requested core#25363

    (for master daily)
    Bypass upgrade page when occ controller is requested core#25356

  8. Put repacked daily to the location your update server points to

  9. Update (from Web UI)

@mention-bot
Copy link

By analyzing the blame information on this pull request, we identified @LukasReschke, @DeepDiver1975 and @MorrisJobke to be potential reviewers

@VicDeo VicDeo changed the title Switching to web-executor [WIP] Switching to web-executor Jun 13, 2016
$request = $client->createRequest(
'POST',
// TODO Get endpoint somehow :-/
'http://localhost/~deo/oc-tmp/index.php/occ/' . $command,
Copy link
Member

Choose a reason for hiding this comment

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

bäääh ... just another chicken egg issue ....

Copy link
Member

Choose a reason for hiding this comment

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

well - we are only in web executor mode is the updater is executed from the browser.
Within the browser we know the address - right?

@@ -135,6 +134,9 @@ public function ajaxAction() {
$output->setFormatter(new HtmlOutputFormatter($formatter));

$application->setAutoExit(false);

$endpoint = preg_replace('/(updater\/|updater\/index.php)$/', '', $this->request->server('REQUEST_URI'));
Copy link
Member

Choose a reason for hiding this comment

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

I'm honestly bad with regex 🙈

Will this work for setups where index.php is not part of the url?

THX

Copy link
Member Author

Choose a reason for hiding this comment

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

@DeepDiver1975 yes. It stands for
(updater/ORupdater/index.php)EOL

@DeepDiver1975
Copy link
Member

here we go ... my long standing cry for unit test ... please

@DeepDiver1975 DeepDiver1975 added this to the 9.2-next milestone Jun 20, 2016
@DeepDiver1975
Copy link
Member

Unit tests please

@VicDeo
Copy link
Member Author

VicDeo commented Jun 27, 2016

@DeepDiver1975 tests added

@VicDeo VicDeo changed the title [WIP] Switching to web-executor Switching to web-executor Jul 5, 2016
@VicDeo
Copy link
Member Author

VicDeo commented Jul 5, 2016

@PVince81 @DeepDiver1975 not a WIP anymore, please review

@PVince81
Copy link
Contributor

PVince81 commented Jul 5, 2016

I tested with the steps above, going from a 9.0.3 tarball + patches to stable9+patches and then to 9.1.0RC1 tarball + patches.

Also I observed the access log of Apache and saw that "occ" was used over the web executor.

👍 works

@PVince81
Copy link
Contributor

PVince81 commented Jul 5, 2016

I suggest we merge this and let @davitol test with tomorrow's stable9/master dailies for easier testing.

Would still require patching of 9.0.3.

[ [ 'headers'=> [ 'HTTP_HOST'=> 'duck', 'SERVER_NAME' => 'jump'] ], 'duck' ],
[ [ 'headers'=> [ 'HTTP_X_FORWARDED_HOST'=>'go', 'HTTP_HOST'=> 'duck', 'SERVER_NAME' => 'jump'] ], 'go' ],
[ [ 'headers'=> [ 'HTTP_X_FORWARDED_HOST'=>'go,', 'HTTP_HOST'=> 'duck', 'SERVER_NAME' => 'jump'] ], 'go' ],
[ [ 'headers'=> [ 'HTTP_X_FORWARDED_HOST'=>'run,forrest,run', 'HTTP_HOST'=> 'duck', 'SERVER_NAME' => 'jump'] ], 'run' ],
Copy link
Contributor

Choose a reason for hiding this comment

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

😆

@PVince81
Copy link
Contributor

PVince81 commented Jul 5, 2016

Code looks fine, too. Great job and thanks for the detailed test steps !

@PVince81
Copy link
Contributor

PVince81 commented Jul 5, 2016

This will need to be backported to stable9 for 9.0.4.

@PVince81
Copy link
Contributor

PVince81 commented Jul 5, 2016

@DeepDiver1975 @georgehrke second review please

@georgehrke
Copy link
Contributor

Looks good except for the missing explanation of the magic regular expression

@PVince81
Copy link
Contributor

PVince81 commented Jul 5, 2016

Great! @georgehrke agreed ?

@VicDeo
Copy link
Member Author

VicDeo commented Jul 5, 2016

@PVince81 please hold on for a minute, I'm squashing history

@VicDeo
Copy link
Member Author

VicDeo commented Jul 5, 2016

@PVince81 squashed

This was referenced Jul 5, 2016
@VicDeo
Copy link
Member Author

VicDeo commented Jul 5, 2016

Stable9.1: #362
Stable9: #363

@georgehrke
Copy link
Contributor

👍

@PVince81 PVince81 merged commit c0208a8 into master Jul 7, 2016
@PVince81 PVince81 deleted the web-executor branch July 7, 2016 14:19
@PVince81
Copy link
Contributor

PVince81 commented Jul 7, 2016

QA ticket to redo a full test once the backports are merged: owncloud/QA#277

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.

5 participants