refactor(dav): move shared logic to a dedicated example contact service#53568
Merged
refactor(dav): move shared logic to a dedicated example contact service#53568
Conversation
hamza221
approved these changes
Jun 18, 2025
come-nc
approved these changes
Jun 19, 2025
f14e6c1 to
cb42819
Compare
cb42819 to
cb77341
Compare
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
cb77341 to
960b3ec
Compare
Contributor
|
@st3iny The logs of CI for integration are polluted with: {
"Exception": "OCP\\Files\\NotFoundException",
"Message": "/appdata_oc2crh70w5hw/dav/defaultContact",
"Code": 0,
"Trace": [
{
"file": "/home/runner/actions-runner/_work/server/server/lib/private/Files/Node/LazyFolder.php",
"line": 138,
"function": "get",
"class": "OC\\Files\\Node\\Root",
"type": "->",
"args": [
"/appdata_oc2crh70w5hw/dav/defaultContact"
]
},
{
"file": "/home/runner/actions-runner/_work/server/server/lib/private/Files/AppData/AppData.php",
"line": 114,
"function": "get",
"class": "OC\\Files\\Node\\LazyFolder",
"type": "->",
"args": [
"appdata_oc2crh70w5hw/dav/defaultContact"
]
},
{
"file": "/home/runner/actions-runner/_work/server/server/apps/dav/lib/Service/ExampleContactService.php",
"line": 93,
"function": "getFolder",
"class": "OC\\Files\\AppData\\AppData",
"type": "->",
"args": [
"defaultContact"
]
},
{
"file": "/home/runner/actions-runner/_work/server/server/apps/dav/lib/Listener/UserEventsListener.php",
"line": 183,
"function": "createDefaultContact",
"class": "OCA\\DAV\\Service\\ExampleContactService",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/home/runner/actions-runner/_work/server/server/apps/dav/lib/Listener/UserEventsListener.php",
"line": 77,
"function": "firstLogin",
"class": "OCA\\DAV\\Listener\\UserEventsListener",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/home/runner/actions-runner/_work/server/server/lib/private/EventDispatcher/ServiceEventListener.php",
"line": 57,
"function": "handle",
"class": "OCA\\DAV\\Listener\\UserEventsListener",
"type": "->",
"args": [
{
"__class__": "OCP\\User\\Events\\UserFirstTimeLoggedInEvent"
}
]
},
{
"file": "/home/runner/actions-runner/_work/server/server/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
"line": 220,
"function": "__invoke",
"class": "OC\\EventDispatcher\\ServiceEventListener",
"type": "->",
"args": [
{
"__class__": "OCP\\User\\Events\\UserFirstTimeLoggedInEvent"
},
"OCP\\User\\Events\\UserFirstTimeLoggedInEvent",
{
"__class__": "Symfony\\Component\\EventDispatcher\\EventDispatcher"
}
]
},
{
"file": "/home/runner/actions-runner/_work/server/server/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
"line": 56,
"function": "callListeners",
"class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
"type": "->",
"args": [
[
{
"__class__": "Closure"
}
],
"OCP\\User\\Events\\UserFirstTimeLoggedInEvent",
{
"__class__": "OCP\\User\\Events\\UserFirstTimeLoggedInEvent"
}
]
},
{
"file": "/home/runner/actions-runner/_work/server/server/lib/private/EventDispatcher/EventDispatcher.php",
"line": 67,
"function": "dispatch",
"class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
"type": "->",
"args": [
{
"__class__": "OCP\\User\\Events\\UserFirstTimeLoggedInEvent"
},
"OCP\\User\\Events\\UserFirstTimeLoggedInEvent"
]
},
{
"file": "/home/runner/actions-runner/_work/server/server/lib/private/EventDispatcher/EventDispatcher.php",
"line": 79,
"function": "dispatch",
"class": "OC\\EventDispatcher\\EventDispatcher",
"type": "->",
"args": [
"OCP\\User\\Events\\UserFirstTimeLoggedInEvent",
{
"__class__": "OCP\\User\\Events\\UserFirstTimeLoggedInEvent"
}
]
},
{
"file": "/home/runner/actions-runner/_work/server/server/lib/private/User/Session.php",
"line": 529,
"function": "dispatchTyped",
"class": "OC\\EventDispatcher\\EventDispatcher",
"type": "->",
"args": [
{
"__class__": "OCP\\User\\Events\\UserFirstTimeLoggedInEvent"
}
]
},
{
"file": "/home/runner/actions-runner/_work/server/server/lib/private/User/Session.php",
"line": 358,
"function": "prepareUserLogin",
"class": "OC\\User\\Session",
"type": "->",
"args": [
true,
"*** sensitive parameters replaced ***"
]
},
{
"file": "/home/runner/actions-runner/_work/server/server/lib/private/User/Session.php",
"line": 586,
"function": "completeLogin",
"class": "OC\\User\\Session",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/home/runner/actions-runner/_work/server/server/lib/private/User/Session.php",
"line": 308,
"function": "loginWithPassword",
"class": "OC\\User\\Session",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/home/runner/actions-runner/_work/server/server/lib/private/User/Session.php",
"line": 406,
"function": "login",
"class": "OC\\User\\Session",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/home/runner/actions-runner/_work/server/server/lib/private/User/Session.php",
"line": 545,
"function": "logClientIn",
"class": "OC\\User\\Session",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/home/runner/actions-runner/_work/server/server/lib/base.php",
"line": 1125,
"function": "tryBasicAuthLogin",
"class": "OC\\User\\Session",
"type": "->",
"args": [
"*** sensitive parameters replaced ***",
"*** sensitive parameters replaced ***"
]
},
{
"file": "/home/runner/actions-runner/_work/server/server/ocs/v1.php",
"line": 58,
"function": "handleLogin",
"class": "OC",
"type": "::",
"args": [
"*** sensitive parameters replaced ***"
]
}
],
"File": "/home/runner/actions-runner/_work/server/server/lib/private/Files/Node/Root.php",
"Line": 182,
"message": "Couldn't get default contact file",
"exception": {},
"CustomMessage": "Couldn't get default contact file"
}Can you look into it? Most likely the default contact is accessed before being created or something like that. |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR refactors the code a bit for the upcoming example contact feature.
I tested those changes thoroughly: Disabled feature, enabled with custom contact, enabled without default contact and enabled on a fresh instance (without
appdata/dav).Checklist