Skip to content

Commit b7c6c17

Browse files
fix: update skip tag docs to reflect exact matching with lookahead
Tags now match exactly — @skip-ocp-helm won't filter @skip-ocp-helm-nightly. Updated tables and examples to clarify per-job isolation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c16c049 commit b7c6c17

2 files changed

Lines changed: 17 additions & 15 deletions

File tree

docs/overlay/reference/run-e2e.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@ When `JOB_NAME` is set (by OpenShift CI), the script auto-derives a Playwright t
9090

9191
### How It Works
9292

93-
The job suffix is extracted from `JOB_NAME` by stripping everything up to and including `-e2e-`:
93+
The job suffix is extracted from `JOB_NAME` by stripping everything up to and including `-e2e-`. A negative lookahead `(?!-)` is appended so each tag matches exactly — `@skip-ocp-helm` won't accidentally filter `@skip-ocp-helm-nightly`:
9494

95-
| JOB_NAME (suffix shown) | Derived tag | `--grep-invert` |
96-
|--------------------------|-------------|-----------------|
97-
| `...-e2e-ocp-helm` | `@skip-ocp-helm` | `@skip-ocp-helm` |
98-
| `...-e2e-ocp-helm-nightly` | `@skip-ocp-helm-nightly` | `@skip-ocp-helm-nightly` |
99-
| `...-e2e-ocp-operator` | `@skip-ocp-operator` | `@skip-ocp-operator` |
100-
| `...-e2e-ocp-operator-nightly` | `@skip-ocp-operator-nightly` | `@skip-ocp-operator-nightly` |
95+
| JOB_NAME (suffix shown) | `--grep-invert` pattern |
96+
|--------------------------|-------------------------|
97+
| `...-e2e-ocp-helm` | `@skip-ocp-helm(?!-)` |
98+
| `...-e2e-ocp-helm-nightly` | `@skip-ocp-helm-nightly(?!-)` |
99+
| `...-e2e-ocp-operator` | `@skip-ocp-operator(?!-)` |
100+
| `...-e2e-ocp-operator-nightly` | `@skip-ocp-operator-nightly(?!-)` |
101101

102102
If `JOB_NAME` doesn't contain `-e2e-`, no tag is derived and no filtering is applied.
103103

@@ -106,10 +106,10 @@ If `JOB_NAME` doesn't contain `-e2e-`, no tag is derived and no filtering is app
106106
Add Playwright tags to `test.describe` or individual `test` calls:
107107

108108
```typescript
109-
// Skip in ocp-helm-nightly job
109+
// Skip only in ocp-helm-nightly job
110110
test.describe("My Plugin", { tag: "@skip-ocp-helm-nightly" }, () => { ... });
111111

112-
// Skip in all ocp-helm jobs (PR + nightly, since regex matches as substring)
112+
// Skip only in ocp-helm PR check job (won't affect nightly)
113113
test("expensive test", { tag: "@skip-ocp-helm" }, async () => { ... });
114114

115115
// Multiple tags — skip in both helm and operator nightly

docs/overlay/tutorials/ci-pipeline.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,14 @@ test.describe("My Plugin", { tag: "@skip-ocp-helm-nightly" }, () => {
107107

108108
### Available Tags
109109

110-
| Tag | Skipped in |
111-
|-----|-----------|
112-
| `@skip-ocp-helm` | `e2e-ocp-helm` (PR check) |
113-
| `@skip-ocp-helm-nightly` | `e2e-ocp-helm-nightly` |
114-
| `@skip-ocp-operator` | `e2e-ocp-operator` (PR check) |
115-
| `@skip-ocp-operator-nightly` | `e2e-ocp-operator-nightly` |
110+
| Tag | Skipped in | Not skipped in |
111+
|-----|-----------|----------------|
112+
| `@skip-ocp-helm` | `e2e-ocp-helm` (PR check) | `e2e-ocp-helm-nightly` |
113+
| `@skip-ocp-helm-nightly` | `e2e-ocp-helm-nightly` | `e2e-ocp-helm` (PR check) |
114+
| `@skip-ocp-operator` | `e2e-ocp-operator` (PR check) | `e2e-ocp-operator-nightly` |
115+
| `@skip-ocp-operator-nightly` | `e2e-ocp-operator-nightly` | `e2e-ocp-operator` (PR check) |
116+
117+
Each tag matches exactly — `@skip-ocp-helm` won't accidentally skip tests in the nightly job.
116118

117119
Multiple tags can be combined on a single test or describe block:
118120

0 commit comments

Comments
 (0)