Skip to content

Conversation

@juliusknorr
Copy link
Member

Otherwise services might not be resolved since they are registered too late

…the other registations

Signed-off-by: Julius Härtl <jus@bitgrid.net>
@juliusknorr juliusknorr added bug 3. to review Waiting for reviews labels Sep 8, 2020
@juliusknorr juliusknorr added this to the Nextcloud 20 milestone Sep 8, 2020
@ChristophWurst
Copy link
Member

🤔 where is that a problem? Shouldn't the registration part be as lazy as possible? Like in a sense that nothing really is executed yet.

@juliusknorr
Copy link
Member Author

thinking where is that a problem? Shouldn't the registration part be as lazy as possible? Like in a sense that nothing really is executed yet.

Ideally yes, just found this when debugging nextcloud/deck#2275 and thought it might be a good hardening to avoid possible issues in case app developers don't properly handle lazy registration like myself ;)

@ChristophWurst
Copy link
Member

At this very early stage of the process lifetime, no other apps nor all of the server components are ready. Therefore the app must not try to use anything except the API provided by the context.

https://docs.nextcloud.com/server/latest/developer_manual/app_development/bootstrap.html#nextcloud-20-and-later

🙈 so I would not see this as a hardening step. The premise of of the register and boot separation is to not have any assumptions about what's there in the early call of register.

Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

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

👎 as of #22727 (comment) :)

@juliusknorr
Copy link
Member Author

Ok, let's close then 👍

@juliusknorr juliusknorr closed this Sep 8, 2020
@juliusknorr juliusknorr deleted the bugfix/noid/service-registration-early branch September 8, 2020 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants