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

Add healthchecks for API #102

Closed
idormenco opened this issue Sep 30, 2021 · 3 comments · Fixed by #129
Closed

Add healthchecks for API #102

idormenco opened this issue Sep 30, 2021 · 3 comments · Fixed by #129
Assignees
Labels
back-end good first issue Good for newcomers Hacktoberfest help wanted Extra attention is needed

Comments

@idormenco
Copy link
Member

API should have healthchecks that will check all the services which are required for the good functionality of API.

Check the Db connection , and credentials for mailing sending service

@ursaciuc-adrian
Copy link
Contributor

I'll take this one if it's ok with you.

@idormenco
Copy link
Member Author

All yours @ursaciuc-adrian

@idormenco
Copy link
Member Author

@ursaciuc-adrian please implement similar to #127

ursaciuc-adrian added a commit to ursaciuc-adrian/de-urgenta-backend that referenced this issue Oct 8, 2021
idormenco pushed a commit that referenced this issue Oct 12, 2021
* #102 Add api health checks

* update config
idormenco added a commit to idormenco/de-urgenta-backend that referenced this issue Oct 18, 2021
* Fix dashboard access when running in docker

* Update dockerfile with vars for Hangfire

* Feature/add identity server (#15)

* Add complete db schema in domain

* Add identity server

* migrations for identitydb
cleanup

* add swagger authorization

* fix endpoint authorization

* Add docker-compose for identity server

Co-authored-by: catileptic <s.alexandra.stefanescu@gmail.com>
Co-authored-by: trupci <a.trupcea@moodmedia.com>

* Add admin endpoints for events and blog posts (code4romania#25)

* Fix docker-compose

* Fix cs 401 error

* Add env vars for sendgrid (code4romania#28)

* Fix docker issue

* Add .env file with everything but the Sendgrid API key in it

* Update Identity Server URL

* Rename .env file in order to avoid clashes

* added ios mobile client (code4romania#30)

Co-authored-by: trupci <a.trupcea@moodmedia.com>

* correct key for connection string setting (code4romania#31)

* Update Startup.cs (code4romania#32)

* Fix templates (code4romania#34)

* Docker/add settings (code4romania#35)

* add swagger settings

* use same env for connection strings

* typo

* correct syntax

* correct syntax :)

* switch to key:value syntax all over

* Add TEMPLATE_FOLDER to .env.example

* set proper default folder (code4romania#37)

* add more detailed instructions to get started

* Add group endpoints and contracts (code4romania#27)

* Add admin endpoints for events and blog posts

* Add group api

* Add group endpoints and examples

* Add group safe location management

* Add CORS (code4romania#40)

* Format docker-compose (code4romania#39)

* Update Startup.cs

* Feature/add serilog to backend (code4romania#41)

* Add CORS

* Add serilog

* Remove and ignore .env

* Add user api (code4romania#43)

* Feature/add auth (code4romania#44)

* Add user api

* Add auth with jwt and identity token

* Undo changes regenerate create

* Undo changes

* Fix recurring jobs

* add config for identity db

* fix docker compose

* fix: authorize calls from swagger (code4romania#45)

* fix: authorize calls from swagger

* add missing refs
remove explicit scheme name

* fix claim types.

* remove dev file

* Feature/confirm registration (code4romania#48)

* - added email templates to api project
- added email configuration to appsettings
- added send email after registering a user
- added confirmation endpoint

* created confirmation html page

* cleanup

* cleanup: remove jurnal medical refs from templates

* cleanup

* cleanup

* added user api to dockerfile
fix build

* cleanup template

* - remove identityserver project
- add confirmation message after email is confirmed

Co-authored-by: trupci <a.trupcea@moodmedia.com>

* Feature/group crud (code4romania#47)

* Add logic for group api

* Move validator to common

* Update README.md

* Samall updates

* Fix bugs, remove unused imports, rework db entities

* Implement safe location related endpoints

* Feature/backpack crud (code4romania#52)

* Add logic for group api

* Move validator to common

* Update README.md

* Samall updates

* Fix bugs, remove unused imports, rework db entities

* Implement safe location related endpoints

* Scafolding of backpack api crud operations

* Add basic validator tests

* Implement logic in handlers

* Update AuthController.cs

* Backpack items 53 (code4romania#55)

* Add logic for group api

* Move validator to common

* Update README.md

* created command/query classes & modified controller

* added validators - partial implementation

* GetBackpackCategoryItemsValidator

* added nuget package CSharpFunctionalExtensions

* backpackItem validation test project

* Samall updates

* Fix bugs, remove unused imports, rework db entities

* Implement safe location related endpoints

* Scafolding of backpack api crud operations

* Add basic validator tests

* validators tests

* Implement logic in handlers

* Update AuthController.cs

* adjusted tests for backpack items

* created GetBackpackItemsHandler and added Migration to reflect relation between Backpack and BackpackItem

* BackpackItems commands handlers and related tests

* removed unused namespaces

* small fix

* Backpack items 53 (code4romania#54)

* renamed backpackItems table and removed set from all properties in commands/queries

* added userSub to commands/queries, enriched validation, improved tests

* small corrections

Co-authored-by: Ana-Maria Ciufu <anamaria_ciufu@dell.com>
Co-authored-by: Ana-Maria Ciufu <ciufu.ana.maria@gmail.com>
Co-authored-by: anamarisimo <48225513+anamarisimo@users.noreply.github.com>
Co-authored-by: Alex Stefanescu <s.alexandra.stefanescu@gmail.com>

* Fix merge issues

* Enhace login (code4romania#57)

closes code4romania#56

* remove required birthdate

* Make api to not fail when sending email (code4romania#58)

Refactor
FIx merge issues
Add new endpoint for resending confirm email

* Update docker-compose.yml (code4romania#59)

* Fix sending mails (code4romania#60)

- refactor
- add logging
- add correct sender name

* Add container_name to docker-compose

* Improved endpoints documentation so they are not confusing

* Return extra info about user on login

* Feature/certifications crud (code4romania#71)

* getCertifications flow

* Certifications: tests for get certifications flow

* create certification flow

* create certification flow: added issuing authority

* create certification flow - unit tests

* certification flows: update and delete

* delete certification tests

* cleanup and refactor

* small refactor

Co-authored-by: Ion Dormenco <idormenco@gmail.com>

* Update README.md

* Add models validation code4romania#73 (code4romania#74)

* Add models validation code4romania#73

* These changes are in response to PR comments

Co-authored-by: Doru Ungureanu <doru@beatroot.app>

* Feature/change password (code4romania#75)

* -logged in user can change password

* -forgot password reset password feature added

* -added fluent validators for DTOs used for password reset
-formatted files
-changed relevant file names
-removed sec risk

* Implement user endpoins (code4romania#70)

* Add endpoints for accepting invites

* Implement user endpoints

* Return available user location types

* small comments fixed

* Small improvements

* Add AddFluentValidationRulesToSwagger (code4romania#79)

closes code4romania#77

* Add backpackId in response (code4romania#80)

closes code4romania#78

* Fix building Docker image for recurring jobs container (code4romania#81)

* Fix spelling of "crisis"

* Fix recurring jobs Docker image

* Fix recurring jobs service name

* Make nullable for expiration date, change validator (code4romania#85)

* Make nullable for expiration date, change validator

* fix small bug

* Store course related values in db code4romania#50 (code4romania#83)

* Add models validation code4romania#73

* These changes are in response to PR comments

* create project and classes

* courses can be for all kind of trainings

* course cities and types

* course types and cities in ef and exposed as get

* course types and cities

* fixes issue code4romania#64

* amend PR#83

* PR#83 - rename project folder Course->Events

* event ref updated

* add requested ammendments

* modify validator tests

* fix Event.Api tests

* fix update event

Co-authored-by: Doru Ungureanu <doru@beatroot.app>

* 88 add model validators unit tests (code4romania#91)

* add backpack api request tests

* add request validator tests for group api

* add request validator tests for user api

* add empty fields test cases

* Update CODEOWNERS (code4romania#95)

* Cleanup code to align with our code style (code4romania#94)

* Cleanup code to align with our code style

* Fix pr comment

* 66 upload certification photo (code4romania#89)

* save and update photo

* retrieve photo for certification

* add IBlobStorage and S3 implementation

* local storage implementation

* implement get

* configure presigned url expiration

* adjust local retrieve path

* cleanup and readme for storage setup

* celanup unused code

* get static file path from config

* remove unused entity config

* startup config changes

* fix missing photo bug

* fix local storage update and retrieve bug

* rename

* initial setup

* Update dotnet.yml

* run coverage even if some tests fail

* add postgres service

* update credentials

* remove migration run from startup

* update credentials

* Update dotnet.yml

* add main branch

* rename file

* prevent deadlocks on test run

* 106 create certification bug (code4romania#108)

* fix empty photo bug

* remove using

* 13 add job expired certifications (code4romania#104)

* add job and job tests

* start implementing email notification sending

* save email when registering user

* fix tests failing due to mandatory email

* disable email sender until implementation is complete

* use userid in email in user builder

* add tables to store created notifications

* add logic to create notification for expired certifications

* add notification sender job

* add notification cleanup job

* fix build

* update readme

* don;t send notification for already expired certifications

* use logger

* merge upstream

* remove jobs references from test helpers proj

* Added a configurable limit to the number of groups a user can create … (code4romania#105)

* Added a configurable limit to the number of groups a user can create and join

* Removed unused imports

* Removed a few more unused imports

* Removed unnecessary assigned value

* Fixed weird indentation in appsettings.json

* Imported missing namespace

* Made tests use UserBuilder

* Transitioned tests from Shouldly to FluentAssertions (code4romania#111)

* extract project

* cleanup configuration

* rename folders

* Added event archival job

* Wrote tests for each test case

* Bound Identity password options to a config in appsettings.json

* Add group users limit verification

* Moved cron expression over to cronguru format, implemented an event builder utility for tests and moved existing tests over to using said builder

* remove Ioptionsmonitor

* consolidate email options

* Fixed typo in appsettings.json

* rename project folder

* Added max number of users to GroupModel

Moved all tests to GroupBuilder and added two tests for the two test cases

* send notification emails

* add test

* add todo

* add jobs_ci (code4romania#122)

* add jobs_ci

* add con string for jobs context

* rename workflow

* rename workflow

* rename workflow

* add invite table

* Add CRUD for admin blog posts (code4romania#121)

* Add CRUD for admin blog posts

* Add test for Admin Api

* add invite api and generate invite method

* add docs

* add request validator and tests

* Add health checks

* cr suggestions

* fix pr comments

* add accept invite endpoint

* implement handler

* code4romania#102 Add api health checks (code4romania#129)

* code4romania#102 Add api health checks

* update config

* rework handler

* cr suggestions

* cr suggestions

* Preserve local changes with git stash (code4romania#135)

* Update .env.example (code4romania#136)

* Update docker-compose.yml (code4romania#137)

* Update docker-compose.yml (code4romania#138)

* Update docker-compose.yml

* Update docker-compose.yml

* edit csproj

* Update docker-compose.yml

Co-authored-by: Ion Dormenco <idormenco@gmail.com>

* Cleanup add requested property (code4romania#134)

* extract env

* Change validator signature

* Update DeUrgenta.Invite.Api.csproj

* 124 cleanup old invite logic (code4romania#140)

* remove group api generate invite

* remove reject group invite method

* remove accept group invite method

* adjust tetss to use correct sut

* remove group invite table

* remove get backpack invites from user api

* remove accept backpack invite

* remove reject backpack invite

* remove create backpack invite

* remove backpack invites table

* rework controller actions response

* rename class

* Merge dev

closes code4romania#143

* Update GetEventValidatorShould.cs

* Update ValidationResult.cs

* return validation result

* PR comments

* Add extra info in group members response

* 11 job expired item notifications (code4romania#148)

* add new job

* add item expiry job

* add email template for backpack items

* discard change

* Add db migrator (code4romania#150)

* Extract domains; add migrator

* Update migrator_ci.yml

* Update api_ci.yml

* Update jobs_ci.yml

* add fancy ascii /console art

* Update docker-compose.yml

* Update README.md

* Merge dev

* [Wip][PoC] Add localization in api (code4romania#147)

* add entities and services

* Add providers and migrations

* Update api_ci.yml

* Merge dev

* Rework i18n service

* fix slns and docker files

* Update I18NProvider.cs

* format operation filter

* Added a version field to backpack items which is used as a make-shift concurrency token.

Co-authored-by: Alex Stefanescu <s.alexandra.stefanescu@gmail.com>
Co-authored-by: trupci <a.trupcea@moodmedia.com>
Co-authored-by: Tudor Amariei <tudoramariei@gmail.com>
Co-authored-by: trupci <trupci@gmail.com>
Co-authored-by: vizu <bogdan.vizureanu@gmail.com>
Co-authored-by: Tudor Amariei <tudor.amariei@code4.ro>
Co-authored-by: Ana-Maria Ciufu <anamaria_ciufu@dell.com>
Co-authored-by: Ana-Maria Ciufu <ciufu.ana.maria@gmail.com>
Co-authored-by: anamarisimo <48225513+anamarisimo@users.noreply.github.com>
Co-authored-by: Doru Ungureanu <doruu12@users.noreply.github.com>
Co-authored-by: Doru Ungureanu <doru@beatroot.app>
Co-authored-by: DSVDavid <vdavidxx@yahoo.com>
Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
Co-authored-by: Iulia Dormenco <31412211+decembrya@users.noreply.github.com>
Co-authored-by: Irina Borozan <anirib@gmail.com>
Co-authored-by: Iulia Dormenco <iuliaolteanu12@gmail.com>
Co-authored-by: Vlad Cuciureanu <vlad.c.cuciureanu@gmail.com>
Co-authored-by: Laxynium <grzesiu15432@gmail.com>
Co-authored-by: Ursaciuc Adrian <ursaciuc.adrian27@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
back-end good first issue Good for newcomers Hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants