Skip to content
This repository has been archived by the owner on Mar 18, 2021. It is now read-only.

Add /system/info endpoint for faas-nomad #36

Merged

Conversation

alexellis
Copy link
Contributor

The purpose of this change is to make faas-nomad compatible with the
latest version of the API Gateway in OpenFaaS. Each provider should
be able to advertise the underlying provider and the version of the
code. A new version of faas-provider (0.6) is vendored into the repo
which brings in an optional health endpoint (turned off by default).
The version is being passed to the provider from main.go.

A subsequent change should implement the health endpoint.

A unit test was added for the info endpoint using the format found
for the other endpoints.

The advertised information in /system/info will be consumed by the
API gateway and logged for help debugging issues. It can also be
used to turn on/off UI features such as the "network" field which
does not make sense for all providers.

Signed-off-by: Alex Ellis (VMware) alexellis2@gmail.com

Other comments

Nic this was tested via unit tests which I think prove the behavior works as expected, but not through bringing up a nomad environment. Please could you give it a run-through before or after merging?

The purpose of this change is to make faas-nomad compatible with the
latest version of the API Gateway in OpenFaaS. Each provider should
be able to advertise the underlying provider and the version of the
code. A new version of faas-provider (0.6) is vendored into the repo
which brings in an optional health endpoint (turned off by default).
The version is being passed to the provider from main.go.

A subsequent change should implement the health endpoint.

A unit test was added for the info endpoint using the format found
for the other endpoints.

The advertised information in /system/info will be consumed by the
API gateway and logged for help debugging issues. It can also be
used to turn on/off UI features such as the "network" field which
does not make sense for all providers.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
@alexellis
Copy link
Contributor Author

go build and go test ./handlers works fine but it looks like there is an issue in the CI pipeline.

goreleaser: error: unknown short flag '-s', try --help

(^ That is likely unrelated to the PR.)

@alexellis
Copy link
Contributor Author

Bump

@nicholasjackson
Copy link
Contributor

Sorry will check this tomorrow

@alexellis
Copy link
Contributor Author

Awesome, thank you Nic!

@nicholasjackson
Copy link
Contributor

Hey @alexellis I had to merge your changes on top of my replication branch I have created a new pull request with your changes.

#42

Would you give this a quick eyeball and I will get this merged into master, the provider is now compatible with version 0.8.1 of the gateway with this pull request.

Kind regards,

Nic

@nicholasjackson nicholasjackson merged commit e62a0f0 into hashicorp:master Sep 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants