Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude/commands/cypress/cypress-run.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ Use these tags with `--env grepTags`:
- `@coo` - Observability Operator tests
- `@acm` - Advanced Cluster Management tests
- `@virtualization` - OpenShift Virtualization tests
- `@incidents` - Incidents feature tests
- `@cluster-health-analyzer` - Incidents feature tests

**Modifier Tags:**
- `@smoke` - Quick smoke tests
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ web/po-files/
.claude/commands/configs
.claude/settings.local.json
_output/
.tokensave/
41 changes: 21 additions & 20 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,28 +69,29 @@ The `web/src/` directory is organized into two top-level areas:
- **`web/src/features/`** — Feature-specific code, one subdirectory per feature. Each feature directory contains sub-folders as needed: `components/`, `pages/`, `hooks/`, `utils/`, `types/`, `assets/`.
- **`web/src/shared/`** — Code used by more than one feature, organized by kind.

| Feature | Directory |
| ------- | --------- |
| Alerting (alerts, silences, alert rules) | `features/alerts/` |
| Incidents | `features/incidents/` |
| Legacy Dashboards | `features/legacy-dashboards/` |
| Metrics / PromQL | `features/metrics/` |
| Perses Dashboards | `features/perses-dashboards/` |
| Targets | `features/targets/` |

| Shared Directory | Contents |
| ---------------- | -------- |
| Feature | Directory |
| ---------------------------------------- | ----------------------------- |
| Alerting (alerts, silences, alert rules) | `features/alerts/` |
| Incidents | `features/incidents/` |
| Legacy Dashboards | `features/legacy-dashboards/` |
| Metrics / PromQL | `features/metrics/` |
| Perses Dashboards | `features/perses-dashboards/` |
| Targets | `features/targets/` |

| Shared Directory | Contents |
| -------------------- | --------------------------------------------------------------------- |
| `shared/components/` | Reusable UI components (`labels.tsx`, `format.tsx`, `query-browser/`) |
| `shared/hooks/` | Shared React hooks (`useAlerts.ts`, `usePerspective.tsx`) |
| `shared/store/` | Redux store, actions, reducers, thunks, alert fetching |
| `shared/contexts/` | React contexts (`MonitoringContext.tsx`) |
| `shared/constants/` | Shared constants (`data-test.ts`, `query-params.ts`) |
| `shared/types/` | Shared TypeScript types (`types.ts`) |
| `shared/utils/` | Shared pure utility functions (`utils.ts`) |
| `shared/assets/` | Static assets such as fonts (`codicon.ttf`) |
| `shared/console/` | Vendored/adapted OpenShift Console internals |
| `shared/hooks/` | Shared React hooks (`useAlerts.ts`, `usePerspective.tsx`) |
| `shared/store/` | Redux store, actions, reducers, thunks, alert fetching |
| `shared/contexts/` | React contexts (`MonitoringContext.tsx`) |
| `shared/constants/` | Shared constants (`data-test.ts`, `query-params.ts`) |
| `shared/types/` | Shared TypeScript types (`types.ts`) |
| `shared/utils/` | Shared pure utility functions (`utils.ts`) |
| `shared/assets/` | Static assets such as fonts (`codicon.ttf`) |
| `shared/console/` | Vendored/adapted OpenShift Console internals |

**Placement rules:**

