Skip to content

feat: post config file with failure notification

Kaustav Banerjee requested to merge kaustav/add_config_to_pr_notification into main

Description

This MR implements three things:

  1. Posts contents of an instance's config.yml and requirements.txt file in the PR sandbox success and failure notifications.
  2. Removes extra notifications that were posted during sandbox create/update. Now, only success/failure notification is posted at the end of the deployment pipeline.
  3. Fixes the issue where deleting a PR comment with the sandbox command, triggered a pipeline. Now pipelines are triggered only when such commands are posted.

Note to reviewer: It might be easier to review this MR commit-wise

Supporting information

Link to other information about the change, such as GitLab issues, GitHub issues, forum discussions. Be sure to check they are publicly readable, or if not, repeat the information here.

Testing instructions

1. Post config with success notifications

  1. Check this success notification corresponding to this instance. Verify that config and requirements are accessible, accurate and does not contain any secrets.
  2. Check this failure notifiaciton corresponding to this instance. Verify that config and requirements are accessible, accurate and does not contain any secrets.

2. Removes extra notifications

  1. Check this sandbox update comment.
  2. Verify that the only comment posted after this, is the failure notification.

3. Deleting comment should not trigger build

  1. Delete this comment from the PR.
  2. Check the pipelines for the cluster, to verify no build was triggered.

Dependencies

List the dependencies required for this change, if any. Do not forget to link grove-template merge request here if that's affected by this change.

Screenshots

If applicable, add screenshots to help explain your feature.

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

Private Ref: Open Craft internal ticket: BB-8182

Edited by Kaustav Banerjee

Merge request reports