Skip to content

Commit bdca953

Browse files
committed
Update docs; discover ee/cli dependency
1 parent a3fbc84 commit bdca953

File tree

2 files changed

+46
-4
lines changed

2 files changed

+46
-4
lines changed

agent-tasks/promote-drift-ee-ce.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,9 @@ A:
104104
- EE backend doesn’t depend on drift’s job token middleware.
105105
- Integration boundary: Backend and drift integrate via shared DB (`backend/models`) and external calls; backend doesn’t call drift endpoints today.
106106
- If closer drift parity is desired later, import CE drift middleware in relevant services or add a backend wrapper that accepts both `DIGGER_WEBHOOK_SECRET` and `DIGGER_INTERNAL_SECRET`.
107+
108+
New finding: EE CLI required for GitHub Issues notifications
109+
- Observation: The GitHub Issues notification path for drift currently lives in the EE CLI (`ee/cli/pkg/drift/provider.go` and related), selected via `INPUT_DRIFT_GITHUB_ISSUES`. Our Action also toggles EE CLI usage via `ee: 'true'`.
110+
- Impact: Although drift detection is now CE, using GitHub Issues notifications imposes an EE dependency (the example workflow requires `ee: 'true'`). Slack notifications remain CE-only and do not require EE.
111+
- Proposed fix (upcoming commit): Promote the GitHub Issues drift notification provider to CE by adding a CE implementation (e.g., `cli/pkg/drift/github_issue.go`) and extending the CE provider to honor `INPUT_DRIFT_GITHUB_ISSUES`. Update docs to remove the `ee: 'true'` requirement for Issues after the change.
112+
- Interim docs: Until the provider is promoted to CE, users need `ee: 'true'` in the workflow to enable GitHub Issues notifications for drift.

docs/ce/features/drift-detection.mdx

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ title: "Drift Detection"
33
---
44

55

6+
<Note>
7+
Drift detection has been promoted from EE to CE and is now available to all Community Edition users. The examples below show how to configure scheduled drift checks and notifications.
8+
</Note>
9+
610
# Drift alerts via Slack
711

812
## Create a separate workflow file for drift
@@ -47,10 +51,42 @@ Note the `DRIFT_DETECTION_SLACK_NOTIFICATION` env var that the workflow above is
4751
Follow the [official Slack guide](https://api.slack.com/messaging/webhooks) to get the Incoming Webhook URL; then add it as an Action secret named `DRIFT_DETECTION_SLACK_NOTIFICATION`
4852

4953

50-
# Drift alerts via Github Issues
54+
# Drift alerts via GitHub Issues
55+
56+
Digger supports drift detection and automatic creation of issues in your ticketing system, e.g. GitHub Issues. Configure a scheduled workflow that enables GitHub Issues notifications:
57+
58+
```
59+
name: Drift Detection
60+
61+
on:
62+
workflow_dispatch:
63+
#schedule: ## Schedule the job to run at 12.am daily.
64+
# - cron: '0 0 * * *'
5165
52-
Coming soon to CE, here is an example of how to configure it: https://github.com/diggerhq/demo-ee-features/edit/main/.github/workflows/drift.yml.
53-
Digger supports drift detection and automatic creation of issues in your ticketing system, e.g. GitHub Issues:
66+
jobs:
67+
detect-drift:
68+
runs-on: ubuntu-latest
69+
steps:
70+
- name: digger drift detection
71+
uses: diggerhq/digger@vLatest
72+
with:
73+
ee: 'true'
74+
mode: drift-detection
75+
setup-aws: true
76+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
77+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
78+
no-backend: true
79+
env:
80+
GITHUB_CONTEXT: ${{ toJson(github) }}
81+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
82+
DIGGER_GITHUB_TOKEN: ${{ secrets.DIGGER_GITHUB_TOKEN }}
83+
INPUT_DRIFT_GITHUB_ISSUES: 'true'
84+
# DIGGER_MANAGEMENT_REPO: "https://github.com/your-org/your-mgmt-repo"
85+
```
86+
87+
<Note>
88+
The example above creates GitHub Issues when drift is detected. Ensure `${{ secrets.GITHUB_TOKEN }}` (or a PAT) has permission to create issues in the repository.
89+
</Note>
5490

5591
<img height="400" src="/images/drift-issues.png" />
5692

@@ -59,4 +95,4 @@ Digger supports drift detection and automatic creation of issues in your ticketi
5995
## 403 errors
6096

6197
If you are seeing permission errors such as 403 in the action log while reporting drift status the backend that is almost always due to missing `no-backend: true`
62-
as an argument in the workflow file
98+
as an argument in the workflow file

0 commit comments

Comments
 (0)