ServerlessError: Documentation part already exists while deploying Serverless AWS apigateway - aws-lambda

I am getting [ServerlessError: Documentation part already exists] while deployment when I have updated the version in documentation object from version:"8.0.2" to version:"9.0.1".
serverlessErrorImage1
serverlessErrorImage2
But it succeed when run deployment again by updating version in documentation object from version:"9.0.1" to version:"9.0.2".
custom:
documentation:
api:
info:
version: "9.0.2"
title: "Mock APIs"
description: "Mock Apis for my new project"
I am unable to understand how serverless-aws-documentation versioning is working while deployment.

Related

Service "elasticsearch" failed to build:Invalid reference format

Project Screenshot
I was working in a project in which i has to use docker,elastic search etc,i installed all necessary packages and mounted my github repo and i build it , and then this error pops us that Service elastic search failed to build :invalid reference format
The ELK_VERSION argument is not passed into the build context.
You have also a warning there mention that for you. Your compose file needs to like this:
version: "3.8"
services:
elasticsearch:
build:
args:
ELK_VERSION: "1.2.3"

Jaeger operator fails to parse Jaeger instance version on Kubernetes

Jaeger operator shows this log.
time="2022-01-07T11:27:57Z" level=info msg=Versions arch=amd64 identity=jaeger-operator.jaeger-operator jaeger=1.21.0 jaeger-operator=v1.21.3 operator-sdk=v0.18.2 os=linux version=go1.14.15 time="2022-01-07T11:28:20Z" level=warning msg="Failed to parse current Jaeger instance version. Unable to perform upgrade" current= error="Invalid Semantic Version" instance=tracing namespace=istio-system
The tracing operated resource shows like this afterwards:
kubectl get jaeger
NAME STATUS VERSION STRATEGY STORAGE AGE
tracing Running allinone elasticsearch 37d
We use GitOps for distributing the applications (included jaeger-operator and jaeger tracing resource). Only difference we are aware is between versions of clusters. In this case, this is only failing for a particular cluster with the following kubernetes version:
Server Version: version.Info{Major:"1", Minor:"20+", GitVersion:"v1.20.12-gke.1500", GitCommit:"d32c0db9a3ccd0ac73b0b3abd0532505217b376e", GitTreeState:"clean", BuildDate:"2021-11-17T09:30:02Z", GoVersion:"go1.15.15b5", Compiler:"gc", Platform:"linux/amd64"}
Other than the log error and the resulting missing information from the get jaeger command, the jaeger-operator modifies 2 things from the initial manifest:
It removes the line: .spec.storage.esRollover.enabled: true
It lowercases the .spec.strategy: AllInOne
The functions used for parsing the version: https://github.com/jaegertracing/jaeger-operator/blob/v1.21.3/pkg/upgrade/main.go#L28
The the function used to check the current version and compare it to verify if it needs to update the resource: https://github.com/jaegertracing/jaeger-operator/blob/v1.21.3/pkg/upgrade/upgrade.go#L134
They both look ok to me. Can't tell where/what the problem is and how to workaround it.

R/exams Problem deploying app to shinyapps.io

I have developed a shiny app in which I use the function exams2blackboard from the R/exams package. I installed the package from http://R-Forge.R-project.org. When I go to publish it on shinyApps.io I receive the following error:
Error: Unhandled Exception: Child Task 980776811 failed: Error building image: Error fetching exams (2.4-0) source. unable to satisfy package: exams (2.4-0)
Note: I used the R/exams version 2.4-0 from http://R-Forge.R-project.org following the recommendation at Blackboard not importing Blackboard.zip
Chapter 2.4 of the shinyapps.io user guide at https://docs.rstudio.com/shinyapps.io/getting-started.html#using-your-r-packages-in-the-cloud says:
Currently, the shinyapps.io service supports deploying packages installed
from CRAN, GitHub (both public and private repos), and BioConductor.
[...]
Support for R-Forge and other repos is on our backlog; please drop us a line
in the shinyapps.io Community
if the lack of support is a blocker for you.
Hence my interpretation is that you cannot install the R-Forge version easily. Possibly, you can install it from the R-Forge mirror on GitHub, though: https://github.com/r-forge/exams/tree/master/pkg/exams

How to deploy GCP functions with Golang 1.15 (Serverless framework)

