Skip to content

feat: attach pod logs to notifier zip

Boros Gábor requested to merge gabor/enhanced-periodic-build-notifier into main

Description

This MR adds extra logs for a failed periodic build, retrieved from Kubernetes pods from other namespaces.

Supporting information

Getting logs of Kubernetes resources from other namespaces is impossible without defining ClusterRoles, bindings and service accounts. To simplify that work, we added a resources.yml to the OpenFAAS function, which creates all necessary resources.

Testing instructions

Steps to test the changes:

  1. Check ops@ email address for an email with the title: "Deployment failed for instance: periodic-nutmeg"
    • The one arrived at 2022-06-09 3:44 PM (UTC+2) should have only "build_logs.txt" in the attached Zip file -- didn't reach pod creation
    • The one arrived at 2022-06-09 6:33 PM (UTC+2) should have only "build_logs.txt" in the attached Zip file -- pods were started, but the build failed
    • The one arrived at 2022-06-09 7:05 PM (UTC+2) should have only "build_logs.txt", "lms-job-20220609165309--1-hk952.txt", and "lms-job-20220609165309--1-jbqct.txt" in the attached Zip file -- pods failed to start
  2. Check the email body
  3. Download and extract logs
  4. Check logs
  5. Check the corresponding Pipeline failure
  6. Validate that v1.1.0 image exists at https://gitlab.com/opencraft/dev/grove/container_registry/3063592

Dependencies

N/A

Screenshots

TBD

Checklist

If any of the items below is not applicable, do not remove them, but put a check in it.

  • All providers include the new feature/change
  • All affected providers can provision new clusters
  • Unit tests are added/updated
  • Documentation is added/updated
  • The TOOLS_CONTAINER_IMAGE_VERSION in ci_vars.yml is updated
  • The grove-template repository is updated

Additional context

N/A

Edited by Boros Gábor

Merge request reports