Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .github/workflows/oci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- stable*

jobs:
phpunit-oci8:
phpunit-oci:
runs-on: ubuntu-20.04

strategy:
Expand Down Expand Up @@ -53,3 +53,21 @@ jobs:
- name: PHPUnit
working-directory: tests
run: phpunit --configuration phpunit-autotest.xml --group DB,SLOWDB

- name: Run repair steps
run: |
./occ maintenance:repair --include-expensive

summary:
permissions:
contents: none
runs-on: ubuntu-latest
needs: phpunit-oci

if: always()

name: phpunit-oci-summary

steps:
- name: Summary status
run: if ${{ needs.phpunit-oci.result != 'success' }}; then exit 1; fi
7 changes: 6 additions & 1 deletion core/Command/Maintenance/Repair.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ class Repair extends Command {
private $output;
/** @var IAppManager */
private $appManager;
/** @var bool */
protected $errored = false;

/**
* @param \OC\Repair $repair
Expand Down Expand Up @@ -109,6 +111,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int
}
}



$maintenanceMode = $this->config->getSystemValueBool('maintenance');
$this->config->setSystemValue('maintenance', true);

Expand All @@ -125,7 +129,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$this->repair->run();

$this->config->setSystemValue('maintenance', $maintenanceMode);
return 0;
return $this->errored ? 1 : 0;
}

public function handleRepairFeedBack($event) {
Expand Down Expand Up @@ -154,6 +158,7 @@ public function handleRepairFeedBack($event) {
break;
case '\OC\Repair::error':
$this->output->writeln('<error> - ERROR: ' . $event->getArgument(0) . '</error>');
$this->errored = true;
break;
}
}
Expand Down
3 changes: 2 additions & 1 deletion lib/private/AppConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

use OC\DB\Connection;
use OC\DB\OracleConnection;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\IAppConfig;
use OCP\IConfig;

Expand Down Expand Up @@ -297,7 +298,7 @@ public function setValue($app, $key, $value) {
$sql->andWhere(
$sql->expr()->orX(
$sql->expr()->isNull('configvalue'),
$sql->expr()->neq('configvalue', $sql->createNamedParameter($value))
$sql->expr()->neq('configvalue', $sql->createNamedParameter($value), IQueryBuilder::PARAM_STR)
)
);
}
Expand Down
3 changes: 2 additions & 1 deletion lib/private/Repair/NC21/ValidatePhoneNumber.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ public function getName(): string {

public function run(IOutput $output): void {
if ($this->config->getSystemValueString('default_phone_region', '') === '') {
throw new \Exception('Can not validate phone numbers without `default_phone_region` being set in the config file');
$output->warning('Can not validate phone numbers without `default_phone_region` being set in the config file');
return;
}

$numUpdated = 0;
Expand Down