Is there a way to deploy GCP function with Go 1.15 using Serverless framework ?
Looks like 1.15 is available (https://cloud.google.com/appengine/docs/standard/go/runtime) but I can't find a way to do it with Serverless.
serverless.yml
...
provider:
name: google
runtime: go115
...
I have this Invalid runtime error :
{"ResourceType":"gcp-types/cloudfunctions-v1:projects.locations.functions","ResourceErrorCode":"400","ResourceErrorMessage":{"code":400,"message":"The request has errors","status":"INVALID_ARGUMENT","details":[{"#type":"type.googleapis.com/google.rpc.BadRequest","fieldViolations":[{"field":"runtime","description":"Invalid runtime."}]}],"statusMessage":"Bad Request","requestPath":"https://cloudfunctions.googleapis.com/v1/projects/**************/locations/us-central1/functions/*****","httpMethod":"PATCH"}}
The GO1.15 runtime is not supported by the regular and beta version of Cloud Functions.
Use Go1.13 instead, or use Cloud Run.

APIConnect: Using $ref to reuse code fragments in your OpenAPI (Swagger 2.0) files

I'm using IBM's APIConnect to create a few APIs. I've been trying to edit my API's YAML definition to create references to properties so that I can externalize them. But so far, I'v been encountering problems with the referencing. They either do not validate against "API Connect swagger extensions schema API definition" or against "IBM Swagger Version 2.0 schema API definition".
Here are the two referencing I tried:-
Referencing securityDefinitions:
As described in the IBM website: https://www.ibm.com/support/knowledgecenter/en/SSMNED_5.0.0/com.ibm.apic.toolkit.doc/rapic_swagger_ref_fragment.html
my YAML:-
swagger: '2.0'
info:
version: 1.0.0
title: PokemonApp
x-ibm-name: pokemonapp
host: $(catalog.host)
basePath: /api
paths:
/pokemon:
get:
responses:
'200':
description: 200 OK
securityDefinitions:
$ref: ./schemas/ClientID.yaml
security:
- clientID: []
x-ibm-configuration:
assembly:
execute:
- invoke:
target-url: $(TestProperty)
properties:
TestProperty:
value: 'https://pokemons.mybluemix.net/api/pokemons'
description: ''
encoded: false
gateway: micro-gateway
And it's corresponding reference file:-
clientID:
description: ''
in: query
name: client_id
type: apiKey
On doing an apic validate on the parent YAML, I get the following error:-
C:\Users\MyName\TestNotes\definitions>apic validate pokemonapp_1.0.0.yaml
Successfully validated pokemonapp_1.0.0.yaml against Swagger Version 2.0 schema API definition [pokemonapp:1.0.0].
Successfully validated pokemonapp_1.0.0.yaml against API Connect swagger extensions schema API definition [pokemonapp:1.0.0].
Error validating pokemonapp_1.0.0.yaml with IBM Swagger Version 2.0 schema API definition [pokemonapp:1.0.0].
Data does not match any schemas from "oneOf" (/securityDefinitions/$ref)
Error: Validation did not complete successfully.
Referencing properties:-
Here's the parent YAML:-
swagger: '2.0'
info:
version: 1.0.0
title: PokemonApp
x-ibm-name: pokemonapp
host: $(catalog.host)
basePath: /api
paths:
/pokemon:
get:
responses:
'200':
description: 200 OK
securityDefinitions:
clientID:
description: ''
in: query
name: client_id
type: apiKey
security:
- clientID: []
x-ibm-configuration:
assembly:
execute:
- invoke:
target-url: $(TestProperty)
properties:
$ref: ./schemas/properties.yaml
gateway: micro-gateway
And the corresponding reference file (./schemas/properties.yaml):-
TestProperty:
type: object
value: 'https://pokemons.mybluemix.net/api/pokemons'
description: ''
encoded: false
On validating this, the error is a different one. This YAML validates against Swagger Version 2.0 schema API definition and against IBM Swagger Version 2.0 schema API definition, but not against API Connect swagger extensions schema API definition.
Here's the error message:-
C:\Users\MyName\TestNotes\definitions>apic validate pokemonapp_1.0.0.yaml
Successfully validated pokemonapp_1.0.0.yaml against Swagger Version 2.0 schema API definition [pokemonapp:1.0.0].
Error validating pokemonapp_1.0.0.yaml with API Connect swagger extensions schema API definition [pokemonapp:1.0.0].
Invalid type: string (expected object) (/properties/$ref)
Successfully validated pokemonapp_1.0.0.yaml against IBM Swagger Version 2.0 schema API definition [pokemonapp:1.0.0].
Error: Validation did not complete successfully.
Anu idea what I'm doing wrong here?
P.S. in both the cases, the swagger validates against 'Swagger Version 2.0 schema API definition'. It's only against the IBM specific schemas that they don't.
I was able to solve your issue using the latest CLI, APIConnect version and fixing an error in your properties.yaml file:
Version: apiconnect: v2.6.2 (API Connect: v5.0.7.0)
The first thing I had to change was to remove the additional type property in your properties.yaml file. I was receiving the following error with the properties.yaml file above:
Additional properties not allowed (/properties/TestProperty/type)
After removing the type property the file now has the following content:
TestProperty:
value: 'https://pokemons.mybluemix.net/api/pokemons'
description: ''
encoded: false
I then used the validation tool provided by the apic CLI to make sure the configuration was completely valid:
macbook-pro-92:Test Algebra$ apic validate Test.yaml
Successfully validated Test.yaml against Swagger Version 2.0 schema API definition [pokemonapp:1.0.0].
Successfully validated Test.yaml against API Connect swagger extensions schema API definition [pokemonapp:1.0.0].
Successfully validated Test.yaml against IBM Swagger Version 2.0 schema API definition [pokemonapp:1.0.0].
So in order to solve your issue, I would recommend updating your APIConnect version and CLI and then remove the type property from your properties.yaml file. You should then be able to validate the configuration successfully.
For any version 5060 or later, the use of $ref won't work. There is a problem report filed against this already. Wait for a future release to use it.

Resources