Skip to content

feat: add teams as user source

Boros Gábor requested to merge gabor/pr-sandbox-trigger-by-github-group into main

Description

This MR fixes minor issues with PR sandboxes and allows PR sandbox creation based on GitHub usernames and teams.

Supporting information

https://tasks.opencraft.com/browse/SE-6030

Testing instructions

Steps to test the changes:

  1. Check the pipeline to see the jobs created -- ignore the errors, we are curious about creation (triggered manually, but you can check other pipelines too if you want): https://gitlab.com/opencraft/ops/grove-stage-digitalocean/-/pipelines/1003519761
  2. Execute ./kubectl -n openfaas-fn describe pod pr-watcher-66fb68944-nvqdx for the staging DO cluster and check for env variables. You should see the following (note: no usernames defined but a single GitHub team):
Environment:
      EDX_PLATFORM_FORKS:         open-craft/edx-platform;openedx/edx-platform
      GITHUB_TEAMS:               open-craft/core;open-craft/new-members-candidates
      GROVE_TEMPLATE_PROJECT_ID:  34602668
      MFE_FORKS:                  openedx/frontend-app-discussions;open-craft/frontend-app-discussions;openedx/frontend-app-learner-dashboard;open-craft/frontend-app-learner-dashboard;openedx/frontend-app-learner-portal-enterprise;open-craft/frontend-app-learner-portal-enterprise;openedx/frontend-app-admin-portal;open-craft/frontend-app-admin-portal;openedx/frontend-app-publisher;open-craft/frontend-app-publisher;openedx/frontend-app-enterprise-public-catalog;open-craft/frontend-app-enterprise-public-catalog;openedx/frontend-app-learning;open-craft/frontend-app-learning;openedx/frontend-app-authn;open-craft/frontend-app-authn;openedx/frontend-app-gradebook;open-craft/frontend-app-gradebook;openedx/frontend-app-profile;open-craft/frontend-app-profile;openedx/frontend-app-support-tools;open-craft/frontend-app-support-tools;openedx/frontend-app-ecommerce;open-craft/frontend-app-ecommerce;openedx/frontend-app-payment;open-craft/frontend-app-payment;openedx/frontend-app-course-authoring;open-craft/frontend-app-course-authoring;openedx/frontend-app-communications;open-craft/frontend-app-communications;openedx/frontend-app-account;open-craft/frontend-app-account;openedx/frontend-app-program-console;open-craft/frontend-app-program-console;openedx/frontend-app-learner-record;open-craft/frontend-app-learner-record;openedx/frontend-app-ora-grading;open-craft/frontend-app-ora-grading;openedx/frontend-app-library-authoring;open-craft/frontend-app-library-authoring;openedx/frontend-app-learner-portal-programs;open-craft/frontend-app-learner-portal-programs;openedx/frontend-app-programs-dashboard;open-craft/frontend-app-programs-dashboard
      exec_timeout:               5m
      fprocess:                   python3 index.py
      handler_wait_duration:      4m30s
      healthcheck_interval:       15s
      max_inflight:               1
      read_timeout:               5m
      write_timeout:              2m30s

Dependencies

NA

Screenshots

NA

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

I'll need to push a new PR watcher image after this MR.

Edited by Boros Gábor

Merge request reports