src-d / engine-deprecated

[DISCONTINUED] Go to https://github.com/src-d/sourced-ce/
https://docs.sourced.tech/engine
Apache License 2.0
217 stars 26 forks source link

Run integration tests on current master #456

Closed carlosms closed 5 years ago

carlosms commented 5 years ago

Code is ready for 0.13 rc1, we need to run the tests on the windows dev machine. And also manually test:

smacker commented 5 years ago

I have fixed some bugs & merged in master as you could see.

But we have more problems:

carlosms commented 5 years ago
  • go-cli uses /flag format for options instead of --flag as it was before, are we ok with it?
  • some sql tests are failing now. Because queries like /*_comment_*/_show_tables; are parsed like unknown flags now. What do we want to do about it?

From jessevdk/go-flags docs, we can change it to be --opt with the build tag forceposix. We can change it in run-integration-tests.bat (go build -tags forceposix) and Makefile (GO_TAGS = forceposix)

  • TestWebTestSuite/TestSQL fails with could not prune components: unable to remove all containers: container not found now sure why

This one looks like the most important problem to me.

se7entyse7en commented 5 years ago
  • go-cli uses /flag format for options instead of --flag as it was before, are we ok with it?
  • some sql tests are failing now. Because queries like /*_comment_*/_show_tables; are parsed like unknown flags now. What do we want to do about it?

If the windows user is more familiar with / instead of - I'd keep this behavior. WRT the tests I think that it makes sense to have different test builds for Windows. In this /*_comment_*/_show_tables; case on windows is actually expected that it raises an unknown flags error.

  • looks like StreamLinifier doesn't support windows correctly (most probably due to \r\n instead of '\n'). Tests are failing.

This seems to be an easy fix.

  • TestWebTestSuite/TestSQL fails with could not prune components: unable to remove all containers: container not found now sure why

This one looks like the most important problem to me.

Yup, I agree 😕.

carlosms commented 5 years ago
  • go-cli uses /flag format for options instead of --flag as it was before, are we ok with it?
  • some sql tests are failing now. Because queries like /*_comment_*/_show_tables; are parsed like unknown flags now. What do we want to do about it?

If the windows user is more familiar with / instead of - I'd keep this behavior.

If this was the first windows release, it would make sense. But in this case it is a breaking change that we can avoid easily, and as an extra it probably takes less effort to add this build tag than adapt the tests to work differently on windows.

se7entyse7en commented 5 years ago

If this was the first windows release, it would make sense. But in this case it is a breaking change that we can avoid easily.

Isn't it the opposite? I mean we already have a released version (though experimental), so if we use the forceposix tag we will break the usage of / that is how it works now.

smacker commented 5 years ago

Nope. In the previous release, we used cobra instead of go-cli. It uses posix style by default and doesn't support /. I agree with Carlos on forcing posix in go-cli to keep behavior the same as before.

carlosms commented 5 years ago

If this was the first windows release, it would make sense. But in this case it is a breaking change that we can avoid easily.

Isn't it the opposite? I mean we already have a released version (though experimental), so if we use the forceposix tag we will break the usage of / that is how it works now.

But 0.11 and 0.12 already use the --opt style. If we change it to /opt in 0.13 it's a breaking change.

se7entyse7en commented 5 years ago

But 0.11 and 0.12 already use the --opt style. If we change it to /opt in 0.13 it's a breaking change.

Yup, sorry I tried on master 😅.

se7entyse7en commented 5 years ago

BTW it seems that now both options are working, so it wouldn't be a real breaking change except for the fact that it won't be explained in the usage.

se7entyse7en commented 5 years ago

459 addresses all issues except for the ugly log.

  • looks like StreamLinifier doesn't support windows correctly (most probably due to \r\n instead of '\n').

AFAIR not it is used only for interactive repl testing, but they're skipped for Windows.

smacker commented 5 years ago

StreamLinifier

but when I run tests they failed on windows. Not tests that use this struct but the test for the struct itself.

se7entyse7en commented 5 years ago

Not tests that use this struct but the test for the struct itself.

Ah ok, right! 😅 For some reason they're passing now 👍, I don't remember if they were failing when I started working on this.

smacker commented 5 years ago

Fix for logs was merged in go-log.

carlosms commented 5 years ago

Everything seems to work now except the log colors. The code in https://github.com/src-d/go-log/pull/16 did not fix the output in Engine. I created #462 to keep track, we can close this issue.