diff --git a/.github/workflows/pr-close.yml b/.github/workflows/pr-close.yml index 36a3bbbe..3ab0ff2f 100644 --- a/.github/workflows/pr-close.yml +++ b/.github/workflows/pr-close.yml @@ -12,10 +12,17 @@ concurrency: jobs: cleanup: name: Cleanup and Images - uses: bcgov/quickstart-openshift-helpers/.github/workflows/.pr-close.yml@v0.6.1 + uses: bcgov/quickstart-openshift-helpers/.github/workflows/.pr-close.yml@main secrets: oc_namespace: ${{ secrets.OC_NAMESPACE }} oc_token: ${{ secrets.OC_TOKEN }} with: cleanup: helm packages: backend + remove_pvc: | + redis-data-${{ github.event.repository.name }}-${{ github.event.number }}-redis-node-0, + redis-data-${{ github.event.repository.name }}-${{ github.event.number }}-redis-node-1, + redis-data-${{ github.event.repository.name }}-${{ github.event.number }}-redis-node-2, + sentinel-data-${{ github.event.repository.name }}-${{ github.event.number }}-redis-node-0, + sentinel-data-${{ github.event.repository.name }}-${{ github.event.number }}-redis-node-1, + sentinel-data-${{ github.event.repository.name }}-${{ github.event.number }}-redis-node-2 diff --git a/.github/workflows/pr-validate.yml b/.github/workflows/pr-validate.yml index 47363396..f7a52441 100644 --- a/.github/workflows/pr-validate.yml +++ b/.github/workflows/pr-validate.yml @@ -15,8 +15,7 @@ jobs: uses: bcgov/quickstart-openshift-helpers/.github/workflows/.pr-validate.yml@v0.6.1 with: markdown_links: | - - [Frontend](https://${{ github.event.repository.name }}-${{ github.event.number }}-frontend.apps.silver.devops.gov.bc.ca) - - [Backend](https://${{ github.event.repository.name }}-${{ github.event.number }}-frontend.apps.silver.devops.gov.bc.ca/api) + - [Backend](https://${{ github.event.repository.name }}-${{ github.event.number }}-backend.apps.silver.devops.gov.bc.ca/api/docs) results: name: Validate Results diff --git a/backend/src/middleware/req.res.logger.ts b/backend/src/middleware/req.res.logger.ts index 7ce4d43b..383a10bf 100644 --- a/backend/src/middleware/req.res.logger.ts +++ b/backend/src/middleware/req.res.logger.ts @@ -7,13 +7,16 @@ export class HTTPLoggerMiddleware implements NestMiddleware { use(request: Request, response: Response, next: NextFunction): void { const { method, originalUrl } = request; + const start = Date.now(); + response.on("finish", () => { const { statusCode } = response; const contentLength = response.get("content-length") || '-'; - const hostedHttpLogFormat = `${method} ${originalUrl} ${statusCode} ${contentLength} - ${request.get( - "user-agent" - )}`; + const timeTaken = Date.now() - start; + const hostedHttpLogFormat = `${method} | ${originalUrl} | ${statusCode} | ${contentLength} | ${request.get( + "user-agent")} | ${timeTaken}ms`; + this.logger.log(hostedHttpLogFormat); }); next();