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

Generated project template for Gradle, Kotlin, google-cloud-function (HTTP) results in a Not Found response for the /hello path #338

Closed
2 of 4 tasks
fwpascual opened this issue Jul 14, 2020 · 1 comment
Assignees
Labels
status: pr submitted A pull request has been submitted for the issue
Milestone

Comments

@fwpascual
Copy link

Thanks for reporting an issue, please review the task list below before submitting the
issue. Your issue report will be closed if the issue is incomplete and the below tasks not completed.

NOTE: If you are unsure about something and the issue is more of a question a better place to ask questions is on Stack Overflow (https://stackoverflow.com/tags/micronaut) or Gitter (https://gitter.im/micronautfw/). DO NOT use the issue tracker to ask questions.

Task List

  • Steps to reproduce provided
  • Stacktrace (if present) provided
  • Example that reproduces the problem uploaded to Github
  • Full description of the issue provided (see below)

Steps to Reproduce

  1. From command line run mn create-app my-app --features google-cloud-function --lang kotlin
  2. Run ./gradlew runFunction
  3. Go to `http://localhost:8080/hello"

Expected Behaviour

Should see a message of "Example Response"

Actual Behaviour

Receive {"message":"Not Found","_links":{"self":{"href":"/hello","templated":false}}}

Environment Information

  • Operating System: Mac
  • Micronaut Version: 2.0.0
  • JDK Version: Tried with JDK 11 and 14

Example Application

N/A: Reproducible using unmodified CLI project

@fwpascual
Copy link
Author

I found that if I alter the generated build.gradle file to better match what is shown here, that I can get the expected response.

Specifically, changing the runFunction task from

args(
            '--target', 'io.micronaut.gcp.function.http.HttpFunction',
            '--classpath', (configurations.runtimeClasspath + sourceSets.main.output).asPath,
            '--port', 8080
    )

to

args(
            '--target', 'io.micronaut.gcp.function.http.HttpFunction',
            '--port', 8080
    )
    doFirst {
        args('--classpath', files(configurations.runtimeClasspath, sourceSets.main.output).asPath)
    }

@graemerocher graemerocher transferred this issue from micronaut-projects/micronaut-gcp Jul 14, 2020
@graemerocher graemerocher added this to the 2.0.1 milestone Jul 20, 2020
@graemerocher graemerocher added the status: pr submitted A pull request has been submitted for the issue label Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: pr submitted A pull request has been submitted for the issue
Projects
None yet
Development

No branches or pull requests

3 participants