Skip to content

Log exception when background job class not found#32623

Merged
PVince81 merged 3 commits into
masterfrom
log-job-not-found
Feb 18, 2019
Merged

Log exception when background job class not found#32623
PVince81 merged 3 commits into
masterfrom
log-job-not-found

Conversation

@tomneedham

Copy link
Copy Markdown
Contributor

Description

otherwise this goes unnoticed - when apps remove background jobs like market / ldap.

Related Issue

xxx

Motivation and Context

Unknown cron failures

How Has This Been Tested?

Not yet. @cdamken

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:

Open tasks:

  • Backport (if applicable set "backport-request" label and remove when the backport was done)

@tomneedham tomneedham added this to the development milestone Sep 6, 2018
@tomneedham tomneedham self-assigned this Sep 6, 2018
@codecov

codecov Bot commented Sep 6, 2018

Copy link
Copy Markdown

Codecov Report

Merging #32623 into master will increase coverage by 0.35%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #32623      +/-   ##
============================================
+ Coverage     64.81%   65.17%   +0.35%     
+ Complexity    18378    18352      -26     
============================================
  Files          1199     1200       +1     
  Lines         69583    69701     +118     
  Branches       1282     1283       +1     
============================================
+ Hits          45099    45425     +326     
+ Misses        24111    23902     -209     
- Partials        373      374       +1
Flag Coverage Δ Complexity Δ
#javascript 53.1% <ø> (+0.01%) 0 <ø> (ø) ⬇️
#phpunit 66.56% <100%> (+0.39%) 18352 <1> (-26) ⬇️
Impacted Files Coverage Δ Complexity Δ
lib/private/legacy/app.php 63.8% <ø> (-0.75%) 163 <0> (-17)
lib/private/Server.php 86.56% <100%> (+0.25%) 253 <0> (ø) ⬇️
lib/private/BackgroundJob/JobList.php 80.26% <100%> (+6.26%) 33 <1> (ø) ⬇️
lib/private/Setup.php 26.6% <0%> (-1%) 52% <0%> (ø)
lib/private/Installer.php 48.18% <0%> (-0.95%) 83% <0%> (-4%)
core/Controller/LostController.php 88.48% <0%> (-0.24%) 33% <0%> (ø)
lib/private/Updater.php 12.41% <0%> (-0.18%) 51% <0%> (+2%)
lib/private/legacy/api.php 40.98% <0%> (-0.17%) 85% <0%> (ø)
...ppFramework/Middleware/Security/CORSMiddleware.php 100% <0%> (ø) 13% <0%> (+1%) ⬆️
... and 38 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 1fe1e27...334bae3. Read the comment docs.

foreach ($jobs as $job) {
$queue->add($job);
}
// TODO remove jobs that no longer exist in this app version

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We appear to have no way to cleanup job that are removed during an app update

@PVince81 PVince81 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍 makes sense

this also means potential future log pollution as @cdamken found out that some apps aren't removing their jobs when disabled

@PVince81

PVince81 commented Oct 9, 2018

Copy link
Copy Markdown
Contributor

@ownclouders rebase

@ownclouders

Copy link
Copy Markdown
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

Copy link
Copy Markdown
Contributor

Automated rebase with GitMate.io was successful! 🎉

@PVince81

Copy link
Copy Markdown
Contributor

@ownclouders rebase

@ownclouders

Copy link
Copy Markdown
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 ⚠️

@PVince81 PVince81 assigned PVince81 and unassigned tomneedham Feb 12, 2019
@ownclouders

Copy link
Copy Markdown
Contributor

Automated rebase with GitMate.io was successful! 🎉

@PVince81

Copy link
Copy Markdown
Contributor

uh what...

1) Test\BackgroundJob\JobListTest::testUnknownJobLogsException
Doctrine\DBAL\Exception\NotNullConstraintViolationException: An exception occurred while executing 'INSERT INTO "oc_jobs" ("class") VALUES('wrong job title')':

ORA-01400: cannot insert NULL into ("AUTOTEST"."oc_jobs"."argument")

/drone/src/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractOracleDriver.php:49
/drone/src/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:169
/drone/src/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:145
/drone/src/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1063
/drone/src/lib/private/DB/Connection.php:207
/drone/src/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php:203
/drone/src/lib/private/DB/QueryBuilder/QueryBuilder.php:141
/drone/src/tests/lib/BackgroundJob/JobListTest.php:259
/drone/src/tests/lib/BackgroundJob/JobListTest.php:263

Caused by
Doctrine\DBAL\Driver\OCI8\OCI8Exception: ORA-01400: cannot insert NULL into ("AUTOTEST"."oc_jobs"."argument")

/drone/src/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/OCI8Exception.php:16
/drone/src/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php:372
/drone/src/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php:136
/drone/src/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1060
/drone/src/lib/private/DB/Connection.php:207
/drone/src/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php:203
/drone/src/lib/private/DB/QueryBuilder/QueryBuilder.php:141
/drone/src/tests/lib/BackgroundJob/JobListTest.php:259
/drone/src/tests/lib/BackgroundJob/JobListTest.php:263

@phil-davis

Copy link
Copy Markdown
Contributor

Backport stable10 #34723

@lock lock Bot locked as resolved and limited conversation to collaborators Mar 10, 2020
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.

4 participants