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

No max version check for apps when using release channel git or daily #33360

Conversation

DeepDiver1975
Copy link
Member

@DeepDiver1975 DeepDiver1975 commented Oct 30, 2018

Description

When installing owncloud from git or the daily release tar ball the max version requirement is no longer checked when installing/enabling apps

This will help with the development and release of apps in general

@patrickjahns as discussed long time back - we did go for the release channel and no env variable.

Related Issue

How Has This Been Tested?

  • enable an app with max version lower then 11.0
  • see if being enabled

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

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.

see review. also CI unhappy.

@@ -312,7 +312,7 @@ private function analyzeOC(array $dependencies, array $appInfo) {
$missing[] = (string)$this->l->t('ownCloud %s or higher is required.', $minVersion);
}
}
if ($maxVersion !== null) {
if ($maxVersion !== null && !\in_array(\OCP\Util::getChannel(), ['git', 'daily'])) {
Copy link
Contributor

Choose a reason for hiding this comment

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

we usually add , true at the end of in_array for strict comparison.
wonder if our style checkers can verify this

@@ -936,6 +936,7 @@ public static function isAppCompatible($ocVersion, $appInfo) {
}

if (!empty($requireMax)
&& !\in_array(\OCP\Util::getChannel(), ['git', 'daily'])
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

@DeepDiver1975 DeepDiver1975 force-pushed the feature/ignore-max-version-check-on-git-and-daily-release-channel branch from b54f892 to 176a3a4 Compare October 30, 2018 15:08
@codecov
Copy link

codecov bot commented Oct 30, 2018

Codecov Report

Merging #33360 into master will increase coverage by 16.18%.
The diff coverage is 52.54%.

Impacted file tree graph

@@              Coverage Diff              @@
##             master   #33360       +/-   ##
=============================================
+ Coverage     47.88%   64.06%   +16.18%     
- Complexity        0    18277    +18277     
=============================================
  Files           109     1190     +1081     
  Lines         10448    69044    +58596     
  Branches       1271     1271               
=============================================
+ Hits           5003    44234    +39231     
- Misses         5075    24440    +19365     
  Partials        370      370
Flag Coverage Δ Complexity Δ
#javascript 52.88% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 65.36% <52.54%> (+28.44%) 18277 <27> (+18277) ⬆️
Impacted Files Coverage Δ Complexity Δ
lib/base.php 5.98% <0%> (ø) 125 <0> (?)
lib/private/Repair/Apps.php 7.28% <0%> (ø) 44 <0> (?)
lib/private/App/DependencyAnalyzer.php 97.26% <100%> (ø) 60 <0> (?)
lib/private/Server.php 86.3% <100%> (ø) 253 <0> (?)
lib/private/Installer.php 49.12% <100%> (ø) 87 <0> (?)
lib/private/App/AppManager.php 85.84% <100%> (ø) 83 <6> (?)
lib/private/legacy/app.php 65.72% <42.85%> (ø) 182 <11> (?)
lib/private/App/Platform.php 37.5% <45.45%> (ø) 11 <10> (?)
apps/files_external/lib/config.php 16.39% <0%> (-22.5%) 13% <0%> (+13%)
apps/updatenotification/templates/admin.php 0% <0%> (ø) 0% <0%> (?)
... and 1081 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 0aacf9e...a570d37. Read the comment docs.

@DeepDiver1975 DeepDiver1975 force-pushed the feature/ignore-max-version-check-on-git-and-daily-release-channel branch 2 times, most recently from 23da368 to 7e8e859 Compare October 31, 2018 10:38
@DeepDiver1975
Copy link
Member Author

@ownclouders rebase

@ownclouders
Copy link
Contributor

Hey! I'm GitMate.io! This pull request is being rebased automatically. Please DO NOT push while rebase is in progress or your changes would be lost permanently ⚠️

@ownclouders ownclouders force-pushed the feature/ignore-max-version-check-on-git-and-daily-release-channel branch from 7e8e859 to 7a2dd6c Compare November 2, 2018 08:30
@ownclouders
Copy link
Contributor

Automated rebase with GitMate.io was successful! 🎉

@DeepDiver1975
Copy link
Member Author

@ownclouders rebase

@ownclouders
Copy link
Contributor

Hey! I'm GitMate.io! This pull request is being rebased automatically. Please DO NOT push while rebase is in progress or your changes would be lost permanently ⚠️

@ownclouders ownclouders force-pushed the feature/ignore-max-version-check-on-git-and-daily-release-channel branch from 7a2dd6c to 49cf33f Compare November 2, 2018 10:51
@ownclouders
Copy link
Contributor

Automated rebase with GitMate.io was successful! 🎉

@DeepDiver1975 DeepDiver1975 force-pushed the feature/ignore-max-version-check-on-git-and-daily-release-channel branch 3 times, most recently from 65a741f to 6b3eb0f Compare November 2, 2018 15:18
@@ -239,7 +245,7 @@ public static function isType($app, $types) {
}
$appTypes = self::getAppTypes($app);
foreach ($types as $type) {
if (\array_search($type, $appTypes) !== false) {
if (\array_search($type, $appTypes, true)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

for some strange reason, received shares don't appear in this PR.

Reverting this line to its previous state makes it work.

Maybe this disturbs the loading of apps by types and files_sharing maybe doesn't load at the right moment.

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.

Rechecked the code, looks good now 👍

@DeepDiver1975
Copy link
Member Author

@PVince81 I just added 3 more type safety fixes - will squash after CI being green ... THX

@DeepDiver1975 DeepDiver1975 force-pushed the feature/ignore-max-version-check-on-git-and-daily-release-channel branch from fed93b2 to a570d37 Compare November 2, 2018 16:51
@DeepDiver1975 DeepDiver1975 merged commit a7cfcab into master Nov 5, 2018
@DeepDiver1975 DeepDiver1975 deleted the feature/ignore-max-version-check-on-git-and-daily-release-channel branch November 5, 2018 07:19
@PVince81
Copy link
Contributor

PVince81 commented Dec 7, 2018

seems we missed some bits #33819

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.

Ability to skip max-version check in core for testing beta apps
4 participants