Skip to content

Do not update apps if it comes from git - #7505

Merged
MorrisJobke merged 2 commits into
masterfrom
do-not-update-if-app-comes-from-git
Dec 18, 2017
Merged

Do not update apps if it comes from git#7505
MorrisJobke merged 2 commits into
masterfrom
do-not-update-if-app-comes-from-git

Conversation

@skjnldsv

@skjnldsvskjnldsv commented Dec 14, 2017

Copy link
Copy Markdown
Member

We had a lot of issues as devs by those auto update...

Fixes#7011

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>

if ($this->isInstalledFromGit($appId) === true) {
return false;
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could we move this check one up ... just to return earlier in the method?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Of course!

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>

@MorrisJobkeMorrisJobke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tested and works 👍

@rullzerrullzer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Works for the 99% use case for me! Lets do this.

@ChristophWurst

Copy link
Copy Markdown
Member

What happens if a developer accidentally packages the .git dir? Does that mean the app will never be updated again? 🙈

@MorrisJobkeMorrisJobke added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Dec 14, 2017
@skjnldsv

Copy link
Copy Markdown
MemberAuthor

@ChristophWurst Yup!
We should add a test in the appstore for that I think! :)

@MorrisJobke

Copy link
Copy Markdown
Member

We should add a test in the appstore for that I think! :)

nextcloud/appstore#537

@codecov

codecovBot commented Dec 14, 2017

Copy link
Copy Markdown

Codecov Report

Merging #7505 into master will increase coverage by 0.05%.
The diff coverage is 75%.

@@ Coverage Diff @@## master #7505 +/- ##
============================================
+ Coverage 51.11% 51.16% +0.05% + Complexity 24903 24868 -35 
============================================
Files 1601 1601 Lines 94778 94691 -87 Branches 1368 1368 ============================================
+ Hits 48445 48452 +7 + Misses 46333 46239 -94
Impacted FilesCoverage ΔComplexity Δ
lib/private/Installer.php58.17% <75%> (+0.52%)77 <2> (+3)⬆️
apps/files_trashbin/lib/Expiration.php90.32% <0%> (-1.62%)29% <0%> (ø)
lib/private/Server.php80.9% <0%> (-0.12%)134% <0%> (ø)
...rver_connector/composer/composer/autoload_real.php0% <0%> (ø)9% <0%> (-2%)⬇️
...pps/encryption/composer/composer/autoload_real.php0% <0%> (ø)9% <0%> (-2%)⬇️
...files_versions/composer/composer/autoload_real.php0% <0%> (ø)9% <0%> (-2%)⬇️
apps/oauth2/composer/composer/autoload_real.php0% <0%> (ø)9% <0%> (-2%)⬇️
.../files_sharing/composer/composer/autoload_real.php0% <0%> (ø)9% <0%> (-2%)⬇️
...tenotification/composer/composer/autoload_real.php0% <0%> (ø)9% <0%> (-2%)⬇️
apps/testing/composer/composer/autoload_real.php0% <0%> (ø)9% <0%> (-2%)⬇️
... and 14 more

@skjnldsv

Copy link
Copy Markdown
MemberAuthor

We could also refuse to install an app if it has a .git in it ;)

@MorrisJobke

Copy link
Copy Markdown
Member

What happens if a developer accidentally packages the .git dir? Does that mean the app will never be updated again? 🙈

@ChristophWurst@skjnldsv Another idea: only reject this if the nextcloud itself is also a git clone (update channel === git) 😉

@MorrisJobke

Copy link
Copy Markdown
Member

@BernhardPosselt Mentioned that we maybe should also add checks for other typical VCS systems and have a blacklist:

  • SVN
  • HG
  • bazaar
  • git

Anything else?

@skjnldsv

Copy link
Copy Markdown
MemberAuthor

@ChristophWurst@skjnldsv Another idea: only reject this if the nextcloud itself is also a git clone (update channel === git) 😉

@MorrisJobke I would say no, because I sometimes uses default apps without using their git repo :)

@jancborchardt

Copy link
Copy Markdown
Member

cc @Henni for review as he also had this issue :)

@MorrisJobke

Copy link
Copy Markdown
Member

Okay - let's go for the .git folder for now and check if this is already enough.

@MorrisJobke
MorrisJobke merged commit 97f80f5 into masterDec 18, 2017
@MorrisJobke
MorrisJobke deleted the do-not-update-if-app-comes-from-git branch December 18, 2017 12:44
@MorrisJobkeMorrisJobke mentioned this pull request Jan 2, 2018
30 tasks
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to releaseReady to be released and/or waiting for tests to finishfeature: apps managementhightechnical debt🧱 🤔🚀

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@skjnldsv@ChristophWurst@MorrisJobke@jancborchardt@rullzer