src-d / sourced-ui

source{d} UI
https://sourced.tech
Apache License 2.0
7 stars 15 forks source link

dev is broken because sourced-ce no longer reads docker-compose.override #318

Open dpordomingo opened 4 years ago

dpordomingo commented 4 years ago

caused by https://github.com/src-d/sourced-ce/pull/262

Since global docker-compose.override.yml is no longer linked in source{d} workdirs (see sourced-ce#262::factory.go::L119), it can no longer be read from ~/.sourced/compose-files/__active__/docker-compose.override.yml (see sourced-ui::Makefile::L13).

smacker commented 4 years ago

originally when proposing to remove override.yml support from srcd-ce I supposed we will change ui makefile as well by putting file into ~/.sourced/workdirs/__active__/ instead of ~/.sourced/compose-files/__active__/.

dpordomingo commented 4 years ago

Putting the override inside of ~/.sourced/workdirs/__active__ may be not enough because it's a link to a directory which does not exist before source{d} has been initialized, so it would require extra steps in certain order to run the dev mode.

I think it could be an initial step, but I think we should consider a better DX in the future.

se7entyse7en commented 4 years ago

So at this moment, the flow would required to first run init, so that the directory is there, and then call make set-override that will put inside ~/.sourced/workdirs/__active__. And this should work, right?

I think it could be an initial step, but I think we should consider a better DX in the future.

Yup, it's not very convenient. But I'd first fix the thing and update the doc, and then create another issue to improve it. Unless you guys already have an idea on how to fix this.

dpordomingo commented 4 years ago

I think it should be something like this:

$ make build-dev
$ sourced init local .
$ make dev-prepare
$ sourced restart

But then we should also add a

version: '3.4'
services:
  sourced-ui-celery:
    restart: "no"

into docker-compose.override.yml to avoid a restart loop in sourced-ui-celery after restarting source{d} in dev mode.

dpordomingo commented 4 years ago

So yes, we can do it, close this issue, and open a new one to enhance the process which is suboptimal.

dpordomingo commented 4 years ago

Also, we should document that it should be done that way every time the user wants to change to a different workdir, because in the past, it was needed to run make dev-prepare only once (the first time)

se7entyse7en commented 4 years ago

So yes, we can do it, close this issue, and open a new one to enhance the process which is suboptimal.

But now it doesn't work, right? I won't close this issue then. Or I misunderstood something?

dpordomingo commented 4 years ago

Yes, it's currently broken; I meant that I agree with your comment:

But I'd first fix the thing and update the doc, and then create another issue to improve it.

We can close after fixing and documenting, and then opening a new one for improving later.

se7entyse7en commented 4 years ago

Ah ok ok! yup! Thanks!