Skip to content

Monitor Upstream Feature Flags

JH team will figure out a way to monitor feature flag changes from upstream.

discuss issue with upstream: https://gitlab.com/gitlab-jh/gitlab-jh-enablement/-/issues/179.

demo project https://jihulab.com/maochao-free-group/test-project/-/blob/main/.gitlab-ci.yml

use CI job to check whether feature flags changes, pseudo code:

  1. only run on main-jh branch, allow_failure: true
  2. get upstream_latest_commit from config/feature_flags
  3. get JH_know_latest_commit from CI cache
  4. check JH_know_latest_commit equal upstream_latest_commit or not
  5. if equal, do nothing
  6. if not equal
    1. send slack message to notify dev, https://api.slack.com/apps/A03G9B75PSS/incoming-webhooks
    2. create jihulab issue for tracking, https://docs.gitlab.com/ee/api/issues.html#new-issue
    3. save upstream_latest_commit as JH_know_latest_commit in CI cache
毛超 编辑于