Skip to content

Commit 2829c55

Browse files
committed
Refactor dashboard config paths for improved structure and clarity
1 parent d9bdc8b commit 2829c55

File tree

1 file changed

+42
-42
lines changed

1 file changed

+42
-42
lines changed

apps/website/docs/pipelines/opex-dashboard.md

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ on:
5555
push:
5656
branches: [main]
5757
paths:
58-
- "infra/dashboards/**/config.yaml"
59-
- "apps/**/openapi.yaml"
58+
- ".opex/**/config.yaml"
59+
- "**/openapi.yaml"
6060

6161
jobs:
6262
deploy:
@@ -72,8 +72,8 @@ name: Plan OpEx Dashboards
7272
on:
7373
pull_request:
7474
paths:
75-
- "infra/dashboards/**/config.yaml"
76-
- "apps/**/openapi.yaml"
75+
- ".opex/**/config.yaml"
76+
- "**/openapi.yaml"
7777

7878
jobs:
7979
plan:
@@ -135,6 +135,8 @@ through:
135135
- For each config, checks if:
136136
- The config file itself changed
137137
- Referenced OpenAPI spec (via `oa3_spec` field) changed
138+
- Includes added/copied/modified/renamed files; excludes deleted files from
139+
generation targets
138140
- Validates inputs to prevent injection attacks
139141
- Outputs JSON array of changed dashboard configs
140142

@@ -231,37 +233,31 @@ paths. Each config directory should contain (or will receive):
231233
**Flat Structure:**
232234

233235
```
234-
infra/
235-
├── issuer-dashboard/
236+
.opex/
237+
├── issuer/
236238
│ ├── config.yaml
237-
│ └── backend.tf
238-
└── wallet-dashboard/
239-
├── config.yaml
240-
└── backend.tf
239+
│ ├── backend.tf
240+
│ └── backend.tfvars
241+
└── wallet/
242+
├── config.yaml
243+
├── backend.tf
244+
└── backend.tfvars
241245
```
242246
243247
**Environment-based:**
244248
245249
```
246-
infra/dashboards/
250+
.opex/
247251
├── dev/
248252
│ ├── issuer/config.yaml
249-
│ └── wallet/config.yaml
253+
│ ├── issuer/backend.tfvars
254+
│ ├── wallet/config.yaml
255+
│ └── wallet/backend.tfvars
250256
└── prod/
251-
├── issuer/config.yaml
252-
└── wallet/config.yaml
253-
```
254-
255-
**Service-based:**
256-
257-
```
258-
apps/
259-
├── issuer/
260-
│ ├── openapi.yaml
261-
│ └── infra/dashboard/config.yaml
262-
└── wallet/
263-
├── openapi.yaml
264-
└── infra/dashboard/config.yaml
257+
├── issuer/config.yaml
258+
├── issuer/backend.tfvars
259+
├── wallet/config.yaml
260+
└── wallet/backend.tfvars
265261
```
266262
267263
### Environment Detection
@@ -286,19 +282,19 @@ to the new reusable workflow.
286282
287283
- Dashboard `config.yaml` files exist in your repository
288284
- Each config references its OpenAPI spec via `oa3_spec` field
289-
- Each dashboard directory has (or will get) its own `backend.tf` for Terraform
290-
state
285+
- Dashboard configs used by this reusable workflow are under
286+
`.opex/**/config.yaml`
287+
- Each dashboard directory has `backend.tfvars` available for `terraform init`
291288
292289
### Migration Steps
293290
294291
1. **Review Current Structure**
295292
296-
Identify where your dashboard configs are located. The workflow supports any
297-
structure:
293+
Ensure your dashboard configs are under `.opex/**/config.yaml`:
298294
299-
```bash
300-
find . -name "config.yaml" -path "*/dashboard*"
301-
```
295+
```bash
296+
find . -path './.opex/**/config.yaml'
297+
```
302298

303299
2. **Update Config Files**
304300

@@ -367,33 +363,37 @@ to the new reusable workflow.
367363
368364
# Verify generated files
369365
ls -la path/to/
370-
# Should show: config.yaml, opex.tf, backend.tf, variables.tf, etc.
371-
372-
# Create a test PR to validate the workflow
373-
git checkout -b test/opex-migration
374-
git commit --allow-empty -m "test: trigger OpEx workflow"
375-
git push origin test/opex-migration
376-
gh pr create --title "Test OpEx Dashboard Workflow"
377366
```
378367

368+
# Should show: config.yaml, opex.tf, backend.tf, backend.tfvars, variables.tf, etc.
369+
370+
# Create a test PR to validate the workflow
371+
372+
git checkout -b test/opex-migration git commit --allow-empty -m "test: trigger
373+
OpEx workflow" git push origin test/opex-migration gh pr create --title "Test
374+
OpEx Dashboard Workflow"
375+
376+
```
377+
379378
### Troubleshooting
380379

381380
**No dashboards detected:**
382381

383382
- Verify config files are located in `.opex/**/config.yaml` paths
384383
- Check that OpenAPI specs or configs actually changed in the commit
385384
- Review automatic base reference detection in workflow logs (look for "Using
386-
base reference" message)
385+
base reference" message)
387386

388387
**Terraform plan fails:**
389388

390389
- Check that dashboard directory has valid `backend.tfvars`
391390
- Verify Azure credentials and OIDC configuration
392391
- Ensure GitHub environment `opex-{environment}-ci` exists and has proper
393-
secrets
392+
secrets
394393

395394
**Terraform apply fails:**
396395

397396
- Review plan output from the previous step
398397
- Check GitHub environment `opex-{environment}-cd` protection rules
399398
- Verify state backend accessibility and lock configuration
399+
```

0 commit comments

Comments
 (0)