Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Garden dev behaviour differs from deploy #388

Closed
drubin opened this issue Nov 26, 2018 · 4 comments
Closed

Garden dev behaviour differs from deploy #388

drubin opened this issue Nov 26, 2018 · 4 comments
Assignees
Labels

Comments

@drubin
Copy link
Contributor

drubin commented Nov 26, 2018

The calculation of tasks differs between dev and deploy in unexpected ways. This was partially fixed here #370

My understanding is that garden deploy -w behaves the same as garden dev but with out tests?


This workflow is using the gatsby-hot-reload example project

Each one of these hot reloading + rebuilding were done because I ran

garden get status (See #387)

garden dev --hot-reload=website

Good morning! Let's get your environment wired up...

✔ website                   → Building website:2c12317af0... → Done (took 36.2 sec)
✔ website                   → Deploying → Ready
✔ website                   → Hot reloading → Done (took 316 ms)
✔ website                   → Building website:2c12317af0... → Done (took 0.7 sec)
✔ website                   → Hot reloading → Done (took 144 ms)
✔ website                   → Building website:2c12317af0... → Done (took 0.4 sec)
✔ website                   → Hot reloading → Done (took 132 ms)
✔ website                   → Building website:2c12317af0... → Done (took 0.4 sec)

Notice the difference when running

garden get status with deploy instead of dev

garden deploy --hot-reload=website
Deploy 🚀

✔ website                   → Building website:2c12317af0... → Done (took 0.5 sec)
✔ website                   → Checking status → Version 2c12317af0 already deployed
✔ website                   → Hot reloading → Done (took 103 ms)
✔ website                   → Hot reloading → Done (took 118 ms)
✔ website                   → Hot reloading → Done (took 103 ms)

But I would expect the differences between dev and deploy + hot-reload/watch to be almost the same.

Why do we have totally different workflows/code instead of calling the same calculation logic with different params?

We should

  1. Fix the issue where their task list is calculated differently
  2. Fix the documentation to highlight the differences between the dev and deploy
  3. Fix issue Running garden get status in project + module in same directory causes services to be hot reloaded #387
@edvald edvald changed the title Garden dev behaviour differers from deploy Garden dev behaviour differs from deploy Nov 26, 2018
@drubin drubin added the bug label Nov 28, 2018
thsig added a commit that referenced this issue Nov 30, 2018
Fixes #388.

Don't return a singleton build task by default in the dev command. This
makes the dev command's behavior more consistent with the deploy command
in watch mode.
thsig added a commit that referenced this issue Nov 30, 2018
Fixes #388.

Don't return a singleton build task by default in the dev command. This
makes the dev command's behavior more consistent with the deploy command
in watch mode.
@thsig
Copy link
Collaborator

thsig commented Nov 30, 2018

  1. Fix the documentation to highlight the differences between the dev and deploy

Regarding 2. do you have any suggestions for how to change the description strings for the dev and deploy commands? At first glance, they seem pretty clear to me, but I'm perhaps a bit too familiar with how all this works. @drubin

@thsig thsig reopened this Nov 30, 2018
@edvald edvald added this to the 0.8.1 milestone Dec 3, 2018
@edvald
Copy link
Collaborator

edvald commented Dec 17, 2018

@thsig Is this still an issue?

@thsig
Copy link
Collaborator

thsig commented Jan 11, 2019

I think we should be good here for now — do you agree, @drubin?

@drubin
Copy link
Contributor Author

drubin commented Jan 14, 2019

@thsig When I originally logged this the idea was to fix the root cause that the code is structured differently. At the time we had a bunch of issues related to this difference. tasks mismatch, hot reloading going funny, watch behaving differently.

If you look at the commands:

Their logic seems very different. Where from my understanding if you run garden deploy -w --hotlreload... they should behave the same way? (maybe with tests removed)

This issue was to highlight that if we have to update this logic in 2 places every time we will always create slight differences, which was the case for a few weeks because I used garden dev and you used garden deploy

I suspect the actual specific bug might have been resolved but the issue with the code exists in my view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants