Skip to content

Deprecated ILogger from IJob - #33047

Merged
CarlSchwan merged 3 commits into
masterfrom
fix/ijob-logger-deprecated
Aug 23, 2022
Merged

Deprecated ILogger from IJob#33047
CarlSchwan merged 3 commits into
masterfrom
fix/ijob-logger-deprecated

Conversation

@CarlSchwan

@CarlSchwanCarlSchwan commented Jun 28, 2022

Copy link
Copy Markdown
Member

Since the ILogger will be soon removed we need to ensure that nothing in
the public API use it.

  • Add start to replace execute but without ILogger
  • execute still exists but only call start internally
  • Use more OCP interface for background job
  • Fix a lot of warning in tests related to background jobs

@CarlSchwanCarlSchwan added the 3. to review Waiting for reviews label Jun 28, 2022
@CarlSchwanCarlSchwan added this to the Nextcloud 25 milestone Jun 28, 2022
@CarlSchwan
CarlSchwan requested a review from come-ncJune 28, 2022 10:10
@CarlSchwanCarlSchwan self-assigned this Jun 28, 2022
Comment threadlib/public/BackgroundJob/Job.php Fixed
Comment threadapps/federation/lib/BackgroundJob/GetSharedSecret.php Fixed
Comment threadapps/user_ldap/lib/Jobs/Sync.php Fixed
Comment threadapps/federation/lib/BackgroundJob/GetSharedSecret.php Fixed
$this->logger->error(
'remote server "' . $target . '"" does not return a valid shared secret. Received data: ' . $body,
['app' => 'federation']
'remote server "' . $target . '"" does not return a valid shared secret. Received data: ' . $body,

Check notice

Code scanning / Psalm

PossiblyInvalidOperand

Cannot concatenate with a resource|string
@CarlSchwan
CarlSchwanforce-pushed the fix/ijob-logger-deprecated branch from 7d91d1d to 73b41e8CompareJune 28, 2022 11:45
Comment threadlib/public/BackgroundJob/QueuedJob.php Outdated
@come-nc

Copy link
Copy Markdown
Contributor

❤️

@CarlSchwan
CarlSchwanforce-pushed the fix/ijob-logger-deprecated branch 3 times, most recently from 6721a06 to b700c8bCompareJune 29, 2022 12:40
@ChristophWurst

Copy link
Copy Markdown
Member

Since the ILogger will be soon

It will? 🎉

@ChristophWurstChristophWurst 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.

Lots of good cleanup

Personally I would prefer if the PR only touched the logger aspects if that is what title and subscription say. E.g. background job OC to OCP kinda feels sneaked in.

But I understand it's easier this way, so 👍 and 🤞

@CarlSchwan

Copy link
Copy Markdown
MemberAuthor

Since the ILogger will be soon

It will? tada

still one year to wait since we need to wait 3 years after it has been deprecated, but since execute(...., ILogger) was for some app the only reasons why ILogger was still used, this should make it easier to get rid of it as soon as the 3 years are over.

@CarlSchwan
CarlSchwanforce-pushed the fix/ijob-logger-deprecated branch from b700c8b to f512492CompareJune 29, 2022 13:02
Comment threadapps/federation/lib/BackgroundJob/GetSharedSecret.php Fixed
@CarlSchwan
CarlSchwanforce-pushed the fix/ijob-logger-deprecated branch from f512492 to dcbc9d1CompareJune 29, 2022 13:12
@CarlSchwan
CarlSchwanforce-pushed the fix/ijob-logger-deprecated branch 3 times, most recently from af33a00 to 3c7280aCompareJuly 14, 2022 13:31
@github-actions

Copy link
Copy Markdown
Contributor

Possible performance regression detected

Show Output
1 queries added
= /remote.php/dav/files/test
= /remote.php/dav/files/test/test.txt
= /remote.php/dav/files/test/many_files
= /remote.php/dav/files/test/new_file.txt
≠ /remote.php/dav/files/test/new_file.txt with 1 queries added
+ UPDATE "oc_preferences" SET "configvalue" = :dcValue1 WHERE ("userid" = :dcValue2) AND ("appid" = :dcValue3) AND ("configkey" = :dcValue4)

@CarlSchwan
CarlSchwanforce-pushed the fix/ijob-logger-deprecated branch 5 times, most recently from 6fa90dd to 06e1aa9CompareJuly 14, 2022 15:34
Comment threadapps/files_versions/lib/BackgroundJob/ExpireVersions.php
Comment threadlib/private/BackgroundJob/Legacy/QueuedJob.php Outdated
Comment threadlib/private/BackgroundJob/Legacy/RegularJob.php Outdated
Comment threadlib/private/Command/CallableJob.php Outdated
@CarlSchwan
CarlSchwanforce-pushed the fix/ijob-logger-deprecated branch from d24ef26 to 2d025a3CompareJuly 28, 2022 12:31
@github-actions

Copy link
Copy Markdown
Contributor

Possible performance regression detected

Show Output
2 queries added
= /remote.php/dav/files/test
= /remote.php/dav/files/test/test.txt
≠ /remote.php/dav/files/test/many_files with 1 queries added
+ UPDATE "oc_preferences" SET "configvalue" = :dcValue1 WHERE ("userid" = :dcValue2) AND ("appid" = :dcValue3) AND ("configkey" = :dcValue4)
≠ /remote.php/dav/files/test/new_file.txt with 1 queries added
+ UPDATE "oc_preferences" SET "configvalue" = :dcValue1 WHERE ("userid" = :dcValue2) AND ("appid" = :dcValue3) AND ("configkey" = :dcValue4)
= /remote.php/dav/files/test/new_file.txt

@CarlSchwan
CarlSchwanforce-pushed the fix/ijob-logger-deprecated branch from 2d025a3 to d03bb36CompareJuly 28, 2022 13:12
@come-nc

Copy link
Copy Markdown
Contributor

PHP Fatal error: Cannot use OCP\Files\SimpleFS\ISimpleFile as ISimpleFile because the name is already in use in /home/runner/work/server/server/tests/Core/Controller/AvatarControllerTest.php on line 42

@CarlSchwan
CarlSchwanforce-pushed the fix/ijob-logger-deprecated branch 2 times, most recently from 0fead00 to 5d02024CompareJuly 29, 2022 09:37
Comment threadtests/Core/Controller/AvatarControllerTest.php Outdated
@CarlSchwan
CarlSchwanforce-pushed the fix/ijob-logger-deprecated branch 2 times, most recently from b56a561 to f60c1a3CompareJuly 29, 2022 15:06
Since the ILogger will be soon removed we need to ensure that nothing in
the public api use it.
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
@CarlSchwan
CarlSchwanforce-pushed the fix/ijob-logger-deprecated branch from f60c1a3 to 49334e4CompareAugust 8, 2022 15:04
This was referenced Aug 12, 2022
@CarlSchwan

Copy link
Copy Markdown
MemberAuthor

ci failure unrelated

@CarlSchwan
CarlSchwan merged commit b888c61 into masterAug 23, 2022
@CarlSchwan
CarlSchwan deleted the fix/ijob-logger-deprecated branch August 23, 2022 14:55
@blizzzblizzz mentioned this pull request Aug 24, 2022
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@CarlSchwan@come-nc@ChristophWurst@nickvergessen@github-advanced-security