- If a file is only used within one feature, it belongs in that feature's directory.
- If a component or utility is only used by a single page, co-locate it inside that page's own subdirectory (e.g. `features/alerts/pages/alerts-page/AggregateAlertTableRow.tsx`).
- If a file is used across multiple features, it belongs in `shared/`.
Expand Down Expand Up @@ -136,7 +137,7 @@ spec:
url: "https://rbac-query-proxy.open-cluster-management-observability.svc:8443"
perses:
enabled: true
incidents:
clusterHealthAnalyzer:
enabled: true
```

Expand Down
2 changes: 1 addition & 1 deletion cmd/plugin-backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var (
portArg = flag.Int("port", 9443, "server port to listen on\nports 9444 and 9445 reserved for other use")
certArg = flag.String("cert", "", "cert file path to enable TLS (disabled by default)")
keyArg = flag.String("key", "", "private key file path to enable TLS (disabled by default)")
featuresArg = flag.String("features", "", "enabled features, comma separated.\noptions: ['acm-alerting', 'alerting', 'incidents', 'legacy-dashboards', 'metrics', 'targets', 'perses-dashboards', 'cluster-health-analyzer']")
featuresArg = flag.String("features", "", "enabled features, comma separated.\noptions: ['acm-alerting', 'alerting', 'legacy-dashboards', 'metrics', 'targets', 'perses-dashboards', 'cluster-health-analyzer']")
Comment thread
coderabbitai[bot] marked this conversation as resolved.
staticPathArg = flag.String("static-path", "/opt/app-root/web/dist", "static files path to serve frontend")
configPathArg = flag.String("config-path", "/opt/app-root/config", "config files path")
pluginConfigArg = flag.String("plugin-config-path", "/etc/plugin/config.yaml", "plugin yaml configuration")
Expand Down
4 changes: 2 additions & 2 deletions pkg/server/plugin_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ func patchManifest(baseManifestData []byte, cfg *Config) []byte {
{"metrics.patch.json", features[Metrics]},
{"legacy-dashboards.patch.json", features[LegacyDashboards]},
{"targets.patch.json", features[Targets]},
{"monitoring-console-plugin.patch.json", features[Incidents] || features[ClusterHealthAnalyzer] || features[PersesDashboards] || features[AcmAlerting]},
{"monitoring-console-plugin.patch.json", features[ClusterHealthAnalyzer] || features[PersesDashboards] || features[AcmAlerting]},
{"acm-alerting.patch.json", features[AcmAlerting]},
{"cluster-health-analyzer.patch.json", features[Incidents] || features[ClusterHealthAnalyzer]},
{"cluster-health-analyzer.patch.json", features[ClusterHealthAnalyzer]},
Comment thread
PeterYurkovich marked this conversation as resolved.
{"perses-dashboards.patch.json", features[PersesDashboards]},
}

Expand Down
1 change: 0 additions & 1 deletion pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ type Feature string
const (
AcmAlerting Feature = "acm-alerting"
Alerting Feature = "alerting"
Incidents Feature = "incidents"
LegacyDashboards Feature = "legacy-dashboards"
Metrics Feature = "metrics"
Targets Feature = "targets"
Expand Down
6 changes: 3 additions & 3 deletions web/cypress/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ Tests are organized using tags for selective execution using [@cypress/grep](htt

**2. High-Level Component Tags:**
- `@monitoring` - Monitoring plugin tests
- `@incidents` - Incidents feature tests
- `@coo` - Cluster Observability Operator functionality tests (operator installation, ACM integration)
- `@virtualization` - Virtualization integration tests
- `@alerts` - Alert-related tests
Expand All @@ -229,6 +228,7 @@ Tests are organized using tags for selective execution using [@cypress/grep](htt
**3. Specific Feature Tags** (format: `@{component}-{label}`):
- Example: `@incidents-redux`
- Add specific feature tags as needed
- `@cluster-health-analyzer` - Incidents feature tests
Comment thread
coderabbitai[bot] marked this conversation as resolved.

**4. JIRA Tags** (format: `@JIRA-{ID}`):
- Example: `@JIRA-OU-1033`
Expand Down Expand Up @@ -277,12 +277,12 @@ npx cypress run --env grepTags="@smoke @slow"

**Run tests with BOTH tags (AND logic):**
```bash
npx cypress run --env grepTags="@smoke+@incidents"
npx cypress run --env grepTags="@smoke+@cluster-health-analyzer"
```

**Complex filtering:**
```bash
npx cypress run --env grepTags="@incidents --@slow --@flaky"
npx cypress run --env grepTags="@cluster-health-analyzer --@slow --@flaky"
```

---
Expand Down
2 changes: 1 addition & 1 deletion web/cypress/e2e/incidents/00.coo_incidents_e2e.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const MP = {
operatorName: 'Cluster Monitoring Operator',
};

describe('BVT: Incidents - e2e', { tags: ['@smoke', '@slow', '@incidents', '@e2e-real'] }, () => {
describe('BVT: Incidents - e2e', { tags: ['@slow', '@cluster-health-analyzer'] }, () => {
let currentAlertName: string;

before(() => {
Expand Down
2 changes: 1 addition & 1 deletion web/cypress/e2e/incidents/01.incidents.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const MP = {
operatorName: 'Cluster Monitoring Operator',
};

describe('BVT: Incidents - UI', { tags: ['@smoke', '@incidents'] }, () => {
describe('BVT: Incidents - UI', { tags: ['@cluster-health-analyzer'] }, () => {
before(() => {
cy.beforeBlockCOO(MCP, MP, { dashboards: false, troubleshootingPanel: false });
incidentsPage.warmUpForPlugin();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const MP = {
operatorName: 'Cluster Monitoring Operator',
};

describe('Incidents - Mocking Examples', { tags: ['@demo', '@incidents'] }, () => {
describe('Incidents - Mocking Examples', { tags: ['@cluster-health-analyzer'] }, () => {
before(() => {
cy.beforeBlockCOO(MCP, MP, { dashboards: false, troubleshootingPanel: false });
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const collector = new BenchmarkCollector('01.performance_benchmark.cy.ts');

describe(
'Regression: Performance Benchmark',
{ tags: ['@incidents', '@performance', '@regression'], numTestsKeptInMemory: 0 },
{ tags: ['@cluster-health-analyzer'], numTestsKeptInMemory: 0 },
() => {
before(() => {
cy.beforeBlockCOO(MCP, MP, { dashboards: false, troubleshootingPanel: false });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const collector = new BenchmarkCollector('02.performance_walkthrough.cy.ts');

describe(
'Performance: Interactive Walkthrough',
{ tags: ['@incidents', '@performance'], numTestsKeptInMemory: 0 },
{ tags: ['@cluster-health-analyzer'], numTestsKeptInMemory: 0 },
() => {
before(() => {
cy.beforeBlockCOO(MCP, MP, { dashboards: false, troubleshootingPanel: false });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const MP = {
operatorName: 'Cluster Monitoring Operator',
};

describe('Regression: Incidents Filtering', { tags: ['@incidents'] }, () => {
describe('Regression: Incidents Filtering', { tags: ['@cluster-health-analyzer'] }, () => {
before(() => {
cy.beforeBlockCOO(MCP, MP, { dashboards: false, troubleshootingPanel: false });
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Regression test for Charts UI bugs and Data Loading bugs (Sections 2 & 3.1 of TE

This test loads comprehensive test data covering:
- 2.1: Tooltip Positioning Issues
- 2.2: Bar Sorting & Visibility Issues
- 2.2: Bar Sorting & Visibility Issues
- 2.3: Date/Time Display Issues
- 3.1: Short Duration Incidents Visibility (< 5 min)

Expand Down Expand Up @@ -100,7 +100,7 @@ const MP = {
operatorName: 'Cluster Monitoring Operator',
};

describe('Regression: Charts UI - Comprehensive', { tags: ['@incidents'] }, () => {
describe('Regression: Charts UI - Comprehensive', { tags: ['@cluster-health-analyzer'] }, () => {
before(() => {
cy.beforeBlockCOO(MCP, MP, { dashboards: false, troubleshootingPanel: false });
incidentsPage.warmUpForPlugin();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const MP = {

describe(
'Regression: Mixed Severity Interval Boundary Times',
{ tags: ['@incidents', '@xfail'] },
{ tags: ['@cluster-health-analyzer', '@xfail'] },
() => {
before(() => {
cy.beforeBlockCOO(MCP, MP, { dashboards: false, troubleshootingPanel: false });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const MP = {

describe(
'Regression: Time-Based Alert Resolution (E2E with Firing Alerts)',
{ tags: ['@incidents', '@slow', '@e2e-real'] },
{ tags: ['@cluster-health-analyzer', '@slow'] },
() => {
let currentAlertName: string;

Expand Down
Loading