godspeedsystems / gs-node-service Goto Github PK
View Code? Open in Web Editor NEWGodspeed microservice framework
Home Page: https://godspeed.systems/
License: Other
Godspeed microservice framework
Home Page: https://godspeed.systems/
License: Other
Generate events and workflows from Prisma datastores. P0
Use prisma annotations to decide what API to generate. P1
gs_service: Issue observed in executing sub workflow
Check for wrong datasource or event name gracefully handled
Auto generated test cases
godspeed generate tests
This will ensure a folder called tests exists. And create YAML based API tests written in our YAML testing compatible format.invoking sub workflow
Could be creating new ctx and set inputs and outputs and at the end of the flow, copy to the parent flow
Logging needs to be improved to provide the complete flow/story of the request.
IN the yaml of a task, developer can specify:
onError:
continue: boolean # Default value is set in the mappings/default. The project template's default is true.
response: <%JSONNET SCRIPT%> #optional. Default is the GSStatus for error. which we are already doing.
log: 'LOG_LEVEL_ENUM' # Default value is set in the mappings/default. Values can be debug, error, severe. The project template's default for onError.log is 'Error'. If project default is null, and developer also does not specify. No logging should be done. Don't add to the GSLogEvents.
When a task fails in series or parallel, depending on its onError handling, it must stop the execution of the control task or continue with the execution.
Add errors events as GSLogEVent via ctx.addLog() (For telemetry/logs)
Something like this in GSSeriesFunction
ctx.outputs[this.id] = ctx.outputs[childId] //where id is of the child failed
if (!ctx.outputs[child.id]?.success && !child.onError.continue) {
ctx.addLogEvent(new GSLogEVent()) // Telemetry itnegration will later log these tasks.
return; //Exit the series or parallel right away
}
Mock server with mock data generated using faker
gs_service: proper error handling required, in some cases requests just hangs
Test Coverage
gs_service: Throw error on load time if any function, specified in events, doesn't exist
The following parts/steps make the module
godspeed generate docs
will create/override folder with OpenAPI 3 spec compliant JSON file/api-spec
Environment variables to get from config:
Test Coverage
godspeed generate docs
will
Test Coverage function loadYaml()
Test case scenarios for GS-Service:
Note: Faker-Mockdata Generator >> Microservice testing
Test Coverage
Environment based configuration, mapping of environmental variables in framework.
gs_service: Error handling in jsonnet errors
Test Coverage configLoader: function iterate_yaml_directories()
Test Coverage
Test: src/plugins add test case
It seems there is a keyFile setting needed. Following docker-compose is not enough.
For refererence
version: "3.7"
services:
mongodb:
image: mongo:5.0
ports:
- 27017:27017
volumes:
- mongodb-data:/data/db
command: [--auth, --replSet, my-replica-set]
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=root
volumes:
mongodb-data:
gs_service: configLoader is not giving proper error in case file doesn't have .yaml extension
Error thrown when a simple file without .yaml extension was present in functions directory
`node:internal/fs/utils:344
throw err;
^
Error: ENOTDIR: not a directory, scandir '/home/gurjot/gs_project_template/gs_service/dist/core/../functions/com/pinelabs/get_loan_application_status'
at Object.readdirSync (node:fs:1392:3)
at iterate_yaml_directories (/home/gurjot/gs_project_template/gs_service/dist/core/configLoader.js:33:20)
at iterate_yaml_directories (/home/gurjot/gs_project_template/gs_service/dist/core/configLoader.js:67:47)
at iterate_yaml_directories (/home/gurjot/gs_project_template/gs_service/dist/core/configLoader.js:67:47)
at iterate_yaml_directories (/home/gurjot/gs_project_template/gs_service/dist/core/configLoader.js:67:47)
at iterate_yaml_directories (/home/gurjot/gs_project_template/gs_service/dist/core/configLoader.js:67:47)
at loadSources (/home/gurjot/gs_project_template/gs_service/dist/core/loader.js:12:45)
at Object. (/home/gurjot/gs_project_template/gs_service/dist/core/loader.js:15:3)
at Object. (/home/gurjot/gs_project_template/gs_service/dist/core/loader.js:17:4)
at Module._compile (node:internal/modules/cjs/loader:1103:14) {
errno: -20,
syscall: 'scandir',
code: 'ENOTDIR',
path: '/home/gurjot/gs_project_template/gs_service/dist/core/../functions/com/pinelabs/get_loan_application_status'
}
`
Add Redis plugin in gs_service
Add Pino Logger and replace all the console statements with logger (info, warn, debug, error)
Replace the console log with pino logger in gs_service
Test Coverage http_listener: app object
Make sure incoming and outgoing Kafka messages and HTTP calls are able to go through proper context propogation, via the headers
Test Coverage codeLoader: function loadModules()
Test Coverage datasourceLoader: function loadDatasources()
Test Coverage loader: config object
Test Coverage
Test Coverage com.gs.http function
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.