Repository navigation
Conversation
| $versionToLoad = []; | ||
| foreach ($possibleApps as $possibleApp) { | ||
| $version = self::getAppVersionByPath($possibleApp['path']); | ||
| $version = self::getAppVersionByPath($possibleApp['path'] . '/' . $appId); |
There was a problem hiding this comment.
ok got it... so $possibleApps only contains all app roots... what an unfortunately choice of variable name
| $version = self::getAppVersionByPath($possibleApp['path'] . '/' . $appId); | ||
| if (empty($versionToLoad) || version_compare($version, $versionToLoad['version'], '>')) { | ||
| $versionToLoad = [ | ||
| 'dir' => $possibleApp, |
There was a problem hiding this comment.
shouldn't $appId be appended here too ? or is "dir" supposed to be the app root only ?
There was a problem hiding this comment.
@PVince81 no, it's appended in another place
There was a problem hiding this comment.
core/lib/private/legacy/app.php
Line 580 in c8227b7
|
@tboerger can you test this patch on docker ? |
|
@VicDeo still "2 - developing" ? What's missing ? |
|
unit tests maybe ? |
|
@PVince81 exactly. not sure, how to test ;( |
|
@VicDeo figure it out... maybe integration tests would be easier to setup than unit tests against static classes ? Worst case just write down a test plan that covers all possible cases touched by this scenario |
fd1853e to
cc7ba3c
Compare
|
@PVince81 writing behat tests from scratch isn't my best skill |
|
Jenkins crapped on the first commit too, too bad. I could have pushed it directly. I'll make a separate PR with only the fix so we can merge it quickly. |
|
@SergioBertolinSG please assist @VicDeo for the integration tests. |
|
separate PR for the fix without the integration test: #28002 |
|
|
||
| Background: | ||
| Given apps are in two directories "apps" and "apps2" | ||
| @eee |
There was a problem hiding this comment.
Why this tag? the name is not enough descriptive.
There was a problem hiding this comment.
@SergioBertolinSG just for development, in order not to run all tests
|
In other words.
to notify oC about that we add the following lines into the where
if there are several instances of the same app oC always loads this app from the very first app directory instead of searching the most recent version across all copies of the app. |
|
Next steps? @VicDeo your description above is correct, could you fix the behavior meanwhile, or still some open parts? |
|
@felixboehm fixed in 10.0.2. Next step is backport |
|
@felixboehm ah. The fix was merged separately, this PR contains integration test only. |
|
Ready to review |
| 1 => ['pipe', 'w'], | ||
| 2 => ['pipe', 'w'], | ||
| ]; | ||
| $process = proc_open('php console.php ' . $args, $descriptor, $pipes, \OC::$SERVERROOT); |
There was a problem hiding this comment.
use CommandLine trait functions instead ? See runOcc()
There was a problem hiding this comment.
@PVince81 ...and get an error from Behat that you are not allowed to declare these methods twice . It's not possible ;)
There was a problem hiding this comment.
I had the same issue as in https://stackoverflow.com/questions/39607911/behat-error-step-is-already-defined and I can't remove my context from behat.xml as advised by this link.
There was a problem hiding this comment.
Did you try using the method without importing the trait ? It might work through behat magic as all contexts are loaded...
There was a problem hiding this comment.
When App "testapp" is loaded # AppManagementContext::loadApp()
Fatal error: Call to undefined method AppManagementContext::runOcc() (Behat\Testwork\Call\Exception\FatalThrowableError)
|
|
|
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. |
Attention:
The fix was merged into 10.0.2 #28002
This PR contains integration test to detect future regressions
Description
App version was loaded incorrectly
Motivation and Context
When there are several app directories the app is always loaded from the very first due to the bug in logic
How Has This Been Tested?
config.php
/1001/apps/and/1001/apps2//1001/apps2/Expected: the change is detected and the app is updated
Actual: it's not
/1001/apps/just to be sure it doesn't break anythingExpected & Actual: the change is detected and the app is updated
Types of changes
Checklist:
P.S. Writing a test for this piece of code is quite painful