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

Docker image out of date? #439

Closed
kenfdev opened this issue Jun 3, 2018 · 3 comments
Closed

Docker image out of date? #439

kenfdev opened this issue Jun 3, 2018 · 3 comments

Comments

@kenfdev
Copy link

kenfdev commented Jun 3, 2018

First of all, thanks for all the hard work and the awesome project.

This is a (kind of) Bug Report

For bug reports, please answer following questions:

  • What went wrong?
    As explained here, I tried to create a sync subscription via HTTP event but failed.
{
  "errors": [
    {
      "message":
        "Subscription doesn't validate. Validation error: Key: 'Subscription.Event' Error:Field validation for 'Event' failed on the 'required' tag"
    }
  ]
}

The request payload is like the following:

{
  "type": "sync",
  "eventType": "http.request",
  "functionId": "echo",
  "path": "/invalid",
  "method": "POST"
}

I've changed the eventType key to event and the request succeeded.

The next issue is that even though I invoke the function, I only receive a 202 Accepted. I expected to see a 200 with a response. It seemed like it wasn't registered as an sync function. At the end, I changed http.request to http. So my final request is as follows:

{
  "type": "sync",
  "event": "http",
  "functionId": "echo",
  "path": "/echo",
  "method": "POST"
}
  • What did you expect should have happened?
    Expected everything to work without the workarounds.

  • What was the version you used?
    The container image is

serverless/event-gateway:latest

hash: 5ba9b97ab3ea
  • What stacktrace or error message did you see?

As explained above:

{
  "errors": [
    {
      "message":
        "Subscription doesn't validate. Validation error: Key: 'Subscription.Event' Error:Field validation for 'Event' failed on the 'required' tag"
    }
  ]
}

For feature proposals, please answer the following question:

  • What is the use case that should be solved? The more detail you describe this in the easier it is to understand for us.

Similar or dependent issues:

@alexdebrie
Copy link
Contributor

Hey @kenfdev, glad you like the Event Gateway! Thanks for filing this ticket with detailed repro steps.

We're currently doing some minor re-working of the internals of the Event Gateway, including the subscription model. Some of this work is finished, and some is in-progress. As you've noted, the README includes instructions for the new subscription model but the latest published Docker image does not have these updates.

If you're using the 0.7 release, which is what the serverless/event-gateway:latest tag currently points to, then you'll need to use the subscription model here, with a format as follows:

{
  "event": "http",
  "functionId": "echo",
  "path": "/echo",
  "method": "POST"
}

We're looking to finish up the subscription model changes and release a 0.8 version within the next 1-2 weeks.

@kenfdev
Copy link
Author

kenfdev commented Jun 3, 2018

@alexdebrie Thanks for the fast response! Glad to know and confirm what is happening.
Should I close this issue? Or I can close it after I've confirmed the new docker image syncing with the docs. Either way is good for me.
Thanks again 👍

@alexdebrie
Copy link
Contributor

@kenfdev You're welcome! I'll go ahead and close it. We'll try to do a better job keeping docs in line with the latest release going forward.

Feel free to hit us up with any other questions!

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

No branches or pull requests

2 participants