owncloud / ocis

:atom_symbol: ownCloud Infinite Scale Stack
https://doc.owncloud.com/ocis/next/
Apache License 2.0
1.4k stars 182 forks source link

Add step wait-for-fakeoffice to drone pipeline #6750

Closed amrita-shrestha closed 1 year ago

amrita-shrestha commented 1 year ago

Description

Currently, ocis-server doesn't wait for fakeoffice service to start. Sometimes fakeoffice service takes a long time to start. In such cases, ocis-server fail to start with an error message

{"level":"error","service":"app-provider","error":"unable to register services: rgrpc: grpc service appprovider could not be started,: Get \"http://fakeoffice:8080/hosting/discovery\": dial tcp: lookup fakeoffice on 127.0.0.11:53: no such host","time":"2023-07-10T05:07:14.481033933Z","message":"error starting the grpc server"}

Maybe we could add wait-for-fakeofice to avoid fakeoffice service not being available

https://drone.owncloud.com/owncloud/ocis/24040/46/4

@saw-jan @SwikritiT

saw-jan commented 1 year ago

The wopi test pipeline steps should be in order like in stable-3

Screenshot from 2023-07-10 13-15-52 Screenshot from 2023-07-10 13-16-05
master stable-3
wkloucek commented 1 year ago

The order on master changed recently, see https://github.com/owncloud/ocis/pull/6416

Currently, ocis-server doesn't wait for fakeoffice service to start. Sometimes fakeoffice service takes a long time to start. In such cases, ocis-server fail to start with an error message

Aren't the containers guaranteed to be starte one after another? :thinking: Because fakeoffice should take no time to start:

https://github.com/owncloud/ocis/blob/db70ab27ac30c9c10d16bdb43ab2b0cdf05282ac/tests/config/drone/serve-hosting-discovery.sh#L3-L5

saw-jan commented 1 year ago

Aren't the containers guaranteed to be starte one after another?

they should but the fakeoffice step is run in detached mode which means it lets other steps to run parallel with it https://github.com/owncloud/ocis/blob/db70ab27ac30c9c10d16bdb43ab2b0cdf05282ac/.drone.star#L892-L900

wkloucek commented 1 year ago

Aren't the containers guaranteed to be starte one after another?

they should but the fakeoffice step is run in detached mode which means let's other steps to run parallel with it

Ok, my understanding was that the startup order is still guaranteed. But it seems like this is not the case. Adding a wait step seems fine and the best solution :+1: