zalando / innkeeper

Simple route management API for Skipper
Other
166 stars 21 forks source link

Broken directly from download #221

Closed degerlac closed 7 years ago

degerlac commented 7 years ago

I have been investigating the use of your software for some upcoming needs on a project. However I am unable to get very far. I have found a number of scripts that fail in the scripts folder and I am not able to complete the getting started section.

When running "sbt run ."

The following output is generated:

[info] Loading project definition from /My/Dir/innkeeper/project [info] Set current project to innkeeper (in build file:/My/Dir/innkeeper/) java.lang.RuntimeException: No main class detected. at scala.sys.package$.error(package.scala:27) [trace] Stack trace suppressed: run last gatling:run for the full output. [error] (gatling:run) No main class detected. [error] Total time: 1 s, completed

Why does it not know what class to run? I am running on Mac OSX 10.11.6

"sbt test" works fine with all tests passing

I am using docker for the Postgres DB.

Failing scripts (version.sh, ikc.sh, acceptance-tests.sh) version.sh -- fails with the message "cat: build.sbt: No such file or directory" ikc.sh -- line 142: jq: command not found acceptance-tests.sh -- ull build WARN: No sbt.version set in project/build.properties, base directory: /Users/dgerlach/Documents/projects/GWIS/microfrontends/innkeeper/scripts [warn] Executing in batch mode. [warn] For better performance, hit [ENTER] to switch to interactive mode, or [warn] consider launching sbt without any commands, or explicitly passing 'shell' [info] Set current project to scripts (in build file:/Users/dgerlach/Documents/projects/GWIS/microfrontends/innkeeper/scripts/) [error] Not a valid command: scapegoat (similar: set) [error] Not a valid project ID: scapegoat [error] Expected ':' (if selecting a configuration) [error] Not a valid key: scapegoat (similar: aggregate) [error] scapegoat [error] ^

WARN: No sbt.version set in project/build.properties, base directory: /My/Dir/innkeeper/scripts [warn] Executing in batch mode. [warn] For better performance, hit [ENTER] to switch to interactive mode, or [warn] consider launching sbt without any commands, or explicitly passing 'shell' [info] Set current project to scripts (in build file:/My/Dir/innkeeper/scripts/) [error] Not a valid command: assembly [error] Not a valid project ID: assembly [error] Expected ':' (if selecting a configuration) [error] Not a valid key: assembly [error] assembly [error] ^

Docker version 1.12.3, build 6b644ec docker-compose version 1.8.1, build 878cff1

oauth uses an image, skipping db uses an image, skipping team uses an image, skipping Building innkeeper ERROR: Cannot locate specified Dockerfile: Dockerfile Building innkeeper ERROR: Cannot locate specified Dockerfile: Dockerfile Name Command State Ports

waiting for innkeeper to start ..^C

Any thoughts to the source of these issues?

alexkops commented 7 years ago

The problem at hand is, that the "run" command is "hijacked" by Gatling:

> inspect run
[info] Input task: Unit
[info] Description:
[info]  Runs a main class, passing along arguments provided on the command line.
[info] Provided by:
[info]  {file:/C:/Users/alexk/IdeaProjects/innkeeper/}root/gatling:run

If the GatlingPlugin is removed from enablePlugins in build.sbt, it takes the default run command, which finds the right main method. Not sure how to prevent that behaviour, though @NorthFury

alexkops commented 7 years ago

Updating the Gatling sbt plugin to 2.2.0 seems to solve that issue addSbtPlugin("io.gatling" % "gatling-sbt" % "2.2.0")

alexkops commented 7 years ago

See also http://gatling.io/docs/current/migration_guides/2.1-to-2.2/#sbt-plugin

alexkops commented 7 years ago

@degerlac And for your problems with the scripts, it looks like you are running them from within the scripts directory, but they are meant to be run from the base directory like ./scripts/version.sh

NorthFury commented 7 years ago

I think gatling should be removed as a dependency. I don't remember having proper load tests in the code base. I'll look into it.

NorthFury commented 7 years ago

I am of the opinion that the existing gatling "test" didn't bring much value. As such I created a PR to remove it.

@degerlac you can use make acceptance-tests for example instead of running the script. You can also check the other Makefile goals.

NorthFury commented 7 years ago

Handled the gatling issue. Also the other questions were answered. Closing.