This appears to have broken CI at least three times now and
prevented us from shipping a release binary for a tag.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commits updates version endpoint to use ProviderInfo and VersionInfo structs from
faas-provider.GatewayInfo now uses ProviderInfo and VersionInfo structs. GatewayInfo is
left within gateway. Consumer of this endpoint should use typed struct GatewayInfo to
parse response.
Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
The faas-cli throws an error because it always expects a
commit_message for the gateway version, and if it's null - it
will crash. This only affects local development.
The code in faas-cli should be changed to use a struct instead
of casting to an interface.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
Polls every 100 ms instead of every 50ms for use with a new
faas-netes PR:
https://github.com/openfaas/faas-netes/pull/726
The call is much faster now, so this request should me made
at a lower frequency.
Also adds error handling for URL building in the external
service query code.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This patch changes the code which looks up service and appends
them to the Exporter's list. It previously would create an
endless list and cause a memory leak.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
* Updates AngularJS to 1.8.0
* Updates the MaterialUI theme to 1.2.1
* Fixes: #1576
Tested by running the gateway locally, with NATS, Prometheus,
and a gateway port-forwarded from a local KinD cluster.
The UI rendered and the newer files were served. Functions
could be deployed and invoked from the store and CLI.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This field doesn't appear to be used and is supplied via the
querystring which faas-netes (the only ns-enabled provider
already consumes)
Related to PR:
https://github.com/openfaas/faas-netes/pull/671
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
The code was calling into the cache twice, even if the first
call was a cache hit and not a miss.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This type abstracts the function_query type and introduces an
interface for testing and substitution.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
Enables publishing to various topics according to annotations
on the functions. The function cache is moved up one level so
that it can be shared between the scale from zero code and the
queue proxy.
Unit tests added for new internal methods.
Tested e2e with arkade and the newest queue-worker and RC
gateway image with two queues and an annotation on one of the
functions of com.openfaas.queue. It worked as expected including
with multiple namespace support.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
The queue's name will be consumed by the queue worker to
publish to other topics / slow queues.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
NATS moved its primary library to: github.com/nats-io/stan.go
This commit synchronises the library in the gateway to match the
queue worker.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
Propagates the context to upstream requests so that
cancellation can cascade.
Closes: #1501 by @SpaWn2KiLl which was not signed-off.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This should be a "no-harm" change to use the namespace/sub-
system definition for CounterOpts.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
* This experimental patch records metrics as invocations start
so that the metrics can be used to make better scale to zero
decisions in faas-idler.
Tested with Kubernetes on a single-node cluster, metrics
reported as expected. Existing metrics still report.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
There was a case where a deployment with a single namespace on
faas-netes would show the namespace suffix for all functions. we didn't
need to show this because the gateway will proxy to the default
namespace for fns without the namespace siffix.
This was tested on Swarm (no suffix), faas-netes (single namespace, no
suffix) and faas-netes, multi-ns, suffix shown.
Signed-off-by: Alistair Hey <alistair@heyal.co.uk>
The padding was off on the Gateway UI for the function
Store popup.
I have removed the 0padding css class from this element and left
it on the elements that require it
Signed-off-by: Alistair Hey <alistair@heyal.co.uk>
Optimizes Docker builds by copying from license-check Docker image
instead of using curl to download the tool.
Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
**What**
- Always apply the `FunctionPrefixTrimmingURLPathTransformer` when
enqueueing async function requests. This ensures that the context
information sent to the function is correct
Resolves#85
Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
We now hide the new namespace dropdown selector when
there is only 1 namespace, or when we are on swarm
This is also hidden in the function create page and
the function detail page
Signed-off-by: Alistair Hey <alistair@heyal.co.uk>
This allows a uswer to select a non-standard (not openfaas-fn)
namespace from the UI to deploy a function into.
Signed-off-by: Alistair Hey <alistair@heyal.co.uk>
This PR adds a namespace dropdown for the openfaas
namespaces. If a user has non-default namespaces
installed then a user can select that namespace,
view functions in that namespace, invoke them from
the UI and delete them from that namespace.
Signed-off-by: Alistair Hey <alistair@heyal.co.uk>